temporarily disable the platform
field.
Need some more time to figure out the correct API. Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
1428c94679
commit
8d7d808024
2
ci.cue
2
ci.cue
@ -18,7 +18,7 @@ dagger.#Plan & {
|
||||
// to avoid the performance hit caused by qemu (linter goes from <3s to >3m when arch is x86)
|
||||
// Uncomment if running locally on Mac M1 to bypass qemu
|
||||
// platform: "linux/aarch64"
|
||||
platform: "linux/amd64"
|
||||
// platform: "linux/amd64"
|
||||
|
||||
client: filesystem: ".": read: exclude: [
|
||||
"bin",
|
||||
|
@ -39,7 +39,8 @@ package dagger
|
||||
}
|
||||
|
||||
// Configure platform execution
|
||||
platform?: string
|
||||
// FIXME: temporarily disabled
|
||||
// platform?: string
|
||||
|
||||
// Execute actions in containers
|
||||
actions: {
|
||||
|
44
plan/plan.go
44
plan/plan.go
@ -82,9 +82,10 @@ func Load(ctx context.Context, cfg Config) (*Plan, error) {
|
||||
|
||||
p.fillAction()
|
||||
|
||||
if err := p.configPlatform(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// FIXME: `platform` field temporarily disabled
|
||||
// if err := p.configPlatform(); err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
|
||||
if err := p.prepare(ctx); err != nil {
|
||||
return nil, err
|
||||
@ -108,27 +109,28 @@ func (p *Plan) Action() *Action {
|
||||
// configPlatform load the platform specified in the context
|
||||
// Buildkit will then run every operation using that platform
|
||||
// If platform is not define, context keep default platform
|
||||
func (p *Plan) configPlatform() error {
|
||||
platformField := p.source.Lookup("platform")
|
||||
// FIXME: `platform` field temporarily disabled
|
||||
// func (p *Plan) configPlatform() error {
|
||||
// platformField := p.source.Lookup("platform")
|
||||
|
||||
// Ignore if platform is not set in `#Plan`
|
||||
if !platformField.Exists() {
|
||||
return nil
|
||||
}
|
||||
// // Ignore if platform is not set in `#Plan`
|
||||
// if !platformField.Exists() {
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// Convert platform to string
|
||||
platform, err := platformField.String()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// // Convert platform to string
|
||||
// platform, err := platformField.String()
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
|
||||
// Set platform to context
|
||||
err = p.context.Platform.SetString(platform)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
// // Set platform to context
|
||||
// err = p.context.Platform.SetString(platform)
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// prepare executes the pre-run hooks of tasks
|
||||
func (p *Plan) prepare(ctx context.Context) error {
|
||||
|
Reference in New Issue
Block a user