Merge "Move legacy-periodic-package-stackviz-element job to stackviz repo"
This commit is contained in:
commit
75db7000a9
10
.zuul.yaml
10
.zuul.yaml
@ -1,3 +1,11 @@
|
||||
- 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:
|
||||
- nodejs4-jobs
|
||||
@ -8,4 +16,4 @@
|
||||
- openstack-python37-jobs
|
||||
periodic:
|
||||
jobs:
|
||||
- legacy-periodic-package-stackviz-element
|
||||
- periodic-package-stackviz-element
|
||||
|
21
playbooks/legacy/periodic-package-stackviz-element/post.yaml
Normal file
21
playbooks/legacy/periodic-package-stackviz-element/post.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
- 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
|
61
playbooks/legacy/periodic-package-stackviz-element/run.yaml
Normal file
61
playbooks/legacy/periodic-package-stackviz-element/run.yaml
Normal file
@ -0,0 +1,61 @@
|
||||
- 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://git.openstack.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 }}'
|
Loading…
x
Reference in New Issue
Block a user