Skip to content

Commit

Permalink
Final Pom Alignment for CI/CD (Activiti#1996)
Browse files Browse the repository at this point in the history
pom refactoring and refinements to keep properties local to repo
  • Loading branch information
salaboy authored and ryandawsonuk committed Sep 20, 2018
1 parent c02fb53 commit b704314
Show file tree
Hide file tree
Showing 14 changed files with 528 additions and 48 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ target

.factorypath
.springBeans

# Updatebot
.updatebot-repos
.updatebot-repos/**
5 changes: 5 additions & 0 deletions .updatebot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
github:
organisations:
- name: activiti
repositories:
- name: activiti-dependencies
79 changes: 79 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
pipeline {
agent {
label "jenkins-maven"
}
environment {
ORG = 'activiti'
APP_NAME = 'activiti'
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 "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)"
}
dir ('./charts/activiti') {
container('maven') {
sh "make tag"
}
}
container('maven') {
sh 'mvn clean deploy'

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:activiti-core-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"""
}
}
}
2 changes: 1 addition & 1 deletion activiti-api-impl/activiti-api-model-shared-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-impl</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
Expand Down
4 changes: 2 additions & 2 deletions activiti-api-impl/activiti-api-process-model-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-impl</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
Expand All @@ -35,7 +35,7 @@
<artifactId>activiti-api-process-model</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-model-shared-impl</artifactId>
</dependency>
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions activiti-api-impl/activiti-api-process-runtime-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-impl</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
Expand All @@ -23,15 +23,15 @@
<artifactId>activiti-api-model-shared</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-model-shared-impl</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<artifactId>activiti-api-runtime-shared</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-runtime-shared-impl</artifactId>
</dependency>
<dependency>
Expand All @@ -43,7 +43,7 @@
<artifactId>activiti-api-process-model</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-process-model-impl</artifactId>
</dependency>
<dependency>
Expand Down
8 changes: 2 additions & 6 deletions activiti-api-impl/activiti-api-runtime-shared-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-impl</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
Expand All @@ -19,13 +19,9 @@
<artifactId>activiti-api-model-shared</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-model-shared-impl</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<artifactId>activiti-api-model-shared</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions activiti-api-impl/activiti-api-task-model-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-impl</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
Expand All @@ -19,7 +19,7 @@
<artifactId>activiti-api-model-shared</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-model-shared-impl</artifactId>
</dependency>
<dependency>
Expand Down
20 changes: 4 additions & 16 deletions activiti-api-impl/activiti-api-task-runtime-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-impl</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
Expand All @@ -15,7 +15,7 @@
<artifactId>activiti-api-model-shared</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-model-shared-impl</artifactId>
</dependency>
<dependency>
Expand All @@ -31,23 +31,11 @@
<artifactId>activiti-api-task-runtime</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<artifactId>activiti-api-task-model</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<artifactId>activiti-api-runtime-shared</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<artifactId>activiti-api-model-shared</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-runtime-shared-impl</artifactId>
</dependency>
<dependency>
<groupId>org.activiti.api</groupId>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-task-model-impl</artifactId>
</dependency>
<dependency>
Expand Down
1 change: 0 additions & 1 deletion activiti-api-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<artifactId>activiti-root</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
<groupId>org.activiti.api</groupId>
<artifactId>activiti-api-impl</artifactId>
<name>Activiti :: Runtime API Parent</name>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion activiti-bpmn-layout/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>com.github.jgraph</groupId>
<groupId>com.github.vlsi.mxgraph</groupId>
<artifactId>jgraphx</artifactId>
</dependency>
<dependency>
Expand Down
125 changes: 125 additions & 0 deletions activiti-core-dependencies/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.activiti</groupId>
<artifactId>activiti-root</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
<artifactId>activiti-core-dependencies</artifactId>
<packaging>pom</packaging>
<name>Activiti :: Dependencies BOM (Bill Of Materials)</name>
<dependencyManagement>
<dependencies>
<!-- Activiti Modules for managed dependencies -->
<dependency>
<groupId>org.activiti.api</groupId>
<artifactId>activiti-api-dependencies</artifactId>
<version>${activiti-api.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-impl</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-model-shared-impl</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-runtime-shared-impl</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-identity-basic</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-process-model-impl</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-process-runtime-impl</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-task-model-impl</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-api-task-runtime-impl</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-identity</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-security</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-security-policies</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-bpmn-model</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-image-generator</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-bpmn-converter</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-json-converter</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-bpmn-layout</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-process-validation</artifactId>
<version>${activiti.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Loading

0 comments on commit b704314

Please sign in to comment.