Skip to content
Snippets Groups Projects
Commit 4f0961db authored by Homada.Boumedane's avatar Homada.Boumedane
Browse files

chore(dlcm-portal): add deploy stage

add deploy stage to the pipeline
parent 71c7374e
No related branches found
No related tags found
No related merge requests found
pipeline{ pipeline{
agent any agent any
environment {
options{
buildDiscarder(logRotator(numToKeepStr: '5'))
disableConcurrentBuilds()
}
tools{
maven 'Maven'
}
environment{
CHROME_BIN = '/usr/bin/chromium' CHROME_BIN = '/usr/bin/chromium'
} }
...@@ -34,34 +44,18 @@ pipeline{ ...@@ -34,34 +44,18 @@ pipeline{
} }
stage ('Build'){ stage ('Build'){
when { steps {
branch 'master' withMaven(maven: 'Maven', mavenLocalRepo: '.repository'){
} sh "mvn clean package"
steps{ }
sh 'ng build --aot=true --prod=true'
} }
} }
stage('Archive'){ stage ('Deploying'){
when {
branch 'master'
}
steps {
echo 'Archive....'
sh '''
cd dist
tar -cvzf ../dlcm-angular.tar.gz *
'''
archive 'dlcm-angular.tar.gz'
}
}
stage('Deploying'){
when {
branch 'master'
}
steps { steps {
echo 'Deploying....' withCredentials([sshUserPrivateKey(credentialsId: 'GitLab', keyFileVariable: 'RSA_KEY')]){
sh "mvn deploy"
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment