From c009cb0bd372fed16accb9e430bb0bce10ee9ef6 Mon Sep 17 00:00:00 2001 From: Andrey Maslennikov Date: Thu, 17 Oct 2019 13:32:39 +0300 Subject: [PATCH] AZP: port release pipeline to v1.7.x PR to master: https://github.com/openucx/ucx/pull/4257 --- .gitlab-ci.yml | 14 ---------- buildlib/azure-pipelines-release.yml | 42 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 14 deletions(-) delete mode 100644 .gitlab-ci.yml create mode 100644 buildlib/azure-pipelines-release.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index ba1209350c7..00000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,14 +0,0 @@ -build: - only: - - tags - script: - - "./autogen.sh" - - "./contrib/configure-release --disable-numa" - - make -j - - make dist - - 'export upload_url=$(curl -s -H "Authorization: token $github_token" "https://api.github.com/repos/openucx/ucx/releases" | python -c "import sys,os,json; d=json.load(sys.stdin); tag=os.environ.get(\"CI_COMMIT_TAG\"); rel = [r for r in d if r[\"tag_name\"] == tag]; url = rel[0][\"upload_url\"] if rel else \"\"; print url" | grep -oP "https\S+assets")' - - echo $upload_url - - 'export tar_name=$(ls *.tar.gz)' - - echo $tar_name - - 'curl -s -H "Authorization: token $github_token" -H "Content-Type: application/zip" --data-binary @"$tar_name" "${upload_url}?name=${tar_name}&label=${tar_name}"' - diff --git a/buildlib/azure-pipelines-release.yml b/buildlib/azure-pipelines-release.yml new file mode 100644 index 00000000000..0a9bdb46820 --- /dev/null +++ b/buildlib/azure-pipelines-release.yml @@ -0,0 +1,42 @@ +# See https://aka.ms/yaml + +pr: none +trigger: + tags: + include: + - v* + +resources: + containers: + - container: fedora + image: ucfconsort.azurecr.io/ucx/fedora:1 + endpoint: ucfconsort_registry + +stages: + - stage: Release + jobs: + - job: release + displayName: build tarball and source rpm + container: fedora + steps: + - bash: ./autogen.sh + displayName: Setup autotools + + - bash: | + set -eE + gcc --version + ./contrib/configure-release + ./contrib/buildrpm.sh -s -t -b + displayName: Build tarball + + - task: GithubRelease@0 + displayName: Create GitHub Draft Release + inputs: + githubConnection: release + repositoryName: openucx/ucx + action: create + isDraft: true + addChangeLog: false + assets: | + ./ucx-*.tar.gz + ./rpm-dist/ucx-*.src.rpm