You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by sm...@apache.org on 2021/10/26 22:01:12 UTC

[geode] branch support/1.12 updated (3da8b97 -> a8ad684)

This is an automated email from the ASF dual-hosted git repository.

smgoller pushed a change to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git.


    from 3da8b97  Bumping version to 1.12.6
     new 003f0d9  [GEODE-9775] CI Changes to support CI migration
     new a8ad684  GEODE-9775: fixup missing Concourse variable for PR pipeline (#7047)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ci/pipelines/geode-build/deploy_pipeline.sh  | 10 ----------
 ci/pipelines/geode-build/jinja.template.yml  |  3 +++
 ci/pipelines/images/jinja.template.yml       |  6 ++++++
 ci/pipelines/pull-request/jinja.template.yml |  6 ++++++
 ci/scripts/build_image.sh                    | 16 ++--------------
 ci/scripts/create_instance.sh                | 26 +++++++++++++++++++-------
 6 files changed, 36 insertions(+), 31 deletions(-)

[geode] 01/02: [GEODE-9775] CI Changes to support CI migration

Posted by sm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

smgoller pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 003f0d93b0910b6aaec95b18890b2e70d1289891
Author: Sean Goller <se...@goller.net>
AuthorDate: Tue Oct 26 18:48:17 2021 +0000

    [GEODE-9775] CI Changes to support CI migration
    
    * Remove unnecessary environment variables.
    * get network information from concourse instead of discovering it ourselves.
    
    (cherry picked from commit 4248006916a91f6d86976f77aea50a9dec729757)
---
 ci/pipelines/geode-build/deploy_pipeline.sh | 10 ----------
 ci/pipelines/geode-build/jinja.template.yml |  3 +++
 ci/pipelines/images/jinja.template.yml      |  6 ++++++
 ci/scripts/build_image.sh                   | 16 ++--------------
 ci/scripts/create_instance.sh               | 26 +++++++++++++++++++-------
 5 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/ci/pipelines/geode-build/deploy_pipeline.sh b/ci/pipelines/geode-build/deploy_pipeline.sh
index f0e38ba..2cf1640 100755
--- a/ci/pipelines/geode-build/deploy_pipeline.sh
+++ b/ci/pipelines/geode-build/deploy_pipeline.sh
@@ -40,16 +40,6 @@ fi
 echo "Sanitized Geode Fork = ${SANITIZED_GEODE_FORK}"
 echo "Sanitized Geode Branch = ${SANITIZED_GEODE_BRANCH}"
 
-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")
-MY_ZONE=${MY_ZONE##*/}
-NETWORK_INTERFACE_INFO="$(gcloud compute instances describe ${MY_NAME} --zone ${MY_ZONE} --format="json(networkInterfaces)")"
-GCP_NETWORK=$(echo ${NETWORK_INTERFACE_INFO} | jq -r '.networkInterfaces[0].network')
-GCP_NETWORK=${GCP_NETWORK##*/}
-GCP_SUBNETWORK=$(echo ${NETWORK_INTERFACE_INFO} | jq -r '.networkInterfaces[0].subnetwork')
-GCP_SUBNETWORK=${GCP_SUBNETWORK##*/}
-ENV_ID=$(echo ${GCP_NETWORK} | awk -F- '{ print $1}')
-
 #echo "DEBUG INFO *****************************"
 #echo "Pipeline prefix = ${PIPELINE_PREFIX}"
 #echo "Docker image prefix = ${DOCKER_IMAGE_PREFIX}"
diff --git a/ci/pipelines/geode-build/jinja.template.yml b/ci/pipelines/geode-build/jinja.template.yml
index 9d0848b..5194355 100644
--- a/ci/pipelines/geode-build/jinja.template.yml
+++ b/ci/pipelines/geode-build/jinja.template.yml
@@ -59,6 +59,9 @@
 
 {% macro common_instance_params(test) -%}
 GCP_PROJECT: ((gcp-project))
+GCP_NETWORK: ((gcp-network))
+GCP_SUBNETWORK: ((gcp-subnet))
+GCP_ZONE: ((gcp-zone))
 CPUS: {{ test.CPUS }}
 RAM: {{ test.RAM }}
 {%- endmacro %}
diff --git a/ci/pipelines/images/jinja.template.yml b/ci/pipelines/images/jinja.template.yml
index 8618bb2..872115a 100644
--- a/ci/pipelines/images/jinja.template.yml
+++ b/ci/pipelines/images/jinja.template.yml
@@ -245,6 +245,9 @@ jobs:
         GEODE_DOCKER_IMAGE: gcr.io/((gcp-project))/((pipeline-prefix))test-container
         PIPELINE_PREFIX: ((pipeline-prefix))
         GCP_PROJECT: ((gcp-project))
+        GCP_NETWORK: ((gcp-network))
+        GCP_SUBNETWORK: ((gcp-subnet))
+        INTERNAL: "true"
         CONCOURSE_GCP_KEY: "((concourse-gcp-key))"
         JAVA_BUILD_VERSION: 8
       run:
@@ -280,6 +283,9 @@ jobs:
         GEODE_DOCKER_IMAGE: gcr.io/((gcp-project))/((pipeline-prefix))test-container
         PIPELINE_PREFIX: ((pipeline-prefix))
         GCP_PROJECT: ((gcp-project))
+        GCP_NETWORK: ((gcp-network))
+        GCP_SUBNETWORK: ((gcp-subnet))
+        INTERNAL: "true"
         CONCOURSE_GCP_KEY: "((concourse-gcp-key))"
         JAVA_BUILD_VERSION: 8
       run:
diff --git a/ci/scripts/build_image.sh b/ci/scripts/build_image.sh
index 0db5b48..ab3020f 100755
--- a/ci/scripts/build_image.sh
+++ b/ci/scripts/build_image.sh
@@ -32,20 +32,8 @@ if [[ -n "${CONCOURSE_GCP_KEY}" ]]; then
   export GOOGLE_APPLICATION_CREDENTIALS=${PACKERDIR}/credentials.json
 fi
 
-GCP_NETWORK="default"
-GCP_SUBNETWORK="default"
-
-MY_NAME=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/name" -H "Metadata-Flavor: Google")
-if [[ -n "${MY_NAME}" ]]; then
-  MY_ZONE=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/zone" -H "Metadata-Flavor: Google")
-  MY_ZONE=${MY_ZONE##*/}
-  NETWORK_INTERFACE_INFO="$(gcloud compute instances describe ${MY_NAME} --zone ${MY_ZONE} --format="json(networkInterfaces)")"
-  GCP_NETWORK=$(echo ${NETWORK_INTERFACE_INFO} | jq -r '.networkInterfaces[0].network')
-  GCP_NETWORK=${GCP_NETWORK##*/}
-  GCP_SUBNETWORK=$(echo ${NETWORK_INTERFACE_INFO} | jq -r '.networkInterfaces[0].subnetwork')
-  GCP_SUBNETWORK=${GCP_SUBNETWORK##*/}
-  INTERNAL=true
-fi
+GCP_NETWORK="${GCP_NETWORK:-default}"
+GCP_SUBNETWORK="${GCP_SUBNETWORK:-default}"
 
 if [[ -z "${GCP_PROJECT}" ]]; then
   echo "GCP_PROJECT is unset. Cowardly refusing to continue."
diff --git a/ci/scripts/create_instance.sh b/ci/scripts/create_instance.sh
index c00a0cf..d6df95c 100755
--- a/ci/scripts/create_instance.sh
+++ b/ci/scripts/create_instance.sh
@@ -48,6 +48,24 @@ if [[ -z "${IMAGE_FAMILY_NAME}" ]]; then
   exit 1
 fi
 
+if [[ -z "${GCP_NETWORK}" ]]; then
+  echo "GCP_NETWORK environment variable must be set for this script to work."
+  exit 1
+fi
+
+if [[ -z "${GCP_SUBNETWORK}" ]]; then
+  echo "GCP_SUBNETWORK environment variable must be set for this script to work."
+  exit 1
+fi
+
+if [[ -z "${GCP_ZONE}" ]]; then
+  echo "GCP_ZONE environment variable must be set for this script to work."
+  exit 1
+fi
+
+. ${SCRIPTDIR}/shared_utilities.sh
+is_source_from_pr_testable "geode" "$(get_geode_pr_exclusion_dirs)" || exit 0
+
 if [[ -d geode ]]; then
   pushd geode
   GEODE_SHA=$(git rev-parse --verify HEAD)
@@ -83,14 +101,8 @@ if [[ -z "${IMAGE_NAME}" ]]; then
   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")
+MY_ZONE=${GCP_ZONE}
 MY_ZONE=${MY_ZONE##*/}
-NETWORK_INTERFACE_INFO="$(gcloud compute instances describe ${MY_NAME} --zone ${MY_ZONE} --format="json(networkInterfaces)")"
-GCP_NETWORK=$(echo ${NETWORK_INTERFACE_INFO} | jq -r '.networkInterfaces[0].network')
-GCP_NETWORK=${GCP_NETWORK##*/}
-GCP_SUBNETWORK=$(echo ${NETWORK_INTERFACE_INFO} | jq -r '.networkInterfaces[0].subnetwork')
-GCP_SUBNETWORK=${GCP_SUBNETWORK##*/}
 
 # Determine and store our attempt number
 cp old/attempts new/

[geode] 02/02: GEODE-9775: fixup missing Concourse variable for PR pipeline (#7047)

Posted by sm...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

smgoller pushed a commit to branch support/1.12
in repository https://gitbox.apache.org/repos/asf/geode.git

commit a8ad684bcefbf556fe6feef6178d9a7c2a586d9a
Author: Robert Houghton <rh...@pivotal.io>
AuthorDate: Tue Oct 26 12:30:41 2021 -0700

    GEODE-9775: fixup missing Concourse variable for PR pipeline (#7047)
    
    (cherry picked from commit e1fac45368f20896a36a96936f4bc938951b4659)
---
 ci/pipelines/pull-request/jinja.template.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ci/pipelines/pull-request/jinja.template.yml b/ci/pipelines/pull-request/jinja.template.yml
index c1598b3..138476b 100644
--- a/ci/pipelines/pull-request/jinja.template.yml
+++ b/ci/pipelines/pull-request/jinja.template.yml
@@ -124,6 +124,9 @@ jobs:
               CPUS: {{build_test.CPUS}}
               RAM: {{build_test.RAM}}
               GCP_PROJECT: ((gcp-project))
+              GCP_NETWORK: ((gcp-network))
+              GCP_SUBNETWORK: ((gcp-subnet))
+              GCP_ZONE: ((gcp-zone))
               GEODE_BRANCH: {{repository.branch}}
               GEODE_FORK: {{repository.fork}}
               JAVA_BUILD_VERSION: 8
@@ -285,6 +288,9 @@ jobs:
               GEODE_BRANCH: {{repository.branch}}
               GEODE_FORK: {{repository.fork}}
               GCP_PROJECT: ((gcp-project))
+              GCP_NETWORK: ((gcp-network))
+              GCP_SUBNETWORK: ((gcp-subnet))
+              GCP_ZONE: ((gcp-zone))
               RAM: {{test.RAM}}
               JAVA_BUILD_VERSION: {{ java_build_version.version }}
               JAVA_TEST_VERSION: {{ java_test_version.version }}