You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by on...@apache.org on 2020/11/20 01:21:06 UTC
[geode] 01/02: [GEODE-8661] Use version provided by
*-builder-image-family. (#5681)
This is an automated email from the ASF dual-hosted git repository.
onichols pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git
commit ed4644f93043b6e460b45387cbb6fd6ad43ac516
Author: Sean Goller <se...@goller.net>
AuthorDate: Wed Oct 28 08:48:13 2020 -0700
[GEODE-8661] Use version provided by *-builder-image-family. (#5681)
(cherry picked from commit 828e84dec4be132314f4f99b3644c377fae1171b)
(cherry picked from commit 3728eb2efa6abb71287a42c668f1d9a0077dd2f2)
---
ci/pipelines/geode-build/jinja.template.yml | 8 +++++++-
ci/pipelines/pull-request/jinja.template.yml | 4 ++++
ci/scripts/create_instance.sh | 9 ++++++++-
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/ci/pipelines/geode-build/jinja.template.yml b/ci/pipelines/geode-build/jinja.template.yml
index 7adefcc..79ae842 100644
--- a/ci/pipelines/geode-build/jinja.template.yml
+++ b/ci/pipelines/geode-build/jinja.template.yml
@@ -278,7 +278,7 @@ jobs:
GEODE_BRANCH: {{repository.branch}}
GEODE_FORK: {{repository.fork}}
JAVA_BUILD_VERSION: {{ java_build_version.version }}
- IMAGE_FAMILY_NAME: ((pipeline-prefix))linux-geode-builder
+ IMAGE_FAMILY_NAME: ((pipeline-prefix)){{ build_test.PLATFORM }}-geode-builder
run:
path: geode-ci/ci/scripts/create_instance.sh
inputs:
@@ -287,6 +287,8 @@ jobs:
- name: concourse-metadata-resource
- name: geode
- name: geode-ci
+ - name: {{ build_test.PLATFORM }}-builder-image-family
+ path: builder-image
outputs:
- name: attempts-log
path: new
@@ -563,6 +565,8 @@ jobs:
- name: geode
- name: attempts-log
path: old
+ - name: linux-builder-image-family
+ path: builder-image
outputs:
- name: instance-data
- name: attempts-log
@@ -650,6 +654,8 @@ jobs:
- name: geode
- name: attempts-log
path: old
+ - name: {{ test.PLATFORM}}-builder-image-family
+ path: builder-image
outputs:
- name: instance-data-{{java_test_version.name}}
path: instance-data
diff --git a/ci/pipelines/pull-request/jinja.template.yml b/ci/pipelines/pull-request/jinja.template.yml
index a4ee439..4733eea 100644
--- a/ci/pipelines/pull-request/jinja.template.yml
+++ b/ci/pipelines/pull-request/jinja.template.yml
@@ -135,6 +135,8 @@ jobs:
- name: geode-ci
- name: attempts-log
path: old
+ - name: {{ test.PLATFORM}}-builder-image-family
+ path: builder-image
outputs:
- name: instance-data
- name: attempts-log
@@ -293,6 +295,8 @@ jobs:
- name: geode-ci
- name: attempts-log
path: old
+ - name: {{ test.PLATFORM}}-builder-image-family
+ path: builder-image
outputs:
- name: instance-data
- name: attempts-log
diff --git a/ci/scripts/create_instance.sh b/ci/scripts/create_instance.sh
index b21ade0..c00a0cf 100755
--- a/ci/scripts/create_instance.sh
+++ b/ci/scripts/create_instance.sh
@@ -75,6 +75,13 @@ INSTANCE_NAME_STRING="${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-build${JAVA_BUILD
INSTANCE_NAME="heavy-lifter-$(uuidgen -n @dns -s -N "${INSTANCE_NAME_STRING}")"
echo "Hashed ${INSTANCE_NAME_STRING} (${#INSTANCE_NAME_STRING} chars) -> ${INSTANCE_NAME} (${#INSTANCE_NAME} chars)"
+IMAGE_SELF_LINK=$(cat builder-image/output.json | jq -r '.selfLink')
+IMAGE_NAME=$(cat builder-image/output.json | jq -r '.name')
+
+if [[ -z "${IMAGE_NAME}" ]]; then
+ echo "Unable to determine proper heavy lifter image to use. Aborting!"
+ exit 1
+fi
MY_NAME=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/name" -H "Metadata-Flavor: Google")
MY_ZONE=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/zone" -H "Metadata-Flavor: Google")
@@ -121,7 +128,7 @@ INSTANCE_INFORMATION=$(gcloud compute --project=${GCP_PROJECT} instances create
--min-cpu-platform=Intel\ Skylake \
--network="${GCP_NETWORK}" \
--subnet="${GCP_SUBNETWORK}" \
- --image-family="${IMAGE_FAMILY_NAME}" \
+ --image="${IMAGE_NAME}" \
--boot-disk-size=100GB \
--boot-disk-type=pd-ssd \
--labels="${LABELS}" \