提交 17fe1ec8 编写于 作者: S salaboy

adding pipeline before jx import

上级 65e2bc16
pipeline {
agent {
label "jenkins-maven"
}
environment {
ORG = 'activiti'
APP_NAME = 'activiti-core-common'
CHARTMUSEUM_CREDS = credentials('jenkins-x-chartmuseum')
}
stages {
stage('CI Build and push snapshot') {
when {
branch 'PR-*'
}
environment {
PREVIEW_VERSION = "0.0.0-SNAPSHOT-$BRANCH_NAME-$BUILD_NUMBER"
PREVIEW_NAMESPACE = "$APP_NAME-$BRANCH_NAME".toLowerCase()
HELM_RELEASE = "$PREVIEW_NAMESPACE".toLowerCase()
}
steps {
container('maven') {
sh "mvn versions:set -DnewVersion=$PREVIEW_VERSION"
sh "mvn install"
sh 'export VERSION=$PREVIEW_VERSION'
}
}
}
stage('Build Release') {
when {
branch 'develop'
}
steps {
container('maven') {
// ensure we're not on a detached head
sh "git checkout develop"
sh "git config --global credential.helper store"
sh "jx step git credentials"
// so we can retrieve the version in later steps
sh "echo \$(jx-release-version) > VERSION"
sh "mvn versions:set -DnewVersion=\$(cat VERSION)"
sh 'mvn clean verify'
sh "git add --all"
sh "git commit -m \"Release \$(cat VERSION)\" --allow-empty"
sh "git tag -fa v\$(cat VERSION) -m \"Release version \$(cat VERSION)\""
sh "git push origin v\$(cat VERSION)"
}
container('maven') {
sh 'mvn clean deploy -DskipTests'
sh 'export VERSION=`cat VERSION`'
sh "git config --global credential.helper store"
sh "jx step git credentials"
sh "updatebot push-version --kind maven org.activiti.core.common:activiti-core-common-dependencies \$(cat VERSION) --merge false"
sh "updatebot update --merge false"
}
}
}
stage('Build Release from Tag') {
when {
tag '*RELEASE'
}
steps {
container('maven') {
// ensure we're not on a detached head
sh "git checkout $TAG_NAME"
sh "git config --global credential.helper store"
sh "jx step git credentials"
// so we can retrieve the version in later steps
sh "echo \$TAG_NAME > VERSION"
sh "mvn versions:set -DnewVersion=\$(cat VERSION)"
}
container('maven') {
sh '''
mvn clean deploy -P !alfresco -P central
'''
sh 'export VERSION=`cat VERSION`'
sh "git config --global credential.helper store"
sh "jx step git credentials"
sh "echo pushing with update using version \$(cat VERSION)"
sh "updatebot push-version --kind maven org.activiti.core.common:activiti-core-common-dependencies \$(cat VERSION)"
}
}
}
}
post {
always {
cleanWs()
}
failure {
input """Pipeline failed.
We will keep the build pod around to help you diagnose any failures.
Select Proceed or Abort to terminate the build pod"""
}
}
}
......@@ -17,8 +17,8 @@
<url>http://activiti.org</url>
<properties>
<activiti-build.version>7.0.39</activiti-build.version>
<activiti-api.version>7.0.33</activiti-api.version>
<activiti-core-common.version>${project.version}</activiti-core-common.version>
<activiti-api.version>${project.version}</activiti-api.version>
</properties>
<dependencyManagement>
<dependencies>
......@@ -29,8 +29,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Activiti Modules for managed dependencies -->
<!-- This duplicates activiti-dependencies module but we can't import that module here as this is its parent-->
<dependency>
<groupId>org.activiti.api</groupId>
<artifactId>activiti-api-dependencies</artifactId>
......@@ -38,6 +36,8 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Activiti Modules for managed dependencies -->
<!-- This duplicates activiti-core-common-dependencies module but we can't import that module here as this is its parent-->
<dependency>
<groupId>org.activiti.core.common</groupId>
<artifactId>activiti-connector-model</artifactId>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册