-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only promote build results when on the master branch (#311)
To avoid uploading the artifacts from old branches to the update site, we should make sure that we only do so, when on the master branch.
- Loading branch information
Showing
1 changed file
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,21 +35,29 @@ pipeline { | |
) | ||
} | ||
failure { | ||
mail bcc: '', body: "<b>GEF Classic: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL de build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: GEF Classic -> ${env.JOB_NAME}", to: "[email protected]"; | ||
script { | ||
if (env.BRANCH_NAME == 'master') { | ||
mail bcc: '', body: "<b>GEF Classic: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL de build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: GEF Classic -> ${env.JOB_NAME}", to: "[email protected]"; | ||
} | ||
} | ||
} | ||
} | ||
|
||
} | ||
stage('Deploy') { | ||
steps { | ||
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) { | ||
sh ''' | ||
ssh -o BatchMode=yes [email protected] rm -rf /home/data/httpd/download.eclipse.org/tools/gef/classic/latest | ||
ssh -o BatchMode=yes [email protected] mkdir -p /home/data/httpd/download.eclipse.org/tools/gef/classic/latest | ||
scp -o BatchMode=yes -r org.eclipse.gef.repository/target/repository/* [email protected]:/home/data/httpd/download.eclipse.org/tools/gef/classic/latest | ||
''' | ||
} | ||
} | ||
script { | ||
if (env.BRANCH_NAME == 'master') { | ||
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) { | ||
sh ''' | ||
ssh -o BatchMode=yes [email protected] rm -rf /home/data/httpd/download.eclipse.org/tools/gef/classic/latest | ||
ssh -o BatchMode=yes [email protected] mkdir -p /home/data/httpd/download.eclipse.org/tools/gef/classic/latest | ||
scp -o BatchMode=yes -r org.eclipse.gef.repository/target/repository/* [email protected]:/home/data/httpd/download.eclipse.org/tools/gef/classic/latest | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |