Skip to content

Commit c283805

Browse files
authored
Merge pull request #9 from PublicisSapient/test-github-actions
Test GitHub actions
2 parents a68d626 + 5387c5b commit c283805

File tree

16 files changed

+28
-42
lines changed

16 files changed

+28
-42
lines changed

.github/workflows/Processors_CI_Workflow.yaml

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -49,51 +49,37 @@ jobs:
4949
5050
- name: Clone & Build knowhow-common dependency
5151
run: |
52-
ls -R
53-
git clone https://github.com/PublicisSapient/knowhow-common.git
52+
git clone --branch ${{ github.event.pull_request.base.ref }} https://github.com/PublicisSapient/knowhow-common.git
5453
cd knowhow-common
55-
ls -R
5654
mvn clean install -Ddockerfile.skip=true -X
57-
sudo apt-get update && sudo apt-get install -y libxml2-utils
58-
# Get version from knowhow-common pom.xml
59-
cd ..
60-
COMMON_VERSION=$(xmllint --xpath "string(//project/version)" knowhow-common/pom.xml)
61-
echo "Using common version: $COMMON_VERSION"
62-
63-
# Inject into dependencyManagement block in jira-processor/pom.xml
64-
sed -i "s|<version>.*</version>|<version>$COMMON_VERSION</version>|" \
65-
$(find . -name pom.xml | grep jira-processor | head -n 1)
6655
67-
# - name: Extract common version and inject into Jira pom
68-
# run: |
69-
# sudo apt-get update && sudo apt-get install -y libxml2-utils
70-
# # Get version from knowhow-common pom.xml
71-
# cd knowhow-common
72-
# COMMON_VERSION=$(xmllint --xpath "string(//project/version)" knowhow-common/pom.xml)
73-
# echo "Using common version: $COMMON_VERSION"
74-
75-
# # Inject into dependencyManagement block in jira-processor/pom.xml
76-
# sed -i "s|<version>.*</version>|<version>$COMMON_VERSION</version>|" \
77-
# $(find . -name pom.xml | grep jira-processor | head -n 1)
56+
- name: Get common version using Maven Help Plugin
57+
run: |
58+
cd knowhow-common
59+
COMMON_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
60+
echo "COMMON_VERSION=$COMMON_VERSION"
61+
echo "COMMON_VERSION=$COMMON_VERSION" >> $GITHUB_ENV
7862
7963
- name: Build & Test Jira Processor
80-
run: mvn clean install -Pjira-processor -Ddockerfile.skip=true
64+
run: |
65+
mvn clean install -Pjira-processor -Ddockerfile.skip=true -Dcommon.version=$COMMON_VERSION
8166
8267
- name: Build & Test Azure Board Processor
83-
run: mvn clean install -Pazure-board-processor -Ddockerfile.skip=true
68+
run: mvn clean install -Pazure-board-processor -Ddockerfile.skip=true -Dcommon.version=$COMMON_VERSION
8469

8570
- name: Build & Test DevOps Processor
86-
run: mvn clean install -Pdevops-processor -Ddockerfile.skip=true
71+
run: mvn clean install -Pdevops-processor -Ddockerfile.skip=true -Dcommon.version=$COMMON_VERSION
8772

8873
- name: Build & Test Azure Pipeline Repo Processor
89-
run: mvn clean install -Pazure-pipeline-repo -Ddockerfile.skip=true
74+
run: mvn clean install -Pazure-pipeline-repo -Ddockerfile.skip=true -Dcommon.version=$COMMON_VERSION
9075

9176
- name: SonarQube Analysis - Processors
9277
run: |
9378
mvn sonar:sonar -Dsonar.projectKey=ENGINEERING.KPIDASHBOARD.PROCESSORS \
9479
-Dsonar.projectName=ENGINEERING.KPIDASHBOARD.PROCESSORS \
9580
-Dsonar.branch.name=${{ env.GITHUB_HEAD_NAME }} \
9681
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \
82+
-Dcommon.version=$COMMON_VERSION \
9783
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} -f pom.xml
9884
9985
- name: Check SonarQube Quality Gate - Processors

argocd/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<dependency>
5656
<groupId>com.publicissapient.kpidashboard</groupId>
5757
<artifactId>common</artifactId>
58-
<version>${project.version}</version>
58+
<version>${common.version}</version>
5959
</dependency>
6060
<dependency>
6161
<groupId>org.projectlombok</groupId>

azure-boards/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<dependency>
5858
<groupId>com.publicissapient.kpidashboard</groupId>
5959
<artifactId>common</artifactId>
60-
<version>${project.version}</version>
60+
<version>${common.version}</version>
6161
<scope>compile</scope>
6262
<exclusions>
6363
<exclusion>

azure-pipeline/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<dependency>
6060
<groupId>com.publicissapient.kpidashboard</groupId>
6161
<artifactId>common</artifactId>
62-
<version>${project.version}</version>
62+
<version>${common.version}</version>
6363
<exclusions>
6464
<exclusion>
6565
<groupId>ch.qos.logback</groupId>

azure-repo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<dependency>
5151
<groupId>com.publicissapient.kpidashboard</groupId>
5252
<artifactId>common</artifactId>
53-
<version>${project.version}</version>
53+
<version>${common.version}</version>
5454
<exclusions>
5555
<exclusion>
5656
<groupId>ch.qos.logback</groupId>

bamboo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<dependency>
6262
<groupId>com.publicissapient.kpidashboard</groupId>
6363
<artifactId>common</artifactId>
64-
<version>${project.version}</version>
64+
<version>${common.version}</version>
6565
<exclusions>
6666
<exclusion>
6767
<groupId>ch.qos.logback</groupId>

bitbucket/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<dependency>
5858
<groupId>com.publicissapient.kpidashboard</groupId>
5959
<artifactId>common</artifactId>
60-
<version>${project.version}</version>
60+
<version>${common.version}</version>
6161
<exclusions>
6262
<exclusion>
6363
<groupId>ch.qos.logback</groupId>

github-action/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<dependency>
5656
<groupId>com.publicissapient.kpidashboard</groupId>
5757
<artifactId>common</artifactId>
58-
<version>${project.version}</version>
58+
<version>${common.version}</version>
5959
<exclusions>
6060
<exclusion>
6161
<groupId>ch.qos.logback</groupId>

github/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<dependency>
5656
<groupId>com.publicissapient.kpidashboard</groupId>
5757
<artifactId>common</artifactId>
58-
<version>${project.version}</version>
58+
<version>${common.version}</version>
5959
<exclusions>
6060
<exclusion>
6161
<groupId>ch.qos.logback</groupId>

gitlab/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<dependency>
5757
<groupId>com.publicissapient.kpidashboard</groupId>
5858
<artifactId>common</artifactId>
59-
<version>${project.version}</version>
59+
<version>${common.version}</version>
6060
<exclusions>
6161
<exclusion>
6262
<groupId>ch.qos.logback</groupId>

0 commit comments

Comments
 (0)