Skip to content

Commit 7edf33b

Browse files
authored
Merge pull request #11 from PublicisSapient/develop
Develop
2 parents b6ec254 + 73673b5 commit 7edf33b

File tree

25 files changed

+720
-19
lines changed

25 files changed

+720
-19
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Global rule:
2+
* @brahmanand1 @spal-sapient @aksshriv1 @shunaray @kunkambl @mampacch @nagendra-battala @Chittauri @gipathak @risshukl0 @ananthpal @manoj-srivastava
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: Processors_CI_Workflow # Define the name of the workflow
2+
3+
# Define when the workflow should trigger
4+
on:
5+
pull_request:
6+
types:
7+
- labeled # Trigger when a label is added
8+
- unlabeled # Trigger when a label is removed
9+
- synchronize # Trigger when commits are pushed to the PR
10+
- opened # Trigger when a PR is opened
11+
- edited # Trigger when a PR title or description is edited
12+
- ready_for_review # Trigger when a draft PR is marked as ready
13+
- reopened # Trigger when a closed PR is reopened
14+
- unlocked # Trigger when a locked PR is unlocked
15+
branches: [master, develop, qa-master] # Apply to these branches
16+
pull_request_review:
17+
types: [edited, dismissed] # Trigger when a review is edited or dismissed
18+
branches: [master, develop, qa-master]
19+
workflow_dispatch: # Allow manual triggering of the workflow
20+
21+
# Define environment variables
22+
env:
23+
GITHUB_HEAD_NAME: $GITHUB_HEAD_REF # Store the head branch name
24+
sonartoken: ${{ secrets.SONARQUBE_TOKEN }} # Secret for SonarQube authentication
25+
sonarurl: ${{ secrets.SONARURL }} # SonarQube URL stored in secrets
26+
27+
jobs:
28+
29+
# ✅ Building & Testing Processors
30+
processors_ci:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout Repository
34+
uses: actions/checkout@v2
35+
36+
- name: Set Up Java
37+
uses: actions/setup-java@v2
38+
with:
39+
distribution: 'adopt'
40+
java-version: '17'
41+
42+
- name: Cache Maven packages
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.m2/repository
46+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
47+
restore-keys: |
48+
${{ runner.os }}-maven-
49+
50+
- name: Clone & Build knowhow-common dependency
51+
run: |
52+
SOURCE_BRANCH="${{ github.head_ref }}"
53+
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"
54+
55+
echo "Checking if branch '$SOURCE_BRANCH' exists in knowhow-common repo..."
56+
if git ls-remote --heads https://github.com/PublicisSapient/knowhow-common.git $SOURCE_BRANCH | grep $SOURCE_BRANCH; then
57+
BRANCH_TO_CLONE=$SOURCE_BRANCH
58+
else
59+
echo "Branch '$SOURCE_BRANCH' not found. Falling back to target branch '$TARGET_BRANCH'."
60+
BRANCH_TO_CLONE=$TARGET_BRANCH
61+
fi
62+
63+
git clone --branch $BRANCH_TO_CLONE https://github.com/PublicisSapient/knowhow-common.git
64+
cd knowhow-common
65+
mvn clean install -Ddockerfile.skip=true -X
66+
67+
- name: Get common version using Maven Help Plugin
68+
run: |
69+
cd knowhow-common
70+
COMMON_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
71+
echo "COMMON_VERSION=$COMMON_VERSION"
72+
echo "COMMON_VERSION=$COMMON_VERSION" >> $GITHUB_ENV
73+
74+
- name: Build & Test Jira Processor
75+
run: |
76+
mvn clean install -Pjira-processor -Ddockerfile.skip=true -Dcommon.version=$COMMON_VERSION
77+
78+
- name: Build & Test Azure Board Processor
79+
run: mvn clean install -Pazure-board-processor -Ddockerfile.skip=true -Dcommon.version=$COMMON_VERSION
80+
81+
- name: Build & Test DevOps Processor
82+
run: mvn clean install -Pdevops-processor -Ddockerfile.skip=true -Dcommon.version=$COMMON_VERSION
83+
84+
- name: Build & Test Azure Pipeline Repo Processor
85+
run: mvn clean install -Pazure-pipeline-repo -Ddockerfile.skip=true -Dcommon.version=$COMMON_VERSION
86+
87+
- name: SonarQube Analysis - Processors
88+
run: |
89+
mvn sonar:sonar -Dsonar.projectKey=ENGINEERING.KPIDASHBOARD.PROCESSORS \
90+
-Dsonar.projectName=ENGINEERING.KPIDASHBOARD.PROCESSORS \
91+
-Dsonar.branch.name=${{ env.GITHUB_HEAD_NAME }} \
92+
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }} \
93+
-Dcommon.version=$COMMON_VERSION \
94+
-Dsonar.login=${{ secrets.SONARQUBE_TOKEN }} -f pom.xml
95+
96+
- name: Check SonarQube Quality Gate - Processors
97+
run: |
98+
chmod +x SonarQG.sh
99+
./SonarQG.sh ./target/sonar/report-task.txt
100+
101+
# ✅ Final Job to Ensure Completion
102+
GitHub_CI_Complete:
103+
needs: [processors_ci]
104+
if: always()
105+
runs-on: ubuntu-latest
106+
steps:
107+
- name: Check Job Status
108+
run: |
109+
if [[ "${{ needs.processors_ci.result }}" == "failure" || \
110+
"${{ needs.processors_ci.result }}" == "cancelled" ]]; then
111+
echo "❌ One or more jobs failed or were cancelled. Failing CI."
112+
exit 1
113+
else
114+
echo "✅ All relevant jobs have passed."
115+
fi

.gitignore

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Gradle template
3+
.gradle
4+
build/
5+
6+
# Ignore Gradle GUI config
7+
gradle-app.setting
8+
9+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
10+
!gradle-wrapper.jar
11+
12+
13+
### JetBrains template
14+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
15+
16+
*.iml
17+
18+
## Directory-based project format:
19+
.idea/
20+
# if you remove the above rule, at least ignore the following:
21+
22+
# User-specific stuff:
23+
# .idea/workspace.xml
24+
# .idea/tasks.xml
25+
# .idea/dictionaries
26+
27+
# Sensitive or high-churn files:
28+
# .idea/dataSources.ids
29+
# .idea/dataSources.xml
30+
# .idea/sqlDataSources.xml
31+
# .idea/dynamic.xml
32+
# .idea/uiDesigner.xml
33+
34+
# Gradle:
35+
# .idea/gradle.xml
36+
# .idea/libraries
37+
38+
# Mongo Explorer plugin:
39+
# .idea/mongoSettings.xml
40+
41+
## File-based project format:
42+
*.ipr
43+
*.iws
44+
45+
## Plugin-specific files:
46+
47+
# IntelliJ
48+
/out/
49+
50+
# mpeltonen/sbt-idea plugin
51+
.idea_modules/
52+
53+
# JIRA plugin
54+
atlassian-ide-plugin.xml
55+
56+
# Crashlytics plugin (for Android Studio and IntelliJ)
57+
com_crashlytics_export_strings.xml
58+
crashlytics.properties
59+
crashlytics-build.properties
60+
61+
62+
### Eclipse template
63+
*.pydevproject
64+
.metadata
65+
bin/
66+
tmp/
67+
*.tmp
68+
*.bak
69+
*.swp
70+
*~.nib
71+
local.properties
72+
.settings/
73+
.loadpath
74+
75+
# Eclipse Core
76+
# Eclipse Core
77+
.project
78+
79+
# External tool builders
80+
.externalToolBuilders/
81+
82+
# Locally stored "Eclipse launch configurations"
83+
*.launch
84+
85+
# CDT-specific
86+
.cproject
87+
88+
# JDT-specific (Eclipse Java Development Tools)
89+
.classpath
90+
91+
# PDT-specific
92+
.buildpath
93+
94+
# sbteclipse plugin
95+
.target
96+
97+
# TeXlipse plugin
98+
.texlipse
99+
100+
101+
### Java template
102+
*.class
103+
104+
# Mobile Tools for Java (J2ME)
105+
.mtj.tmp/
106+
107+
# Package Files #
108+
*.jar
109+
*.war
110+
*.ear
111+
112+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
113+
hs_err_pid*
114+
115+
116+
### Maven template
117+
target/
118+
pom.xml.tag
119+
pom.xml.releaseBackup
120+
pom.xml.versionsBackup
121+
pom.xml.next
122+
release.properties
123+
dependency-reduced-pom.xml
124+
buildNumber.properties
125+
.mvn/timing.properties
126+
127+
128+
### Grails template
129+
# .gitignore for Grails 1.2 and 1.3
130+
# Although this should work for most versions of grails, it is
131+
# suggested that you use the "grails integrate-with --git" command
132+
# to generate your .gitignore file.
133+
134+
# web application files
135+
/web-app/WEB-INF/classes
136+
137+
# default HSQL database files for production mode
138+
/prodDb.*
139+
140+
# general HSQL database files
141+
*Db.properties
142+
*Db.script
143+
144+
# logs
145+
/stacktrace.log
146+
/test/reports
147+
/logs
148+
/**/logs
149+
150+
# project release file
151+
/*.war
152+
153+
# plugin release files
154+
/*.zip
155+
/plugin.xml
156+
157+
# older plugin install locations
158+
/plugins
159+
/web-app/plugins
160+
161+
# "temporary" build files
162+
/target
163+
.DS*
164+
165+
/**/.pmd
166+
/**/.ruleset
167+
168+
application-local.properties
169+
customapi/test-output/
170+
171+
**/.factorypath
172+
173+
customapi/.eclipse-pmd
174+
175+
176+
# compiled output
177+
/**/dist
178+
/**/tmp
179+
/**/out-tsc
180+
/**/coverage
181+
/**/.scannerwork
182+
183+
184+
# dependencies
185+
/**/node_modules
186+
187+
# IDEs and editors
188+
.c9/
189+
*.sublime-workspace
190+
191+
# IDE - VSCode
192+
.vscode/*
193+
!.vscode/settings.json
194+
!.vscode/tasks.json
195+
!.vscode/launch.json
196+
!.vscode/extensions.json
197+
198+
# misc
199+
/**/.sass-cache
200+
/**/connect.lock
201+
/**/UI/libpeerconnection.log
202+
npm-debug.log
203+
yarn-error.log
204+
testem.log
205+
**/UI/typings
206+
207+
# System Files
208+
.DS_Store
209+
Thumbs.db
210+
package-lock.json
211+
212+
.github/CODEOWNERS

0 commit comments

Comments
 (0)