Skip to content

Commit

Permalink
Trying docker pull before docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark-kun committed Dec 1, 2018
1 parent 0794834 commit 0309015
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion test/e2e_test_gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
- name: image-name
value: "{{inputs.parameters.target-image-prefix}}{{inputs.parameters.api-integration-test-image-suffix}}"
- name: build-frontend-integration-tests-image
template: build-image
template: build-image-after-pull
arguments:
parameters:
- name: docker-path
Expand Down Expand Up @@ -213,6 +213,56 @@ spec:
privileged: true
mirrorVolumeMounts: true

# Build image and upload to GCR in the specified project
- name: build-image-after-pull
inputs:
parameters:
# GCS URI prefix pointing to a .tar.gz archive of Docker build context
- name: image-build-context-gcs-uri
value: "{{workflow.parameters.image-build-context-gcs-uri}}"
# The relative code path to the Dockerfile
- name: docker-path
# Name of the Docker file to use. "Dockerfile" by default
- name: docker-file
value: Dockerfile
- name: image-name
outputs:
parameters:
- name: strict-image-name
valueFrom:
path: /outputs/strict-image-name/file
container:
image: gcr.io/ml-pipeline-test/image-builder:v20181128-0.1.3-rc.1-109-ga5a14dc-e3b0c4
imagePullPolicy: 'Always'
command:
- sh
- -xc
- |
sleep 60
if [ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" ]; then
gcloud auth activate-service-account --key-file="${GOOGLE_APPLICATION_CREDENTIALS}"
fi
gcloud auth configure-docker
docker pull gcr.io/ml-pipeline-test/selenium-standalone-chrome-nodejs:v20181109-0.1.1-56-gb190e72-dirty-28e8ac && "$0" "$@"
- /build.sh
- "--image-build-context-gcs-uri"
- "{{inputs.parameters.image-build-context-gcs-uri}}"
- "--docker_path"
- "{{inputs.parameters.docker-path}}"
- "--docker_file"
- "{{inputs.parameters.docker-file}}"
- "--image_name"
- "{{inputs.parameters.image-name}}"
env:
- name: DOCKER_HOST
value: 127.0.0.1
sidecars:
- name: dind
image: docker:17.10-dind
securityContext:
privileged: true
mirrorVolumeMounts: true

- name: deploy-ml-pipeline
inputs:
parameters:
Expand Down

0 comments on commit 0309015

Please sign in to comment.