Skip to content

Commit

Permalink
Issue Sunbird-Lern#24 chore:Sunbird auth package build
Browse files Browse the repository at this point in the history
  • Loading branch information
ahghatol committed Dec 20, 2017
1 parent 9d6c993 commit cb966cb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 49 deletions.
50 changes: 1 addition & 49 deletions keycloak/scripts/pipelines/keycloak-build/Jenkinsfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,8 @@ node('build-slave') {

try {

stage('Cleanup'){
sh('rm -rf sunbird-auth')
sh('rm -rf project-sunbird-devops')
sh('rm -rf keycloak-3.2.0.Final.tar.gz')
sh('rm -rf keycloak_build/login.tar.gz')
sh('rm -rf ansible/artifacts/sunbird/login.tar.gz')
sh('rm -rf keycloak_build')
}

stage('Checkout'){
checkout scm
sh('git clone https://github.com/project-sunbird/sunbird-auth.git')

// @Todo Update the URL
// sh('git clone https://github.com/ahghatol/sunbird-devops-1.git project-sunbird-devops')

sh('git clone https://github.com/project-sunbird/sunbird-devops project-sunbird-devops')

// Download keycloak package and driver
sh('wget https://downloads.jboss.org/keycloak/3.2.0.Final/keycloak-3.2.0.Final.tar.gz')
sh('wget https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar')
}

stage('Build'){
sh('mkdir -p sunbird-auth-0.1v');

// Login theme build
sh('cd ansible/artifacts/sunbird && tar -zcvf login.tar.gz *')

// Sms plugin build
sh('cd sunbird-auth/keycloak/sms-provider && mvn package')


sh('cp keycloak-3.2.0.Final.tar.gz keycloak_build')
sh('cp postgresql-9.4.1212.jar keycloak_build')

// Copy file to keycloak_build directory
sh('cp sunbird-auth/keycloak/sms-provider/target/keycloak-email-phone-autthenticator-1.0-SNAPSHOT.jar keycloak_build')

// Create zip and Copy file to keycloak_build directory
sh('cd sunbird-auth/keycloak/sms-provider/templates && tar -zcvf templates.tar.gz *')
sh('cp sunbird-auth/keycloak/sms-provider/templates/templates.tar.gz keycloak_build')

// Copy ansible template for Provider config and keycloak configuration
sh('mkdir -p keycloak_build/ansible-templates');

sh('cp project-sunbird-devops/ansible/roles/keycloak/templates/* keycloak_build/ansible-templates')

sh('cp ansible/artifacts/sunbird/login.tar.gz keycloak_build')
sh('tar -zcvf keycloak_build.tar.gz keycloak_build')
sh('cd sunbird-devops/ansible && ansible-playbook -i ../../ansible/inventories/dev keycloak.yml --tags deploy --vault-password-file /run/secrets/vault-pass ')
}

stage('Archive'){
Expand Down

0 comments on commit cb966cb

Please sign in to comment.