Skip to content

Commit

Permalink
Add CI step to build image-transformer (kubeflow#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchihe authored and k8s-ci-robot committed Nov 5, 2019
1 parent 31ab0d6 commit a252e8b
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/scripts/build-custom-image-transformer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Copyright 2019 The Kubeflow Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# This shell script is used to build an image from our argo workflow

set -o errexit
set -o nounset
set -o pipefail

export PATH=${GOPATH}/bin:/usr/local/go/bin:${PATH}
REGISTRY="${GCP_REGISTRY}"
PROJECT="${GCP_PROJECT}"
IMAGE_TRANSFOMER_DIR="docs/samples/transformer/image_transformer/"
VERSION=$(git describe --tags --always --dirty)

echo "Activating service-account ..."
gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}

echo "Building and pushing image-transfomer ..."
cd ${IMAGE_TRANSFOMER_DIR}
cp transformer.Dockerfile Dockerfile
gcloud builds submit . --tag=${REGISTRY}/${REPO_NAME}/image-transformer:${VERSION} --project=${PROJECT}
gcloud container images add-tag --quiet ${REGISTRY}/${REPO_NAME}/image-transformer:${VERSION} ${REGISTRY}/${REPO_NAME}/image-transformer:latest --verbosity=info
7 changes: 7 additions & 0 deletions test/workflows/components/workflows.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@
name: "build-kfserving-executor",
template: "build-kfserving-executor",
},
{
name: "build-custom-image-transformer",
template: "build-custom-image-transformer",
},
{
name: "build-pytorchserver",
template: "build-pytorchserver",
Expand Down Expand Up @@ -309,6 +313,9 @@
$.parts(namespace, name, overrides).e2e(prow_env, bucket).buildTemplate("build-kfserving-executor", testWorkerImage, [
"test/scripts/build-kfserving-executor.sh",
]), // build-kfserving-executor
$.parts(namespace, name, overrides).e2e(prow_env, bucket).buildTemplate("build-custom-image-transformer", testWorkerImage, [
"test/scripts/build-custom-image-transformer.sh",
]), // build-custom-image-transformer
$.parts(namespace, name, overrides).e2e(prow_env, bucket).buildTemplate("build-pytorchserver", testWorkerImage, [
"test/scripts/build-python-image.sh", "pytorch.Dockerfile", "pytorchserver",
]), // build-pytorchserver
Expand Down

0 comments on commit a252e8b

Please sign in to comment.