Skip to content

Commit

Permalink
BDE-209: Trigger a release on tags vX.X.X
Browse files Browse the repository at this point in the history
  • Loading branch information
glefevre committed Dec 7, 2021
1 parent d15d1e9 commit 66bac1f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
7 changes: 6 additions & 1 deletion .lighthouse/jenkins-x/triggers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ spec:
rerun_command: "/retest"
source: "jenkins-trigger.yaml"
postsubmits:
- name: master
context: "master"
source: "jenkins-trigger.yaml"
branches:
- ^master$
- name: release
context: "release"
source: "jenkins-trigger.yaml"
branches:
- ^master$
- ^v[0-9]+.[0-9]+.[0-9]+$
3 changes: 1 addition & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

def volumeName = env.JOB_NAME.replaceAll('/','-').toLowerCase()

def pullRequestLabels = []

def containerScript = ""

bootstrapTemplate = readTrusted('Jenkinsfile-pod.yaml')
Expand Down Expand Up @@ -67,6 +65,7 @@ pipeline {
}
}
container('maven') {
sh 'jx gitops git setup'
sh 'rm -fr .tmp && make workspace'
}
}
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ include make.d/nexus.mk

in-ci ?= $(in-cluster)



workspace: ## setup workspace, including npm and environment variables

install-and-build: install build
Expand All @@ -26,18 +28,16 @@ test:
gulp-command = npx gulp

release: ## Make release
release: set-version create-release
release: version~print create-release

set-version: # Create a change-set and tag it (version can be overridden with `version-tag=vX.X.X`).
set-version: $(call version-if-release,,set-version~do)

set-version~do:
@: $(info Set version $(version-tag))
export TAG_VERSION = $(version-tag)
create-release: export TAG_VERSION=$(version)

create-release:
@: $(info Create release $(version-tag))
$(gulp-command) release

publish-release-gh: export GITHUB_USER=$(git-github-username)
publish-release-gh: export GITHUB_TOKEN=$(git-github-password)

publish-release-gh:
gh release create $(version-tag) ./package/*/*.zip --title 'Nuxeo Browser Extension ${version-tag}' -n ' Release Note - Browser Developer Extensions - Version $(version-tag)'
2 changes: 1 addition & 1 deletion make.d

0 comments on commit 66bac1f

Please sign in to comment.