pegh is a file encryption tool using passwords with modern, standardized, and authenticated encryption.
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.

43 lines
1.3 KiB

  1. properties(
  2. [
  3. disableConcurrentBuilds()
  4. ]
  5. )
  6. node('linux && docker') {
  7. try {
  8. stage('Checkout') {
  9. //branch name from Jenkins environment variables
  10. echo "My branch is: ${env.BRANCH_NAME}"
  11. // this doesn't grab tags pointing to this branch
  12. //checkout scm
  13. // this hack does... https://issues.jenkins.io/browse/JENKINS-45164
  14. checkout([
  15. $class: 'GitSCM',
  16. branches: [[name: 'refs/heads/'+env.BRANCH_NAME]],
  17. extensions: [[$class: 'CloneOption', noTags: false, shallow: false, depth: 0, reference: '']],
  18. userRemoteConfigs: scm.userRemoteConfigs,
  19. ])
  20. sh '''
  21. set -euxo pipefail
  22. git checkout "$BRANCH_NAME" --
  23. git reset --hard "origin/$BRANCH_NAME"
  24. '''
  25. }
  26. stage('Build + Deploy') {
  27. sh 'curl --compressed -sL https://code.moparisthebest.com/moparisthebest/self-ci/raw/branch/master/build-ci.sh | bash'
  28. }
  29. currentBuild.result = 'SUCCESS'
  30. } catch (Exception err) {
  31. currentBuild.result = 'FAILURE'
  32. } finally {
  33. stage('Email') {
  34. step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'admin.jenkins@moparisthebest.com', sendToIndividuals: true])
  35. }
  36. sh './bin/build.sh docker-chown'
  37. deleteDir()
  38. }
  39. }