From 9c8c6b262899077f035892d959a7b1d15b84d520 Mon Sep 17 00:00:00 2001 From: BoykoAlex Date: Wed, 13 Mar 2019 17:09:21 -0400 Subject: [PATCH] PT #164169543: Add Theia RC jobs --- concourse/pipeline.yml | 181 +++++++++++++++++++++++++++++ concourse/tasks/theia-rc-build.sh | 41 +++++++ concourse/tasks/theia-rc-build.yml | 16 +++ 3 files changed, 238 insertions(+) create mode 100755 concourse/tasks/theia-rc-build.sh create mode 100644 concourse/tasks/theia-rc-build.yml diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 9815d5e6e..7a7131a11 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -252,6 +252,16 @@ resources: secret_access_key: ((s3_secretkey)) region_name: ((s3_region)) initial_version: 0.0.5-RC.6 +- name: theia-version + type: semver + source: + driver: s3 + bucket: ((s3_bucket)) + key: versions/theia-extensions + access_key_id: ((s3_accesskey)) + secret_access_key: ((s3_secretkey)) + region_name: ((s3_region)) + initial_version: 0.0.3 ######################################################################################## jobs: - name: build-docker-image @@ -377,6 +387,23 @@ jobs: only_tag: true tag_prefix: V_ tag: version/version +- name: trigger-theia-rc-build + serial: true + plan: + - aggregate: + - get: sts4 + passed: + - build-cf-manifest-yaml-theia-snapshot + - build-concourse-theia-snapshot + - build-bosh-theia-snapshot + - build-spring-boot-theia-snapshot + - do: + - get: theia-version + params: + pre: RC + - put: theia-version + params: + file: theia-version/theia-version - name: build-bosh-theia-snapshot plan: - aggregate: @@ -646,6 +673,149 @@ jobs: • + +- name: build-theia-concourse-rc + plan: + - aggregate: + - get: maven-cache + passed: + - build-concourse-theia-snapshot + - get: sts4 + passed: + - trigger-theia-rc-build + - get: theia-version + trigger: true + passed: + - trigger-theia-rc-build + - task: build-theia-concourse-rc + file: sts4/concourse/tasks/theia-rc-build.yml + params: + extension_id: concourse + on_failure: + put: slack-notification + params: + text: | + Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed! + - put: s3-concourse-theia-snapshot + params: + file: out/*-concourse-*.tgz + acl: public-read + on_success: + put: slack-notification + params: + channel: "#tools-team-internal" + text_file: s3-concourse-theia-snapshot/url + icon_url: https://raw.githubusercontent.com/spring-projects/sts4/master/vscode-extensions/vscode-concourse/icon.png + text: | + Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has succeed! + Release candidate available for testing $TEXT_FILE_CONTENT +- name: build-theia-cf-manifest-yaml-rc + plan: + - aggregate: + - get: maven-cache + passed: + - build-cf-manifest-yaml-theia-snapshot + - get: sts4 + passed: + - trigger-theia-rc-build + - get: theia-version + trigger: true + passed: + - trigger-theia-rc-build + - task: build-theia-cf-manifest-yaml-rc + file: sts4/concourse/tasks/theia-rc-build.yml + params: + extension_id: cf-manifest-yaml + on_failure: + put: slack-notification + params: + text: | + Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed! + - put: s3-cf-manifest-yaml-theia-snapshot + params: + file: out/*-cf-manifest-yaml-*.tgz + acl: public-read + on_success: + put: slack-notification + params: + channel: "#tools-team-internal" + text_file: s3-cf-manifest-yaml-theia-snapshot/url + icon_url: https://raw.githubusercontent.com/spring-projects/sts4/master/vscode-extensions/vscode-manifest-yaml/icon.png + text: | + Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has succeed! + Release candidate available for testing $TEXT_FILE_CONTENT +- name: build-theia-bosh-rc + plan: + - aggregate: + - get: maven-cache + passed: + - build-bosh-theia-snapshot + - get: sts4 + passed: + - trigger-theia-rc-build + - get: theia-version + trigger: true + passed: + - trigger-theia-rc-build + - task: build-theia-bosh-rc + file: sts4/concourse/tasks/theia-rc-build.yml + params: + extension_id: bosh + on_failure: + put: slack-notification + params: + text: | + Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed! + - put: s3-bosh-theia-snapshot + params: + file: out/*-bosh-*.tgz + acl: public-read + on_success: + put: slack-notification + params: + channel: "#tools-team-internal" + text_file: s3-bosh-theia-snapshot/url + icon_url: https://raw.githubusercontent.com/spring-projects/sts4/master/vscode-extensions/vscode-concourse/icon.png + text: | + Build ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has succeed! + Release candidate available for testing $TEXT_FILE_CONTENT +- name: build-theia-spring-boot-rc + plan: + - aggregate: + - get: maven-cache + passed: + - build-spring-boot-theia-snapshot + - get: sts4 + passed: + - trigger-theia-rc-build + - get: theia-version + trigger: true + passed: + - trigger-theia-rc-build + - task: build-theia-spring-boot-rc + attempts: 4 + file: sts4/concourse/tasks/theia-rc-build.yml + params: + extension_id: spring-boot + on_failure: + put: slack-notification + params: + text: | + Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed! + - put: s3-spring-boot-theia-snapshot + params: + file: out/*-spring-boot-*.tgz + acl: public-read + on_success: + put: slack-notification + params: + channel: "#tools-team-internal" + text_file: s3-spring-boot-theia-snapshot/url + icon_url: https://raw.githubusercontent.com/spring-projects/sts4/master/vscode-extensions/vscode-spring-boot/spring-boot-logo.png + text: | + Build ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has succeed! + Release candidate available for testing $TEXT_FILE_CONTENT + - name: build-concourse-rc plan: - aggregate: @@ -1214,6 +1384,17 @@ groups: - build-cf-manifest-yaml-theia-snapshot - build-concourse-theia-snapshot - build-spring-boot-theia-snapshot +- name: theia-release + jobs: + - build-theia-bosh-rc + - build-theia-concourse-rc + - build-theia-cf-manifest-yaml-rc + - build-theia-spring-boot-rc + - trigger-theia-rc-build + - build-cf-manifest-yaml-theia-snapshot + - build-concourse-theia-snapshot + - build-bosh-theia-snapshot + - build-spring-boot-theia-snapshot - name: setup jobs: - build-mvn-cache diff --git a/concourse/tasks/theia-rc-build.sh b/concourse/tasks/theia-rc-build.sh new file mode 100755 index 000000000..e1e62398b --- /dev/null +++ b/concourse/tasks/theia-rc-build.sh @@ -0,0 +1,41 @@ +#!/bin/bash +set -e + +# Build an rc .tar.gz file, ready to be published to NPM. +# +# An RC is built in a similar way as a snaphsot, except that +# we package it as a tar.gz file +# This is so that, if this candidate is aproved for publication, +# then the tar.gz can be published to NPM (i.e. +# without requiring another rebuild/repackaging to change it) + +workdir=`pwd` +sources=$workdir/sts4/theia-extensions/theia-$extension_id +ext_sources=$workdir/sts4/theia-extensions/theia-$extension_id/$extension_id + +version=`cat theia-version/theia-version` +echo "extension_id=${extension_id}" +echo "version=${version}" + +if [ -d "maven-cache" ]; then + echo "Prepopulating maven cache" + tar xzf maven-cache/*.tar.gz -C ${HOME} +else + echo "!!!No stored maven cache found!!! " + exit -1 +fi + +cd ${ext_sources} +npm version "${version%-*}" || true +echo "Version set to " `npm version` + +cd ${sources} +./build.sh + +cd ${ext_sources} +yarn pack + +#Because the RC was with a unqualified version... +#The RC version qualifier isn't automaticlaly present in the file name. +#So we must explicitly rename the file to include the RC version qualifier. +cp *.tgz $workdir/out/theia-$extension_id-${version}.tgz diff --git a/concourse/tasks/theia-rc-build.yml b/concourse/tasks/theia-rc-build.yml new file mode 100644 index 000000000..94f124530 --- /dev/null +++ b/concourse/tasks/theia-rc-build.yml @@ -0,0 +1,16 @@ +inputs: +- name: sts4 +- name: maven-cache +- name: theia-version +outputs: +- name: out +platform: linux +run: + path: sts4/concourse/tasks/theia-rc-build.sh +params: + extension_id: undefined_extension_id +image_resource: + type: docker-image + source: + repository: kdvolder/sts4-build-env + \ No newline at end of file