diff --git a/images/controller/werf.inc.yaml b/images/controller/werf.inc.yaml index 4b8dc6b..8703317 100644 --- a/images/controller/werf.inc.yaml +++ b/images/controller/werf.inc.yaml @@ -7,37 +7,33 @@ image: {{ $.ImageName }}-src-artifact from: {{ $.BASE_ALT }} final: false git: - - add: /images/{{ .ImageName }}/src - to: /src/controller + - add: / + to: /src includePaths: - - '**/*' + - api + - images/controller/src stageDependencies: install: - '**/*' -shell: - install: - - rm -rf /src/controller/.git --- image: {{ $.ImageName }}-golang-artifact from: {{ $.BASE_GOLANG }} final: false -git: - - add: / - to: / - includePaths: - - api - - images/controller/src - stageDependencies: - setup: - - "**/*" +import: + - image: {{ $.ImageName }}-src-artifact + add: /src + to: /src + before: setup + mount: - fromPath: ~/go-pkg-cache to: /go/pkg + shell: setup: - - cd /images/controller/src/cmd + - cd /src/images/controller/src/cmd - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o /controller - chmod +x /controller diff --git a/images/webhooks/werf.inc.yaml b/images/webhooks/werf.inc.yaml index d215150..8840a65 100644 --- a/images/webhooks/werf.inc.yaml +++ b/images/webhooks/werf.inc.yaml @@ -30,11 +30,13 @@ import: mount: - fromPath: ~/go-pkg-cache to: /go/pkg + shell: setup: - cd /src/images/webhooks/src/cmd - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o /webhooks - chmod +x /webhooks + --- image: {{ $.ImageName }} from: {{ $.BASE_SCRATCH }}