You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Jenkinsfile 697B

12345678910111213141516171819202122
  1. PROJECT = "matriz"
  2. PRODUCTION = "/var/www/pkgs/matriz"
  3. DEMO = "/var/www/demo/programs"
  4. OUT = "matriz.sh"
  5. node {
  6. stage('Compress') {
  7. sh "git archive --format=tar -v -o ${PROJECT}.tar.gz HEAD"
  8. sh "git archive --format=zip -v -o ${PROJECT}.zip HEAD"
  9. }
  10. stage('Sign') {
  11. sh "> sha256sums.txt"
  12. sh "sha256sum *.tar.gz *.zip > sha256sums.txt"
  13. withCredentials([string(credentialsId: 'gpgpass', variable: 'gpgpass')]) {
  14. sh "gpg --pinentry-mode loopback --passphrase ${gpgpass} --yes --detach-sign -a sha256sums.txt"
  15. }
  16. }
  17. stage('Copy') {
  18. sh "cp ${PROJECT}.tar.gz ${PROJECT}.zip sha256sums.txt ${PRODUCTION}"
  19. sh "cp ${OUT} ${DEMO}"
  20. }
  21. }