mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
cloudbuild.yaml: build using make
Use make for building our container image (through a new push-image.sh script) instead of building directly with docker. This way we avoid the container image tag naming hassle where we build and push the image on "image-pushing" prow job and need to be able to reliably re-create the same tag on the "testing" side for end-to-end tests. This also has the advantage that the same mechanism (make) is used everywhere, i.e. in image-pushing, testing and locally.
This commit is contained in:
parent
4e5df73747
commit
799da7cbb9
2 changed files with 8 additions and 14 deletions
|
@ -1,20 +1,10 @@
|
|||
steps:
|
||||
- name: gcr.io/cloud-builders/docker
|
||||
args:
|
||||
- 'build'
|
||||
- '--build-arg=VERSION=$_GIT_TAG'
|
||||
- '--build-arg=HOSTMOUNT_PREFIX=/host-'
|
||||
- '--tag=gcr.io/$PROJECT_ID/node-feature-discovery:$_GIT_TAG'
|
||||
- '--tag=gcr.io/$PROJECT_ID/node-feature-discovery:$_PULL_BASE_REF'
|
||||
- '--tag=gcr.io/$PROJECT_ID/node-feature-discovery:$_PULL_BASE_REF-g$COMMIT_SHA'
|
||||
- '.'
|
||||
- name: gcr.io/k8s-testimages/gcb-docker-gcloud:v20200824-5d057db
|
||||
entrypoint: scripts/test-infra/push-image.sh
|
||||
env:
|
||||
- IMAGE_EXTRA_TAG_NAMES=$_PULL_BASE_REF
|
||||
substitutions:
|
||||
_GIT_TAG: '0.0.0'
|
||||
_PULL_BASE_REF: 'master'
|
||||
options:
|
||||
substitution_option: ALLOW_LOOSE
|
||||
# Pust images
|
||||
images:
|
||||
- 'gcr.io/$PROJECT_ID/node-feature-discovery:$_GIT_TAG'
|
||||
- 'gcr.io/$PROJECT_ID/node-feature-discovery:$_PULL_BASE_REF'
|
||||
- 'gcr.io/$PROJECT_ID/node-feature-discovery:$_PULL_BASE_REF-g$COMMIT_SHA'
|
||||
|
|
4
scripts/test-infra/push-image.sh
Executable file
4
scripts/test-infra/push-image.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
make image -e
|
||||
make push -e
|
Loading…
Reference in a new issue