Merge pull request #215 from Snapchat/make-docker-build-independent
make docker build independent
This commit is contained in:
commit
abd6e77c95
20
build.yaml
20
build.yaml
@ -3,7 +3,7 @@ version: 1
|
|||||||
machamp:
|
machamp:
|
||||||
keydb-build:
|
keydb-build:
|
||||||
# Optional - build counter is linked to the build def
|
# Optional - build counter is linked to the build def
|
||||||
tag_template: "%short.sha%"
|
tag_template: "0.0.%build.counter%-%sha%"
|
||||||
# Optional - value in seconds before a build is terminated, default is 3600 seconds
|
# Optional - value in seconds before a build is terminated, default is 3600 seconds
|
||||||
timeout: 3600
|
timeout: 3600
|
||||||
# Optional - update ghe or not, default to true
|
# Optional - update ghe or not, default to true
|
||||||
@ -46,8 +46,24 @@ machamp:
|
|||||||
# https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04
|
# https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04
|
||||||
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/keydb/keydb-ubuntu-20-04@sha256:cf869a3f5d1de1e1d976bb906689c37b7031938eb68661b844a38c532f27248c
|
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/keydb/keydb-ubuntu-20-04@sha256:cf869a3f5d1de1e1d976bb906689c37b7031938eb68661b844a38c532f27248c
|
||||||
command: ./runtest-rotation
|
command: ./runtest-rotation
|
||||||
|
keydb-docker-build:
|
||||||
|
# Optional - build counter is linked to the build def
|
||||||
|
tag_template: "%sha%"
|
||||||
|
# Optional - value in seconds before a build is terminated, default is 3600 seconds
|
||||||
|
timeout: 3600
|
||||||
|
# Optional - update ghe or not, default to true
|
||||||
|
update_ghe: true
|
||||||
|
code_coverage: false
|
||||||
|
# Required
|
||||||
|
steps:
|
||||||
|
# to ensure a clearer docker build env
|
||||||
|
code-checkout:
|
||||||
|
type: cmd
|
||||||
|
command: echo checkout
|
||||||
|
# default machamp builder image does not work for multi arch
|
||||||
|
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/ubuntu/ubuntu-23-04@sha256:bd43177a80e6ce1c3583e8ea959b88a9081c0f56b765ec9c5a157c27a637c23b
|
||||||
docker:
|
docker:
|
||||||
parent: make-build
|
parent: code-checkout
|
||||||
type: docker # published images can be found in https://console.cloud.google.com/gcr/images/machamp-prod/global/keydb
|
type: docker # published images can be found in https://console.cloud.google.com/gcr/images/machamp-prod/global/keydb
|
||||||
dockerfile: machamp_scripts/Dockerfile
|
dockerfile: machamp_scripts/Dockerfile
|
||||||
image_name: keydb # git commit sha will be deafult tag in the final image
|
image_name: keydb # git commit sha will be deafult tag in the final image
|
||||||
|
8
ci.yaml
8
ci.yaml
@ -11,6 +11,10 @@ on:
|
|||||||
# references a build defined in build.yaml
|
# references a build defined in build.yaml
|
||||||
build_name: keydb-build
|
build_name: keydb-build
|
||||||
arch_types: ["amd64", "arm64"]
|
arch_types: ["amd64", "arm64"]
|
||||||
|
- workflow_type: backend_workflow
|
||||||
|
# references a build defined in build.yaml
|
||||||
|
build_name: keydb-docker-build
|
||||||
|
arch_types: ["amd64", "arm64"]
|
||||||
# on push is used for release branch, meaning: trigger this build when there is commit pushed to this branch
|
# on push is used for release branch, meaning: trigger this build when there is commit pushed to this branch
|
||||||
push:
|
push:
|
||||||
- branches: [main]
|
- branches: [main]
|
||||||
@ -18,6 +22,10 @@ on:
|
|||||||
- workflow_type: backend_workflow
|
- workflow_type: backend_workflow
|
||||||
build_name: keydb-build
|
build_name: keydb-build
|
||||||
arch_types: ["amd64", "arm64"]
|
arch_types: ["amd64", "arm64"]
|
||||||
|
- workflow_type: backend_workflow
|
||||||
|
# references a build defined in build.yaml
|
||||||
|
build_name: keydb-docker-build
|
||||||
|
arch_types: ["amd64", "arm64"]
|
||||||
|
|
||||||
# below defines which branch is release branch / release tag
|
# below defines which branch is release branch / release tag
|
||||||
machamp:
|
machamp:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user