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)
|
// 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
|
// Uncomment if running locally on Mac M1 to bypass qemu
|
||||||
// platform: "linux/aarch64"
|
// platform: "linux/aarch64"
|
||||||
platform: "linux/amd64"
|
// platform: "linux/amd64"
|
||||||
|
|
||||||
client: filesystem: ".": read: exclude: [
|
client: filesystem: ".": read: exclude: [
|
||||||
"bin",
|
"bin",
|
||||||
|
@ -39,7 +39,8 @@ package dagger
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Configure platform execution
|
// Configure platform execution
|
||||||
platform?: string
|
// FIXME: temporarily disabled
|
||||||
|
// platform?: string
|
||||||
|
|
||||||
// Execute actions in containers
|
// Execute actions in containers
|
||||||
actions: {
|
actions: {
|
||||||
|
44
plan/plan.go
44
plan/plan.go
@ -82,9 +82,10 @@ func Load(ctx context.Context, cfg Config) (*Plan, error) {
|
|||||||
|
|
||||||
p.fillAction()
|
p.fillAction()
|
||||||
|
|
||||||
if err := p.configPlatform(); err != nil {
|
// FIXME: `platform` field temporarily disabled
|
||||||
return nil, err
|
// if err := p.configPlatform(); err != nil {
|
||||||
}
|
// return nil, err
|
||||||
|
// }
|
||||||
|
|
||||||
if err := p.prepare(ctx); err != nil {
|
if err := p.prepare(ctx); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -108,27 +109,28 @@ func (p *Plan) Action() *Action {
|
|||||||
// configPlatform load the platform specified in the context
|
// configPlatform load the platform specified in the context
|
||||||
// Buildkit will then run every operation using that platform
|
// Buildkit will then run every operation using that platform
|
||||||
// If platform is not define, context keep default platform
|
// If platform is not define, context keep default platform
|
||||||
func (p *Plan) configPlatform() error {
|
// FIXME: `platform` field temporarily disabled
|
||||||
platformField := p.source.Lookup("platform")
|
// func (p *Plan) configPlatform() error {
|
||||||
|
// platformField := p.source.Lookup("platform")
|
||||||
|
|
||||||
// Ignore if platform is not set in `#Plan`
|
// // Ignore if platform is not set in `#Plan`
|
||||||
if !platformField.Exists() {
|
// if !platformField.Exists() {
|
||||||
return nil
|
// return nil
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Convert platform to string
|
// // Convert platform to string
|
||||||
platform, err := platformField.String()
|
// platform, err := platformField.String()
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return err
|
// return err
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Set platform to context
|
// // Set platform to context
|
||||||
err = p.context.Platform.SetString(platform)
|
// err = p.context.Platform.SetString(platform)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return err
|
// return err
|
||||||
}
|
// }
|
||||||
return nil
|
// return nil
|
||||||
}
|
// }
|
||||||
|
|
||||||
// prepare executes the pre-run hooks of tasks
|
// prepare executes the pre-run hooks of tasks
|
||||||
func (p *Plan) prepare(ctx context.Context) error {
|
func (p *Plan) prepare(ctx context.Context) error {
|
||||||
|
Reference in New Issue
Block a user