Skip to content

Commit

Permalink
OB-525 - CSP Changes (#103)
Browse files Browse the repository at this point in the history
* OB-525 feat: CSP Changes

* OB-525 feat: CircleCI Dependency job issue fix

* OB-525 feat: Jenkins file update

* OB-531 feat: Sunbird Jenkins file changes
  • Loading branch information
manjudr authored Aug 21, 2023
1 parent a7544a4 commit fc5578f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ jobs:
analytics-service-build:
machine:
image: ubuntu-2004:202008-01
environment:
CLOUD_STORE_VERSION: "1.4.0"
CLOUD_STORE_ARTIFACT_ID: "cloud-store-sdk_2.12"
CLOUD_STORE_GROUP_ID: "org.sunbird"
steps:
- checkout

Expand Down Expand Up @@ -34,13 +38,13 @@ jobs:
name: Build analytics-core dependency jar
command: |
java -version
cd sunbird-analytics-core && mvn install -DskipTests
cd sunbird-analytics-core && mvn install -DskipTests -DCLOUD_STORE_GROUP_ID=$CLOUD_STORE_GROUP_ID -DCLOUD_STORE_ARTIFACT_ID=$CLOUD_STORE_ARTIFACT_ID -DCLOUD_STORE_VERSION=$CLOUD_STORE_VERSION
- run:
name: lpa-api-build
command: |
java -version
mvn clean scoverage:report
mvn scoverage:report -DCLOUD_STORE_GROUP_ID=$CLOUD_STORE_GROUP_ID -DCLOUD_STORE_ARTIFACT_ID=$CLOUD_STORE_ARTIFACT_ID -DCLOUD_STORE_VERSION=$CLOUD_STORE_VERSION
- save_cache:
key: dp-dependency-cache-{{ checksum "pom.xml" }}
Expand All @@ -51,7 +55,7 @@ jobs:
command: |
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64
java -version
mvn -X sonar:sonar -Dsonar.projectKey=project-sunbird_sunbird-analytics-service -Dsonar.organization=project-sunbird -Dsonar.host.url=https://sonarcloud.io -Dsonar.scala.coverage.reportPaths=/home/circleci/project/target/scoverage.xml
mvn -X sonar:sonar -DCLOUD_STORE_GROUP_ID=$CLOUD_STORE_GROUP_ID -DCLOUD_STORE_ARTIFACT_ID=$CLOUD_STORE_ARTIFACT_ID -DCLOUD_STORE_VERSION=$CLOUD_STORE_VERSION -Dsonar.projectKey=project-sunbird_sunbird-analytics-service -Dsonar.organization=project-sunbird -Dsonar.host.url=https://sonarcloud.io -Dsonar.scala.coverage.reportPaths=/home/circleci/project/target/scoverage.xml
##test
workflows:
version: 2.1
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ node('build-slave') {
export JAVA_HOME=/usr/lib/jvm/jdk-11.0.2
export PATH=$JAVA_HOME/bin:$PATH
echo $(java -version)
mvn clean install -DskipTests
mvn play2:dist -pl analytics-api
'''
sh 'mvn clean install -DskipTests -DCLOUD_STORE_GROUP_ID=' + params.CLOUD_STORE_GROUP_ID + ' -DCLOUD_STORE_ARTIFACT_ID=' + params.CLOUD_STORE_ARTIFACT_ID + ' -DCLOUD_STORE_VERSION=' + params.CLOUD_STORE_VERSION
sh 'mvn play2:dist -pl analytics-api'
}
stage('Package') {
dir('sunbird-analytics-service-distribution') {
Expand Down
7 changes: 5 additions & 2 deletions analytics-api-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,12 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.sunbird</groupId>
<!-- <groupId>org.sunbird</groupId>
<artifactId>cloud-store-sdk_${scala.maj.version}</artifactId>
<version>1.4.0</version>
<version>1.4.0</version> -->
<groupId>${CLOUD_STORE_GROUP_ID}</groupId>
<artifactId>${CLOUD_STORE_ARTIFACT_ID}</artifactId>
<version>${CLOUD_STORE_VERSION}</version>
<exclusions>
<exclusion>
<groupId>com.microsoft.azure</groupId>
Expand Down
6 changes: 4 additions & 2 deletions auto_build_deploy
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ node('build-slave') {
sh """
export JAVA_HOME=/usr/lib/jvm/jdk-11.0.2
export PATH=$JAVA_HOME/bin:$PATH
mvn clean install -DskipTests
mvn play2:dist -pl analytics-api
"""
sh 'mvn clean install -DskipTests -DCLOUD_STORE_GROUP_ID=' + params.CLOUD_STORE_GROUP_ID + ' -DCLOUD_STORE_ARTIFACT_ID=' + params.CLOUD_STORE_ARTIFACT_ID + ' -DCLOUD_STORE_VERSION=' + params.CLOUD_STORE_VERSION
sh 'mvn play2:dist -pl analytics-api'



// stage Package
dir('sunbird-analytics-service-distribution') {
Expand Down

0 comments on commit fc5578f

Please sign in to comment.