Cambiata compilazione Jenkinsfile
This commit is contained in:
@@ -38,21 +38,19 @@ pipeline {
|
||||
return env.GIT_BRANCH == "develop"
|
||||
}
|
||||
}
|
||||
stage('Tomcat update') {
|
||||
stages {
|
||||
stage('Update Tomcat 1') {
|
||||
steps {
|
||||
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||
powershell returnStdout: true, script: "build\\update_tomcat.ps1 -serviceName \"Tomcat9\" -httpPort \"8081\" -updatedArtifactPath \"${WORKSPACE}\\ems-engine\\target\\ems-api.war\""
|
||||
}
|
||||
stages {
|
||||
stage('Update Tomcat 1') {
|
||||
steps {
|
||||
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||
powershell returnStdout: true, script: "build\\update_tomcat.ps1 -serviceName \"Tomcat9\" -httpPort \"8081\" -updatedArtifactPath \"${WORKSPACE}\\ems-engine\\target\\ems-api.war\""
|
||||
}
|
||||
stage('Update Tomcat 2') {
|
||||
steps {
|
||||
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||
powershell returnStdout: true, script: "build\\update_tomcat.ps1 -serviceName \"Tomcat9Backup\" -httpPort \"8082\" -updatedArtifactPath \"${WORKSPACE}\\ems-engine\\target\\ems-api.war\""
|
||||
bat 'curl -k https://devservices.studioml.it/ems-api/updateWMSApp'
|
||||
bat 'curl -k https://devservices.studioml.it/ems-api/updateWMSApp?suffix=beta'
|
||||
}
|
||||
}
|
||||
stage('Update Tomcat 2') {
|
||||
steps {
|
||||
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||
powershell returnStdout: true, script: "build\\update_tomcat.ps1 -serviceName \"Tomcat9Backup\" -httpPort \"8082\" -updatedArtifactPath \"${WORKSPACE}\\ems-engine\\target\\ems-api.war\""
|
||||
bat 'curl -k https://devservices.studioml.it/ems-api/updateWMSApp'
|
||||
bat 'curl -k https://devservices.studioml.it/ems-api/updateWMSApp?suffix=beta'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,40 +62,33 @@ pipeline {
|
||||
return env.GIT_BRANCH == "master"
|
||||
}
|
||||
}
|
||||
stage('Tomcat update') {
|
||||
stages {
|
||||
stage('Update Tomcat 1') {
|
||||
steps {
|
||||
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'Production Linux Tomcat Server (192.168.3.16)', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''sudo /usr/bin/systemctl stop tomcat9
|
||||
stages {
|
||||
stage('Update Tomcat 1') {
|
||||
steps {
|
||||
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'Production Linux Tomcat Server (192.168.3.16)', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''sudo /usr/bin/systemctl stop tomcat9
|
||||
rm -R tomcat9/webapps/ems-api
|
||||
sudo /usr/bin/systemctl start tomcat9
|
||||
|
||||
/home/studioml/./wait_tomcat_startup.sh 8081''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/tomcat9/webapps', remoteDirectorySDF: false, removePrefix: 'ems-engine/target/', sourceFiles: 'ems-engine/target/*.war*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
|
||||
}
|
||||
}
|
||||
stage('Update Tomcat 2') {
|
||||
steps {
|
||||
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'Production Linux Tomcat Server (192.168.3.16)', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''sudo /usr/bin/systemctl stop tomcat9backup
|
||||
}
|
||||
stage('Update Tomcat 2') {
|
||||
steps {
|
||||
echo "Updating Tomcat9 from ${WORKSPACE}"
|
||||
sshPublisher(publishers: [sshPublisherDesc(configName: 'Production Linux Tomcat Server (192.168.3.16)', transfers: [sshTransfer(cleanRemote: false, excludes: '', execCommand: '''sudo /usr/bin/systemctl stop tomcat9backup
|
||||
rm -R tomcat9backup/webapps/ems-api
|
||||
sudo /usr/bin/systemctl start tomcat9backup
|
||||
|
||||
/home/studioml/./wait_tomcat_startup.sh 8082
|
||||
|
||||
sleep 10''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaultExcludes: false, patternSeparator: '[, ]+', remoteDirectory: '/tomcat9backup/webapps', remoteDirectorySDF: false, removePrefix: 'ems-engine/target/', sourceFiles: 'ems-engine/target/*.war*')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
|
||||
bat 'curl -k https://services.studioml.it/ems-api/updateWMSApp'
|
||||
bat 'curl -k https://services.studioml.it/ems-api/updateWMSApp?suffix=beta'
|
||||
}
|
||||
bat 'curl -k https://services.studioml.it/ems-api/updateWMSApp'
|
||||
bat 'curl -k https://services.studioml.it/ems-api/updateWMSApp?suffix=beta'
|
||||
}
|
||||
}
|
||||
|
||||
// stage('Publish on Azure') {
|
||||
// steps {
|
||||
// azureUpload fileShareName: 'storage-ci', filesPath: 'ems-engine/target/*.war*', removePrefixPath: 'ems-engine/target/', storageCredentialId: '83a86793-c1d6-4776-b20f-1ff652a57fee', storageType: 'filestorage', uploadArtifactsOnlyIfSuccessful: true, verbose: true, virtualPath: "ems-api/${env.GIT_BRANCH}"
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
stage('Publish Branch on Azure') {
|
||||
@@ -105,30 +96,31 @@ sleep 10''', execTimeout: 120000, flatten: false, makeEmptyDirs: false, noDefaul
|
||||
azureUpload fileShareName: 'storage-ci', filesPath: 'ems-engine/target/*.war*', removePrefixPath: 'ems-engine/target/', storageCredentialId: '83a86793-c1d6-4776-b20f-1ff652a57fee', storageType: 'filestorage', uploadArtifactsOnlyIfSuccessful: true, verbose: true, virtualPath: "ems-api/${env.GIT_BRANCH}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Docker Build') {
|
||||
steps {
|
||||
node('server-build') {
|
||||
echo "Building Docker image"
|
||||
unstash 'docker-files'
|
||||
stage('Docker Build') {
|
||||
steps {
|
||||
node('server-build') {
|
||||
echo "Building Docker image"
|
||||
unstash 'docker-files'
|
||||
|
||||
script {
|
||||
def branchVersion = ""
|
||||
script {
|
||||
def branchVersion = ""
|
||||
|
||||
if (env.GIT_BRANCH != "master") {
|
||||
branchVersion = "-${env.GIT_BRANCH.toLowerCase().replace('/', '-')}"
|
||||
if (env.GIT_BRANCH != "master") {
|
||||
branchVersion = "-${env.GIT_BRANCH.toLowerCase().replace('/', '-')}"
|
||||
}
|
||||
|
||||
bat "docker buildx build --platform linux/amd64,linux/arm64 --push -t \"git.studioml.it/integry/ems-api${branchVersion}:latest\" ."
|
||||
|
||||
//containerImageLink "git.studioml.it/integry/ems-api-${env.GIT_BRANCH.toLowerCase().replace('/', '-')}:latest}"
|
||||
}
|
||||
}
|
||||
|
||||
bat "docker buildx build --platform linux/amd64,linux/arm64 --push -t \"git.studioml.it/integry/ems-api${branchVersion}:latest\" ."
|
||||
|
||||
//containerImageLink "git.studioml.it/integry/ems-api-${env.GIT_BRANCH.toLowerCase().replace('/', '-')}:latest}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
post {
|
||||
|
||||
Reference in New Issue
Block a user