Apply Solomon comments

- Remove input field
- Fix auth consistency
- Cleanup test

Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2022-02-17 17:48:51 +01:00
committed by Vasek - Tom C
parent c90be8423e
commit cc601a4e07
5 changed files with 78 additions and 86 deletions

View File

@@ -61,15 +61,7 @@ import (
// Build step that executes a Dockerfile
#Dockerfile: {
// Source image
input?: #Image
// FIXME cannot replace with _source: *engine.#Scratch | input.rootfs
// Got error "$dagger" not found
_source: input.rootfs
if input == _|_ {
_source: engine.#Scratch
}
source: dagger.#FS
// Dockerfile definition or path into source
dockerfile: *{
@@ -91,12 +83,9 @@ import (
label: [string]: string
hosts: [string]: string
_build: engine.#Dockerfile & {
source: _source
"auth": [ for target, creds in auth {
"target": target
creds
}]
_build: dagger.#Dockerfile & {
"source": source
"auth": auth
"dockerfile": dockerfile
"platforms": platforms
if target != _|_ {