Skip to content

Commit

Permalink
SC-000 Merge 2.10.0 to master (#397)
Browse files Browse the repository at this point in the history
* SC-1676 Update .gitmodules (#386)

* Issue #SB-18059 feat: code to handle ClientErrorREsponse (#387)

* Issue #SB-18059 feat: code to handle ClientErrorREsponse

* Issue #SB-18059 feta:fixed indentation

* Issue #SC-1707 removed unused dependencies (#388)

* Issue #SC-1707 removed unused dependencies

* Issue #SC-1707 changing sub-module in order to test functional test cases in dev

* Issue #SC-1707 reverting back the sub-module changes

* Issue #SC-1707 added space for build failure

* Issue #SC-1707 removed space for build failure

* Issue #SC-1707 dependent module uncommented

* Issue #SC-1745 feat: update git module file (#389)

* Issue #SC-1722 feat: handling SIGTERM singnal for gracefull shutdown (#390)

* Issue #SC-1722 feat: handling SIGTERM singnal for gracefull shutdown

* Issue #SC-1745 feat: update git module file

* Create auto_build_deploy

* Update auto_build_deploy

* Update auto_build_deploy

* Issue #SB-18958 Roll forward from 2.8.0_RC6 tag (#393)

* Issue #SB-18958 release-2.10 is merged with latest changes

* Issue #SB-18958 log line change in Basecontroller

* Issue #SB-18958 adding dummy commit

* Issue #SB-19078 Redeploy - commit (#395)

* SC-1789 Commonise log msg (#396)

Co-authored-by: indrajra-ilimi <[email protected]>

* SC-000 Update .gitmodules

Co-authored-by: AMIT KUMAR <[email protected]>
Co-authored-by: Hari-stackroute <[email protected]>
Co-authored-by: G33tha <[email protected]>
Co-authored-by: amorphous-1 <[email protected]>
Co-authored-by: indrajra-ilimi <[email protected]>
  • Loading branch information
6 people authored May 5, 2020
1 parent 4cccd4b commit 4b9ff6b
Show file tree
Hide file tree
Showing 10 changed files with 320 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "actors/sunbird-lms-mw"]
path = actors/sunbird-lms-mw
url = https://github.com/project-sunbird/sunbird-lms-mw.git
branch = master
branch = master
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ USER sunbird
COPY ./service/target/learning-service-1.0-SNAPSHOT-dist.zip /home/sunbird/learner/
RUN unzip /home/sunbird/learner/learning-service-1.0-SNAPSHOT-dist.zip -d /home/sunbird/learner/
WORKDIR /home/sunbird/learner/
CMD java -cp '/home/sunbird/learner/learning-service-1.0-SNAPSHOT/lib/*' play.core.server.ProdServerStart /home/sunbird/learner/learning-service-1.0-SNAPSHOT
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS -cp '/home/sunbird/learner/learning-service-1.0-SNAPSHOT/lib/*' play.core.server.ProdServerStart /home/sunbird/learner/learning-service-1.0-SNAPSHOT
63 changes: 63 additions & 0 deletions auto_build_deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@Library('deploy-conf') _
node('build-slave') {
try {
String ANSI_GREEN = "\u001B[32m"
String ANSI_NORMAL = "\u001B[0m"
String ANSI_BOLD = "\u001B[1m"
String ANSI_RED = "\u001B[31m"
String ANSI_YELLOW = "\u001B[33m"

ansiColor('xterm') {
stage('Checkout') {
tag_name = env.JOB_NAME.split("/")[-1]
pre_checks()
if (!env.hub_org) {
println(ANSI_BOLD + ANSI_RED + "Uh Oh! Please set a Jenkins environment variable named hub_org with value as registery/sunbidrded" + ANSI_NORMAL)
error 'Please resolve the errors and rerun..'
} else
println(ANSI_BOLD + ANSI_GREEN + "Found environment variable named hub_org with value as: " + hub_org + ANSI_NORMAL)
}
cleanWs()
def scmVars = checkout scm
checkout scm: [$class: 'GitSCM', branches: [[name: "refs/tags/$tag_name"]], userRemoteConfigs: [[url: scmVars.GIT_URL]]]
build_tag = tag_name + "_" + env.BUILD_NUMBER
commit_hash = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
artifact_version = tag_name + "_" + commit_hash
echo "build_tag: " + build_tag

// stage Build
env.NODE_ENV = "build"
print "Environment will be : ${env.NODE_ENV}"
sh('git submodule update --init')
sh('git submodule update --init --recursive --remote')
sh 'git log -1'
sh 'cat service/conf/routes | grep v2'
sh 'mvn clean install -U -DskipTests=true '


// stage Unit Tests
sh "mvn test '-Dtest=!%regex[io.opensaber.registry.client.*]' -DfailIfNoTests=false"

// stage Package
dir('service') {
sh 'mvn play2:dist'
}
sh('chmod 777 ./build.sh')
sh("./build.sh ${build_tag} ${env.NODE_NAME} ${hub_org}")

// stage ArchiveArtifacts
archiveArtifacts "metadata.json"
currentBuild.description = "${build_tag}"
}
currentBuild.result = "SUCCESS"
slack_notify(currentBuild.result, tag_name)
email_notify()
auto_build_deploy()
}
catch (err) {
currentBuild.result = "FAILURE"
slack_notify(currentBuild.result, tag_name)
email_notify()
throw err
}
}
11 changes: 11 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,15 @@
<module>actors/sunbird-lms-mw</module>
<module>service</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Loading

0 comments on commit 4b9ff6b

Please sign in to comment.