Change "arch" into "platform" because it's more accurate.

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-11-05 16:21:21 +01:00
parent de6afee89c
commit a63c4e989a
12 changed files with 33 additions and 32 deletions

View File

@@ -139,7 +139,7 @@ func (e *Environment) Up(ctx context.Context, s solver.Solver) error {
flow := cueflow.New(
&cueflow.Config{},
e.src.Cue(),
newTaskFunc(newPipelineRunner(e.computed, s, e.state.Architecture)),
newTaskFunc(newPipelineRunner(e.computed, s, e.state.Platform)),
)
if err := flow.Run(ctx); err != nil {
return err
@@ -200,6 +200,7 @@ func newPipelineRunner(computed *compiler.Value, s solver.Solver, platform strin
}
v := compiler.Wrap(t.Value())
fmt.Println(platform)
var pipelinePlatform specs.Platform
if platform == "" {
pipelinePlatform = specs.Platform{OS: "linux", Architecture: "amd64"}

View File

@@ -46,7 +46,7 @@ type Pipeline struct {
name string
s solver.Solver
state llb.State
platform specs.Platform // Architecture constraint
platform specs.Platform // Platform constraint
result bkgw.Reference
image dockerfile2llb.Image
computed *compiler.Value