38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
- hosts: all
|
|
name: Autoconverted job legacy-gearman-plugin-jenkinsci-upload from old job gearman-plugin-jenkinsci-upload
|
|
tasks:
|
|
|
|
- name: Ensure legacy workspace directory
|
|
file:
|
|
path: '{{ ansible_user_dir }}/workspace'
|
|
state: directory
|
|
|
|
- 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
|
|
TAG=`echo $ZUUL_REF | sed 's/^refs.tags.//'`
|
|
FILENAME_HPI="$ZUUL_SHORT_PROJECT_NAME-$TAG.hpi"
|
|
|
|
# copy plugin artifacts from tarballs to local workspace
|
|
rm -rf *.hpi
|
|
curl -o $FILENAME_HPI http://tarballs.openstack.org/ci/$ZUUL_SHORT_PROJECT_NAME/$FILENAME_HPI
|
|
|
|
# deploy to maven repository
|
|
FILENAME_POM="$ZUUL_SHORT_PROJECT_NAME-$TAG.pom"
|
|
/usr/local/jenkins/slave_scripts/jenkinsci-upload.sh $ZUUL_SHORT_PROJECT_NAME $TAG \
|
|
$FILENAME_POM $FILENAME_HPI
|
|
executable: /bin/bash
|
|
chdir: '{{ ansible_user_dir }}/workspace'
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|