Try adding some 'RC build' mechanics to pipeline
This commit is contained in:
@@ -25,6 +25,12 @@ resources:
|
||||
uri: git@github.com:spring-projects/sts4.git
|
||||
branch: {{branch}}
|
||||
private_key: {{rsa_id}}
|
||||
- name: sts4-out
|
||||
type: git
|
||||
source:
|
||||
uri: git@github.com:spring-projects/sts4.git
|
||||
branch: {{branch}}
|
||||
private_key: {{rsa_id}}
|
||||
- name: s3-boot-properties-vsix-snapshot
|
||||
type: s3
|
||||
source:
|
||||
@@ -85,6 +91,16 @@ resources:
|
||||
secret_access_key: {{s3_secretkey}}
|
||||
region_name: {{s3_region}}
|
||||
regexp: mvn-caches/sts4-(.*).tar.gz
|
||||
- name: version
|
||||
type: semver
|
||||
source:
|
||||
driver: s3
|
||||
bucket: {{s3_bucket}}
|
||||
key: versions/vscode-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
|
||||
@@ -183,25 +199,62 @@ jobs:
|
||||
params:
|
||||
file: out/vscode-manifest-yaml-*.vsix
|
||||
acl: public-read
|
||||
#### Disabled, release process needs be reworked and the stuff below is untrustworthy after a
|
||||
#### bunch of changes were made to the pipeline.
|
||||
# - name: trigger-manifest-yaml-rc-build
|
||||
# plan:
|
||||
# - get: sts4
|
||||
# passed:
|
||||
# - build-snapshot-website
|
||||
# - get: s3-manifest-yaml-vsix-snapshot
|
||||
# passed:
|
||||
# - build-snapshot-website
|
||||
# - task: trigger-manifest-yaml-rc-build
|
||||
# file: sts4/concourse/tasks/create-rc-build-tag.yml
|
||||
# params:
|
||||
# extension_id: vscode-manifest-yaml
|
||||
# - put: sts4-out
|
||||
# params:
|
||||
# repository: sts4
|
||||
# tag: out/tag
|
||||
# only_tag: true
|
||||
- name: trigger-rc-build
|
||||
serial: true
|
||||
plan:
|
||||
- aggregate:
|
||||
- get: sts4
|
||||
passed:
|
||||
- build-manifest-yaml-vsix-snapshot
|
||||
- build-consourse-vsix-snapshot
|
||||
- do:
|
||||
- get: version
|
||||
params:
|
||||
bump: patch
|
||||
pre: RC
|
||||
- put: version
|
||||
params:
|
||||
file: version/version
|
||||
- put: sts4-out
|
||||
params:
|
||||
repository: sts4
|
||||
only_tag: true
|
||||
tag_prefix: V_
|
||||
tag: version/version
|
||||
- name: build-manifest-yaml-rc
|
||||
plan:
|
||||
- aggregate:
|
||||
- get: maven-cache
|
||||
passed:
|
||||
- build-manifest-yaml-vsix-snapshot
|
||||
- get: sts4
|
||||
passed:
|
||||
- trigger-rc-build
|
||||
- get: version
|
||||
trigger: true
|
||||
passed:
|
||||
- trigger-rc-build
|
||||
- task: build-manifest-yaml-rc
|
||||
file: sts4/concourse/tasks/versioned-build.yml
|
||||
params:
|
||||
extension_id: vscode-manifest-yaml
|
||||
on_failure:
|
||||
put: slack-notification
|
||||
params:
|
||||
text: |
|
||||
Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed!
|
||||
- put: s3-manifest-yaml-vsix-snapshot
|
||||
params:
|
||||
file: out/vscode-manifest-yaml-*.vsix
|
||||
acl: public-read
|
||||
on_success:
|
||||
put: slack-notification
|
||||
params:
|
||||
text_file: s3-vscode-manifest-yaml-vsix/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-snapshot-website
|
||||
serial: true
|
||||
plan:
|
||||
@@ -227,10 +280,4 @@ jobs:
|
||||
file: sts4/concourse/tasks/build-website.yml
|
||||
- put: snapshot-website
|
||||
params:
|
||||
path: website
|
||||
# on_success:
|
||||
# put: slack-notification
|
||||
# params:
|
||||
# text: |
|
||||
# SUCCESS Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME}!
|
||||
# New snapshots available at http://dist.springsource.com/snapshot/STS4/nightly-distributions.html
|
||||
path: website
|
||||
@@ -11,9 +11,9 @@ def replace(infile, outfile, findword, replaceword):
|
||||
branch = os.popen("git rev-parse --abbrev-ref HEAD").read().strip()
|
||||
|
||||
if branch == 'master':
|
||||
os.system('''fly -t tools set-pipeline --load-vars-from ${HOME}/.sts4-concourse-credentials.yml
|
||||
--var "branch=${branch}"
|
||||
-p sts4-${branch} -c pipeline.yml''')
|
||||
os.system('fly -t tools set-pipeline --load-vars-from ${HOME}/.sts4-concourse-credentials.yml '+
|
||||
' --var "branch=' + branch + '" ' +
|
||||
' -p sts4-'+ branch +' -c pipeline.yml')
|
||||
else:
|
||||
fname = "pipeline-"+branch+".yml"
|
||||
replace("pipeline.yml", "pipeline-"+branch+".yml", "snapshot", branch)
|
||||
|
||||
16
concourse/tasks/versioned-build.yml
Normal file
16
concourse/tasks/versioned-build.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
inputs:
|
||||
- name: sts4
|
||||
- name: maven-cache
|
||||
- name: version
|
||||
outputs:
|
||||
- name: out
|
||||
platform: linux
|
||||
run:
|
||||
path: sts4/concourse/tasks/versioned-build.sh
|
||||
params:
|
||||
extension_id: undefined_extension_id
|
||||
image_resource:
|
||||
type: docker-image
|
||||
source:
|
||||
repository: kdvolder/sts4-build-env
|
||||
|
||||
33
concourse/tasks/versioned_build.sh
Executable file
33
concourse/tasks/versioned_build.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
workdir=`pwd`
|
||||
sources=$workdir/sts4/vscode-extensions/$extension_id
|
||||
|
||||
version= `cat version/version`
|
||||
echo "extension_id=${extension_id}"
|
||||
echo "version=${version}"
|
||||
|
||||
cd "sts4/vscode-extensions/${extension_id}"
|
||||
npm version "${version}"
|
||||
echo "Version set to " `npm version`
|
||||
echo -e "\n\n*Version: ${version}*" >> README.md
|
||||
|
||||
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
|
||||
|
||||
# Build commons vscode
|
||||
cd ${sources}/../commons-vscode
|
||||
npm install
|
||||
|
||||
cd "$sources"
|
||||
npm install ../commons-vscode
|
||||
npm install
|
||||
npm run vsce-package
|
||||
|
||||
cp *.vsix $workdir/out
|
||||
Reference in New Issue
Block a user