-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
always use buildkit to build your docker images, even in concourse :)
- Loading branch information
Michiel Stigter
committed
Sep 5, 2023
1 parent
909e879
commit 961d8db
Showing
15 changed files
with
613 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,12 +34,14 @@ jobs: | |
image_resource: | ||
name: "" | ||
source: | ||
repository: concourse/oci-build-task | ||
password: ((halfpipe-gcr.private_key)) | ||
repository: eu.gcr.io/halfpipe-io/halfpipe-buildx | ||
tag: latest | ||
username: _json_key | ||
type: registry-image | ||
inputs: | ||
- name: git | ||
outputs: | ||
- name: image | ||
- name: tagList | ||
params: | ||
BUILD_ARG_ARTIFACTORY_PASSWORD: ((artifactory.password)) | ||
BUILD_ARG_ARTIFACTORY_URL: ((artifactory.url)) | ||
|
@@ -53,9 +55,8 @@ jobs: | |
args: | ||
- -c | ||
- |- | ||
mkdir ~/.docker | ||
echo $DOCKER_CONFIG_JSON > ~/.docker/config.json | ||
build | ||
docker buildx build -f $DOCKERFILE --platform linux/amd64 -t eu.gcr.io/halfpipe-io/cache/springerplatformengineering/halfpipe-fly:$(cat git/.git/ref) --push --provenance=false $CONTEXT | ||
path: /bin/sh | ||
privileged: true | ||
task: build | ||
|
@@ -68,24 +69,50 @@ jobs: | |
type: docker-image | ||
inputs: | ||
- name: git | ||
- name: image | ||
params: | ||
DOCKER_CONFIG_JSON: ((halfpipe-gcr.docker_config)) | ||
platform: linux | ||
run: | ||
args: | ||
- -c | ||
- |- | ||
[ -f .trivyignore ] && echo "Ignoring the following CVE's due to .trivyignore" || true | ||
[ -f .trivyignore ] && cat .trivyignore; echo || true | ||
trivy image --timeout 15m --ignore-unfixed --severity CRITICAL --scanners vuln --exit-code 0 --input ../../../../image/image.tar || true | ||
trivy image --timeout 15m --ignore-unfixed --severity CRITICAL --scanners vuln --exit-code 0 eu.gcr.io/halfpipe-io/cache/springerplatformengineering/halfpipe-fly:$(cat ../../../.git/ref) || true | ||
dir: git/e2e/concourse/docker-push-paths | ||
path: /bin/sh | ||
task: trivy | ||
timeout: 1h | ||
- no_get: true | ||
params: | ||
additional_tags: tagList/tagList | ||
image: image/image.tar | ||
put: halfpipe-fly | ||
- config: | ||
image_resource: | ||
name: "" | ||
source: | ||
password: ((halfpipe-gcr.private_key)) | ||
repository: eu.gcr.io/halfpipe-io/halfpipe-buildx | ||
tag: latest | ||
username: _json_key | ||
type: registry-image | ||
inputs: | ||
- name: git | ||
- name: tagList | ||
params: | ||
BUILD_ARG_ARTIFACTORY_PASSWORD: ((artifactory.password)) | ||
BUILD_ARG_ARTIFACTORY_URL: ((artifactory.url)) | ||
BUILD_ARG_ARTIFACTORY_USERNAME: ((artifactory.username)) | ||
BUILD_ARG_RUNNING_IN_CI: "true" | ||
CONTEXT: git/e2e/concourse/docker-push-paths/some/build/dir | ||
DOCKER_CONFIG_JSON: ((halfpipe-gcr.docker_config)) | ||
DOCKERFILE: git/e2e/concourse/docker-push-paths/dockerfiles/Dockerfile | ||
platform: linux | ||
run: | ||
args: | ||
- -c | ||
- |- | ||
echo $DOCKER_CONFIG_JSON > ~/.docker/config.json | ||
for tag in $(cat tagList/tagList) ; do docker buildx imagetools create eu.gcr.io/halfpipe-io/cache/springerplatformengineering/halfpipe-fly:$(cat git/.git/ref) --tag springerplatformengineering/halfpipe-fly:$tag; done | ||
path: /bin/sh | ||
privileged: true | ||
task: publish-final-image | ||
timeout: 1h | ||
serial: true | ||
- build_log_retention: | ||
|
@@ -124,12 +151,14 @@ jobs: | |
image_resource: | ||
name: "" | ||
source: | ||
repository: concourse/oci-build-task | ||
password: ((halfpipe-gcr.private_key)) | ||
repository: eu.gcr.io/halfpipe-io/halfpipe-buildx | ||
tag: latest | ||
username: _json_key | ||
type: registry-image | ||
inputs: | ||
- name: git | ||
outputs: | ||
- name: image | ||
- name: tagList | ||
params: | ||
BUILD_ARG_ARTIFACTORY_PASSWORD: ((artifactory.password)) | ||
BUILD_ARG_ARTIFACTORY_URL: ((artifactory.url)) | ||
|
@@ -143,9 +172,8 @@ jobs: | |
args: | ||
- -c | ||
- |- | ||
mkdir ~/.docker | ||
echo $DOCKER_CONFIG_JSON > ~/.docker/config.json | ||
build | ||
docker buildx build -f $DOCKERFILE --platform linux/amd64 -t eu.gcr.io/halfpipe-io/cache/springerplatformengineering/halfpipe:$(cat git/.git/ref) --push --provenance=false $CONTEXT | ||
path: /bin/sh | ||
privileged: true | ||
task: build | ||
|
@@ -158,24 +186,50 @@ jobs: | |
type: docker-image | ||
inputs: | ||
- name: git | ||
- name: image | ||
params: | ||
DOCKER_CONFIG_JSON: ((halfpipe-gcr.docker_config)) | ||
platform: linux | ||
run: | ||
args: | ||
- -c | ||
- |- | ||
[ -f .trivyignore ] && echo "Ignoring the following CVE's due to .trivyignore" || true | ||
[ -f .trivyignore ] && cat .trivyignore; echo || true | ||
trivy image --timeout 15m --ignore-unfixed --severity CRITICAL --scanners vuln --exit-code 0 --input ../../../../image/image.tar || true | ||
trivy image --timeout 15m --ignore-unfixed --severity CRITICAL --scanners vuln --exit-code 0 eu.gcr.io/halfpipe-io/cache/springerplatformengineering/halfpipe:$(cat ../../../.git/ref) || true | ||
dir: git/e2e/concourse/docker-push-paths | ||
path: /bin/sh | ||
task: trivy | ||
timeout: 1h | ||
- no_get: true | ||
params: | ||
additional_tags: tagList/tagList | ||
image: image/image.tar | ||
put: halfpipe | ||
- config: | ||
image_resource: | ||
name: "" | ||
source: | ||
password: ((halfpipe-gcr.private_key)) | ||
repository: eu.gcr.io/halfpipe-io/halfpipe-buildx | ||
tag: latest | ||
username: _json_key | ||
type: registry-image | ||
inputs: | ||
- name: git | ||
- name: tagList | ||
params: | ||
BUILD_ARG_ARTIFACTORY_PASSWORD: ((artifactory.password)) | ||
BUILD_ARG_ARTIFACTORY_URL: ((artifactory.url)) | ||
BUILD_ARG_ARTIFACTORY_USERNAME: ((artifactory.username)) | ||
BUILD_ARG_RUNNING_IN_CI: "true" | ||
CONTEXT: git/e2e/concourse/docker-push-paths | ||
DOCKER_CONFIG_JSON: ((halfpipe-gcr.docker_config)) | ||
DOCKERFILE: git/e2e/concourse/docker-push-paths/dockerfiles/Dockerfile | ||
platform: linux | ||
run: | ||
args: | ||
- -c | ||
- |- | ||
echo $DOCKER_CONFIG_JSON > ~/.docker/config.json | ||
for tag in $(cat tagList/tagList) ; do docker buildx imagetools create eu.gcr.io/halfpipe-io/cache/springerplatformengineering/halfpipe:$(cat git/.git/ref) --tag springerplatformengineering/halfpipe:$tag; done | ||
path: /bin/sh | ||
privileged: true | ||
task: publish-final-image | ||
timeout: 1h | ||
serial: true | ||
resources: | ||
|
@@ -188,17 +242,3 @@ resources: | |
private_key: ((halfpipe-github.private_key)) | ||
uri: [email protected]:springernature/halfpipe.git | ||
type: git | ||
- check_every: 24h0m0s | ||
name: halfpipe-fly | ||
source: | ||
password: verysecret | ||
repository: springerplatformengineering/halfpipe-fly | ||
username: rob | ||
type: registry-image | ||
- check_every: 24h0m0s | ||
name: halfpipe | ||
source: | ||
password: verysecret | ||
repository: springerplatformengineering/halfpipe | ||
username: rob | ||
type: registry-image |
Oops, something went wrong.