Skip to content

Commit 26dbd8f

Browse files
authored
Merge pull request #2041 from Mailaender/clean-jenkinks
Automate the cleanup steps on Jenkins deployment
2 parents b497ae0 + 7c67046 commit 26dbd8f

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

Jenkinsfile

+4-24
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ pipeline {
88
pollSCM('H/5 * * * *')
99
}
1010
parameters {
11-
booleanParam(name: 'CLEAN_INTEGRATION', defaultValue: false, description: 'Attention: Cleans the integration folder with all branches completely.')
1211
booleanParam(name: 'CODESIGN', defaultValue: false, description: 'Sign the artifacts.')
1312
booleanParam(name: 'PUBLISH_PRODUCTS', defaultValue: false, description: 'Copy to the compiled products for Windows, macOS and Linux')
1413
}
@@ -24,7 +23,7 @@ pipeline {
2423
buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '1'))
2524
}
2625
stages {
27-
stage('build') {
26+
stage('Build') {
2827
steps {
2928
sh """
3029
mvn -B ${params.CODESIGN ? '-P eclipse-sign' : ''} \\
@@ -39,38 +38,19 @@ pipeline {
3938
archiveArtifacts 'chemclipse/products/org.eclipse.chemclipse.rcp.compilation.community.product/target/products/*.zip,chemclipse/products/org.eclipse.chemclipse.rcp.compilation.community.product/target/products/*.tar.gz'
4039
}
4140
}
42-
stage('clean integration') {
43-
when {
44-
environment name: 'CLEAN_INTEGRATION', value: 'true'
45-
}
46-
steps {
47-
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
48-
sh "ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/chemclipse/integration/"
49-
}
50-
}
51-
}
52-
stage('clean deploy') {
53-
when {
54-
environment name: 'CLEAN_WORKSPACE', value: 'true'
55-
}
56-
steps {
57-
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
58-
sh "ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/chemclipse/integration/${BRANCH_NAME}"
59-
}
60-
}
61-
}
62-
stage('deploy') {
41+
stage('Deploy') {
6342
steps {
6443
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
6544
sh '''
45+
ssh [email protected] rm -rf /home/data/httpd/download.eclipse.org/chemclipse/integration/${BRANCH_NAME}
6646
ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/chemclipse/integration/${BRANCH_NAME}/repository
6747
ssh [email protected] mkdir -p /home/data/httpd/download.eclipse.org/chemclipse/integration/${BRANCH_NAME}/downloads
6848
scp -r chemclipse/sites/chemclipse/target/repository/* [email protected]:/home/data/httpd/download.eclipse.org/chemclipse/integration/${BRANCH_NAME}/repository
6949
'''
7050
}
7151
}
7252
}
73-
stage('publish') {
53+
stage('Publish') {
7454
when {
7555
environment name: 'PUBLISH_PRODUCTS', value: 'true'
7656
}

0 commit comments

Comments
 (0)