message: Implemented inclusion of Tor components and upload of created *.dmg to GitHub
diff: @@ -139,6 +139,8 @@ pipeline {
  PATH = "/usr/local/bin:${QT_PATH}/bin:$PATH"
  MACOSX_DEPLOYMENT_TARGET = 10.10
  }
  + stages {
  + stage('Perform build') {
  steps {
  script {
  sh "pwd"
  @@ -149,8 +151,74 @@ pipeline {
  "./build_detect_platform build_config.mk ./ && make\n" +
  "cd ../\n" +
  "qmake src/src.pro -spec macx-clang CONFIG+=x86_64\n" +
  - "make -j2\n" +
  - "./macdeployqt.sh"
  + "make -j2"
  + }
  + }
  + }
  + stage('Prepare delivery') {
  + steps {
  + script {
  + def exists = fileExists 'Tor.zip'
  + if (exists) {
  + echo 'Archive \'Tor.zip\' exists, nothing to download.'
  + } else {
  + echo 'Archive \'Tor.zip\' not found, downloading...'
  + fileOperations([
  + fileDownloadOperation(
  + password: '',
  + targetFileName: 'Tor.zip',
  + targetLocation: "${WORKSPACE}",
  + url: 'https://github.com/spectrecoin/resources/raw/master/resources/Spectrecoin.Tor.libraries.macOS.zip',
  + userName: '')
  + ])
  + }
  + // Unzip Tor and remove debug content
  + fileOperations([
  + fileUnZipOperation(
  + filePath: "${WORKSPACE}/Tor.zip",
  + targetLocation: "${WORKSPACE}/"),
  + folderDeleteOperation(
  + folderPath: "${WORKSPACE}/src/bin/debug"),
  + ])
  + }
  + }
  + }
  + stage('Create delivery') {
  + steps {
  + script {
  + sh "./macdeployqt.sh"
  +// No upload on feature branches, only from develop and master
  + archiveArtifacts allowEmptyArchive: true, artifacts: '**/Spectrecoin.dmg'
  + }
  + }
  + }
  + stage('Upload delivery') {
  + agent {
  + label "housekeeping"
  + }
  + steps {
  + script {
  + sh "wget https://ci.spectreproject.io/job/Spectrecoin/job/spectre/job/${BRANCH_NAME}/lastSuccessfulBuild/artifact/Spectrecoin.dmg"
  + sh "docker run \\\n" +
  + "--rm \\\n" +
  + "-e GITHUB_TOKEN=${GITHUB_TOKEN} \\\n" +
  + "-v ${WORKSPACE}:/filesToUpload \\\n" +
  + "spectreproject/github-uploader:latest \\\n" +
  + "github-release upload \\\n" +
  + " --user spectrecoin \\\n" +
  + " --repo spectre \\\n" +
  + " --tag latest \\\n" +
  + " --name \"Spectrecoin-latest-macOS.dmg\" \\\n" +
  + " --file /filesToUpload/Spectrecoin.dmg \\\n" +
  + " --replace"
  + sh "rm -f Spectrecoin.dmg"
  + }
  + }
  + post {
  + always {
  + sh "docker system prune --all --force"
  + }
  + }
  }
  }
  }
  