Skip to content

Commit abd6e77

Browse files
zliang-scGitHub Enterprise
authored andcommitted
Merge pull request #215 from Snapchat/make-docker-build-independent
make docker build independent
2 parents 222776e + 7a00a43 commit abd6e77

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

build.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 1
33
machamp:
44
keydb-build:
55
# Optional - build counter is linked to the build def
6-
tag_template: "%short.sha%"
6+
tag_template: "0.0.%build.counter%-%sha%"
77
# Optional - value in seconds before a build is terminated, default is 3600 seconds
88
timeout: 3600
99
# Optional - update ghe or not, default to true
@@ -46,8 +46,24 @@ machamp:
4646
# https://github.sc-corp.net/Snapchat/img/tree/master/keydb/ubuntu-20-04
4747
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/keydb/keydb-ubuntu-20-04@sha256:cf869a3f5d1de1e1d976bb906689c37b7031938eb68661b844a38c532f27248c
4848
command: ./runtest-rotation
49+
keydb-docker-build:
50+
# Optional - build counter is linked to the build def
51+
tag_template: "%sha%"
52+
# Optional - value in seconds before a build is terminated, default is 3600 seconds
53+
timeout: 3600
54+
# Optional - update ghe or not, default to true
55+
update_ghe: true
56+
code_coverage: false
57+
# Required
58+
steps:
59+
# to ensure a clearer docker build env
60+
code-checkout:
61+
type: cmd
62+
command: echo checkout
63+
# default machamp builder image does not work for multi arch
64+
builder_image: us.gcr.io/snapchat-build-artifacts/prod/snapchat/img/ubuntu/ubuntu-23-04@sha256:bd43177a80e6ce1c3583e8ea959b88a9081c0f56b765ec9c5a157c27a637c23b
4965
docker:
50-
parent: make-build
66+
parent: code-checkout
5167
type: docker # published images can be found in https://console.cloud.google.com/gcr/images/machamp-prod/global/keydb
5268
dockerfile: machamp_scripts/Dockerfile
5369
image_name: keydb # git commit sha will be deafult tag in the final image

ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,21 @@ on:
1111
# references a build defined in build.yaml
1212
build_name: keydb-build
1313
arch_types: ["amd64", "arm64"]
14+
- workflow_type: backend_workflow
15+
# references a build defined in build.yaml
16+
build_name: keydb-docker-build
17+
arch_types: ["amd64", "arm64"]
1418
# on push is used for release branch, meaning: trigger this build when there is commit pushed to this branch
1519
push:
1620
- branches: [main]
1721
workflows:
1822
- workflow_type: backend_workflow
1923
build_name: keydb-build
2024
arch_types: ["amd64", "arm64"]
25+
- workflow_type: backend_workflow
26+
# references a build defined in build.yaml
27+
build_name: keydb-docker-build
28+
arch_types: ["amd64", "arm64"]
2129

2230
# below defines which branch is release branch / release tag
2331
machamp:

0 commit comments

Comments
 (0)