address intentation and use default release

This commit is contained in:
zliang 2023-08-10 14:08:37 -06:00
parent 7bce881287
commit 7a496d3dde
3 changed files with 9 additions and 37 deletions

View File

@ -51,4 +51,4 @@ machamp:
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
workspace_context: ./ # # This is the workspace context that your Dockerfile will use to move files around. <Root of checkout repository>/<Workspace Context>/<Dockerfile> If the workspace context is just the root of the repository, you can just use "./". workspace_context: ./ # This is the workspace context that your Dockerfile will use to move files around. <Root of checkout repository>/<Workspace Context>/<Dockerfile> If the workspace context is just the root of the repository, you can just use "./".

View File

@ -1,6 +1,8 @@
# Doc: https://wiki.sc-corp.net/display/TOOL/ci.yaml+User+Guide # Doc: https://wiki.sc-corp.net/display/TOOL/ci.yaml+User+Guide
version: 1 version: 1
on: on:
# https://wiki.sc-corp.net/display/TOOL/Onboard+Machamp+Build+By+ci.yaml+Configuration
# on pull_request is used for any pr build
pull_request: pull_request:
- branches: ['!!main', '*'] # this branch pattern means any branch but not main branch will trigger this pr build - branches: ['!!main', '*'] # this branch pattern means any branch but not main branch will trigger this pr build
workflows: workflows:
@ -9,6 +11,7 @@ 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"]
# 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]
workflows: workflows:

View File

@ -1,31 +0,0 @@
# Doc: https://wiki.sc-corp.net/pages/viewpage.action?pageId=121500284
version: 1
machamp:
keydb-build: # user can define the build name, match with the build name in build.yaml
branches: # defines which branch would trigger this release definition, you can define multiple regex for this field. This also applies to git tags
- ^main$
post_build_actions:
# https://wiki.sc-corp.net/display/TOOL/Build+Config+Complete+Samples#BuildConfigCompleteSamples-Mybuildhasadockerimage,Iwanttocontrolwhichregionorwhichcloudservicethisimagepublishto,Idonothavepipelinetotrigger
# publish image to gcr repository
publish-image-to-gcr-regions: # user can define the post build action step name
deploy_to: gke
regions:
- gcp-us-central1
- gcp-us-east1
- gcp-us-east4
- gcp-europe-west1
- gcp-asia-southeast1
- gcp-asia-south1
image_name:
- keydb
# publish image to ecr repository
publish-image-to-ecr-regions: # user can define the post build action step name
deploy_to: eks
regions:
- aws-us-west-2
- aws-us-east-1
- aws-eu-west-1
- aws-ap-southeast-1
- aws-ap-south-1
image_name:
- keydb