Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Build the debian package builder image as part of the cloudbuild. (#306)
Browse files Browse the repository at this point in the history
Skip tagging the builder image as it's not needed by anything else
except this pipeline.
  • Loading branch information
chingor13 authored Jun 5, 2017
1 parent 66bcdeb commit 875e113
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
4 changes: 3 additions & 1 deletion deb-package-builder/build-packages.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
steps:
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/${_GOOGLE_PROJECT_ID}/deb-package-builder', '.']
- name: gcr.io/cloud-builders/gsutil
args: ['-m', 'rsync', 'gs://${_BUCKET}/packages/${_PHP_VERSION}/', '/workspace/pkg/']
- name: ${_IMAGE}
- name: gcr.io/${_GOOGLE_PROJECT_ID}/deb-package-builder
args: ['${_PHP_VERSION}']
- name: gcr.io/cloud-builders/gsutil
args: ['-m', 'rsync', '/workspace/pkg/', 'gs://${_BUCKET}/packages/${_PHP_VERSION}/']
11 changes: 1 addition & 10 deletions deb-package-builder/build_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,11 @@ if [ -z "${BUCKET}" ]; then
echo "Defaulting Bucket to: ${BUCKET}"
fi

IMAGE="gcr.io/${GOOGLE_PROJECT_ID}/deb-package-builder"

# First, build the package builder
if [ -z "${USE_LATEST}" ]; then
echo "Building package builder..."
gcloud container builds submit . --config=builder.yaml \
--substitutions _IMAGE=${IMAGE}
fi

# Use the package builder
for VERSION in $(echo ${PHP_VERSIONS} | tr "," "\n")
do
echo "Building packages for PHP ${VERSION}"
gcloud container builds submit . --config=build-packages.yaml \
--substitutions _PHP_VERSION=${VERSION},_IMAGE=${IMAGE},_BUCKET=${BUCKET} \
--substitutions _PHP_VERSION=${VERSION},_GOOGLE_PROJECT_ID=${GOOGLE_PROJECT_ID},_BUCKET=${BUCKET} \
--timeout=40m
done
6 changes: 0 additions & 6 deletions deb-package-builder/builder.yaml

This file was deleted.

0 comments on commit 875e113

Please sign in to comment.