From d9503b556bfbcb5ab52a185eb74b48be49d99912 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 2 Mar 2020 13:24:07 +0100 Subject: [PATCH] Switch to native Zuul v3 publish job Use new Zuul v3 publish-openstack-stackviz-element job for periodic pipeline to publish the tarball. The job still publishes to https://tarballs.opendev.org/openstack/stackviz/dist/ and generates same content (just different paths). Move the job from periodic to post, there's no need for a daily update. Remove old job and its playbooks, they are not needed anymore. Needed-By: https://review.opendev.org/710756 Change-Id: I522e1b5e6158e5811578e24a380ce00001a6d40e --- .zuul.yaml | 12 +--- .../post.yaml | 21 ------- .../run.yaml | 61 ------------------- 3 files changed, 2 insertions(+), 92 deletions(-) delete mode 100644 playbooks/legacy/periodic-package-stackviz-element/post.yaml delete mode 100644 playbooks/legacy/periodic-package-stackviz-element/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 945b211..b0dbed4 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,11 +1,3 @@ -- job: - name: periodic-package-stackviz-element - parent: legacy-publish-openstack-artifacts - run: playbooks/legacy/periodic-package-stackviz-element/run.yaml - post-run: playbooks/legacy/periodic-package-stackviz-element/post.yaml - branches: master - timeout: 1800 - - project: templates: - nodejs8-jobs @@ -29,6 +21,6 @@ irrelevant-files: *irrelevant-files - tempest-full-rocky-py3: irrelevant-files: *irrelevant-files - periodic: + post: jobs: - - periodic-package-stackviz-element + - publish-openstack-stackviz-element diff --git a/playbooks/legacy/periodic-package-stackviz-element/post.yaml b/playbooks/legacy/periodic-package-stackviz-element/post.yaml deleted file mode 100644 index e2852e7..0000000 --- a/playbooks/legacy/periodic-package-stackviz-element/post.yaml +++ /dev/null @@ -1,21 +0,0 @@ -- hosts: primary - tasks: - - - name: Ensure artifacts directory exists - file: - path: '{{ zuul.executor.work_root }}/artifacts' - state: directory - delegate_to: localhost - - - name: Copy files from {{ ansible_user_dir }}/workspace/ on node - synchronize: - src: '{{ ansible_user_dir }}/workspace/' - dest: '{{ zuul.executor.work_root }}/artifacts/' - mode: pull - copy_links: true - verify_host: true - rsync_opts: - - --include=/dist/*.tar.gz - - --include=*/ - - --exclude=* - - --prune-empty-dirs diff --git a/playbooks/legacy/periodic-package-stackviz-element/run.yaml b/playbooks/legacy/periodic-package-stackviz-element/run.yaml deleted file mode 100644 index 0c951f6..0000000 --- a/playbooks/legacy/periodic-package-stackviz-element/run.yaml +++ /dev/null @@ -1,61 +0,0 @@ -- hosts: all - name: Autoconverted job legacy-periodic-package-stackviz-element from old job periodic-package-stackviz-element - roles: - - bindep - - tasks: - - - name: Ensure legacy workspace directory - file: - path: '{{ ansible_user_dir }}/workspace' - state: directory - - - shell: - cmd: | - set -e - set -x - export BRANCH=master - CLONEMAP=`mktemp` - function cleanup { - mkdir -p $WORKSPACE - rm -f $CLONEMAP - } - trap cleanup EXIT - cat > $CLONEMAP << EOF - clonemap: - - name: $ZUUL_PROJECT - dest: . - EOF - /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \ - --branch=$BRANCH \ - git://opendev.org $ZUUL_PROJECT - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -x - sudo rm -f /etc/sudoers.d/zuul - # Prove that general sudo access is actually revoked - ! sudo -n true - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}' - - - shell: - cmd: | - set -e - set -x - # NOTE(pabelanger): Delete npm mirror, since it is currently broken. - rm -rf ~/.npmrc - export DISPLAY=:99 - # Because we want to publish the build folder, create an empty - # .npmignore file. - touch .npmignore - npm install --verbose - npm run prod --verbose - mv dist/stackviz*.tar.gz dist/stackviz-latest.tar.gz - executable: /bin/bash - chdir: '{{ ansible_user_dir }}/workspace' - environment: '{{ zuul | zuul_legacy_vars }}'