You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2018/09/14 21:01:18 UTC

[geode] branch develop updated: GEODE-5722 - Improve concourse deployment experience for releases (#2451)

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

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new e88918c  GEODE-5722 - Improve concourse deployment experience for releases (#2451)
e88918c is described below

commit e88918cd24552d49d91b019c6cc01369617317c7
Author: Robert Houghton <rh...@pivotal.io>
AuthorDate: Fri Sep 14 14:01:07 2018 -0700

    GEODE-5722 - Improve concourse deployment experience for releases (#2451)
    
    Automatically start the meta-mini-image job on deployment
    Disable/pause jobs that are unused in release
    DRY the sanitization utility across scripts
    Expose the main pipeline from a deployment from apache
    
    Co-authored-by: Robert Houghton <rh...@pivotal.io>
    Co-authored-by: Dick Cavender <dc...@pivotal.io>
---
 ci/pipelines/geode-build/deploy_pipeline.sh |  3 +++
 ci/pipelines/meta/deploy_meta.sh            | 28 +++++++++++++++++++++-------
 ci/pipelines/shared/utilities.sh            |  8 ++++++--
 ci/scripts/start_instance.sh                | 10 ++++------
 4 files changed, 34 insertions(+), 15 deletions(-)

diff --git a/ci/pipelines/geode-build/deploy_pipeline.sh b/ci/pipelines/geode-build/deploy_pipeline.sh
index 6623a9f..e17478e 100755
--- a/ci/pipelines/geode-build/deploy_pipeline.sh
+++ b/ci/pipelines/geode-build/deploy_pipeline.sh
@@ -84,4 +84,7 @@ pushd ${SCRIPTDIR} 2>&1 > /dev/null
     --var docker-image-prefix=${DOCKER_IMAGE_PREFIX} \
     --config ${SCRIPTDIR}/generated-pipeline.yml
 
+  if [[ "${SANITIZED_GEODE_FORK}" == "apache" ]]; then
+    fly -t ${TARGET} expose-pipeline -p ${PIPELINE_NAME}
+  fi
 popd 2>&1 > /dev/null
diff --git a/ci/pipelines/meta/deploy_meta.sh b/ci/pipelines/meta/deploy_meta.sh
index 1983dcd..f2f2178 100755
--- a/ci/pipelines/meta/deploy_meta.sh
+++ b/ci/pipelines/meta/deploy_meta.sh
@@ -77,15 +77,29 @@ fi
 
 if [[ "${GEODE_FORK}" != "apache" ]]; then
   echo "Disabling unnecessary jobs for forks."
-  set -x
   for job in set set-images set-reaper; do
+    set -x
     fly -t ${TARGET} pause-job \
         -j ${META_PIPELINE}/${job}-pipeline
+    set +x
+  done
+else
+  echo "Disabling unnecessary jobs for release branches."
+  echo "*** DO NOT RE-ENABLE THESE META-JOBS ***"
+  for job in set set-pr set-images set-reaper set-metrics set-examples; do
+    set -x
+    fly -t ${TARGET} pause-job \
+        -j ${META_PIPELINE}/${job}-pipeline
+    set +x
   done
-
-  fly -t ${TARGET} trigger-job \
-      -j ${META_PIPELINE}/build-meta-mini-docker-image
-  fly -t ${TARGET} unpause-pipeline \
-      -p ${META_PIPELINE}
-  set +x
 fi
+
+set -x
+fly -t ${TARGET} trigger-job \
+    -j ${META_PIPELINE}/build-meta-mini-docker-image
+fly -t ${TARGET} unpause-pipeline \
+    -p ${META_PIPELINE}
+
+set +x
+
+echo "When 'build-meta-mini-docker-image' job is complete, manually unpause and trigger 'set-pipeline'."
\ No newline at end of file
diff --git a/ci/pipelines/shared/utilities.sh b/ci/pipelines/shared/utilities.sh
index 1fa9a25..152ffb0 100644
--- a/ci/pipelines/shared/utilities.sh
+++ b/ci/pipelines/shared/utilities.sh
@@ -17,10 +17,14 @@
 # limitations under the License.
 
 
+sanitizeName() {
+  echo ${1} | tr "._/" "-" | tr '[:upper:]' '[:lower:]'
+}
+
 getSanitizedBranch () {
-  echo ${1} | tr "_/" "-" | tr '[:upper:]' '[:lower:]' | cut -c 1-20
+  echo $(sanitizeName ${1}) | cut -c 1-20
 }
 
 getSanitizedFork () {
-  echo ${1} | tr "_/" "-" | tr '[:upper:]' '[:lower:]' | cut -c 1-16
+  echo $(sanitizeName ${1}) | cut -c 1-16
 }
diff --git a/ci/scripts/start_instance.sh b/ci/scripts/start_instance.sh
index 3084b00..f7fd774 100755
--- a/ci/scripts/start_instance.sh
+++ b/ci/scripts/start_instance.sh
@@ -44,15 +44,13 @@ if [[ -z "${GEODE_BRANCH}" ]]; then
 fi
 
 
-
-
 . ${SCRIPTDIR}/../pipelines/shared/utilities.sh
 SANITIZED_GEODE_BRANCH=$(getSanitizedBranch ${GEODE_BRANCH})
 SANITIZED_GEODE_FORK=$(getSanitizedFork ${GEODE_FORK})
 
-SANITIZED_BUILD_PIPELINE_NAME=$(echo ${BUILD_PIPELINE_NAME} | tr "/" "-" | tr '[:upper:]' '[:lower:]')
-SANITIZED_BUILD_JOB_NAME=$(echo ${BUILD_JOB_NAME} | tr "/" "-" | tr '[:upper:]' '[:lower:]')
-SANITIZED_BUILD_NAME=$(echo ${BUILD_NAME} | tr "/" "-" | tr '[:upper:]' '[:lower:]')
+SANITIZED_BUILD_PIPELINE_NAME=$(sanitizeName ${BUILD_PIPELINE_NAME})
+SANITIZED_BUILD_JOB_NAME=$(sanitizeName ${BUILD_JOB_NAME})
+SANITIZED_BUILD_NAME=$(sanitizeName ${BUILD_NAME})
 IMAGE_FAMILY_PREFIX=""
 WINDOWS_PREFIX=""
 
@@ -64,7 +62,7 @@ if [[ "${SANITIZED_BUILD_JOB_NAME}" =~ [Ww]indows ]]; then
   WINDOWS_PREFIX="windows-"
 fi
 
-INSTANCE_NAME="$(echo "${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}" | tr '[:upper:]' '[:lower:]')"
+INSTANCE_NAME=$(sanitizeName "${BUILD_PIPELINE_NAME}-${BUILD_JOB_NAME}-${BUILD_NAME}")
 PROJECT=apachegeode-ci
 ZONE=us-central1-f
 echo "${INSTANCE_NAME}" > "instance-data/instance-name"