project-config/jenkins/jobs/openstackid.yaml
Jeremy Stanley 63c0e5231a Templatize Laravel jobs
The unit test and release jobs for OpenStackID are potentially
useful for other Laravel-based projects, so genericize them.

Also stop redundantly adding the gate-openstackid-docs-ubuntu-xenial
job to openstack-infra/openstackid's entry in the Zuul layout since
it's already included in the infra-publish-jobs project-template.

Change-Id: I9ba26958ec1364de58df625e249fd74ae0d00a95
2017-06-08 19:58:03 +00:00

69 lines
2.1 KiB
YAML

- job-template:
name: gate-laravel-{name}-unittests
node: ubuntu-trusty
builders:
- zuul-git-prep
- install-distro-packages
- shell: |
#!/bin/bash -xe
sudo php5enmod mcrypt
- revoke-sudo
- shell: |
#!/bin/bash -xe
/usr/local/jenkins/slave_scripts/php-laravel-build.sh
publishers:
- coverage-log
- scp:
site: 'static.openstack.org'
files:
- target: 'logs/$LOG_PATH'
source: './reports/**'
keep-hierarchy: true
copy-after-failure: true
- console-log
- job-template:
name: laravel-{name}-release-{suffix}
node: ubuntu-trusty
builders:
- zuul-git-prep
- install-distro-packages
- shell: |
#!/bin/bash -xe
sudo php5enmod mcrypt
- revoke-sudo
- shell: |
#!/bin/bash -xe
/usr/local/jenkins/slave_scripts/version-properties.sh
- shell: |
#!/bin/bash -xe
source version.properties
/usr/local/jenkins/slave_scripts/php-laravel-build.sh
# Clone to dist
rm -rf dist
mkdir dist
rsync -arv --exclude ".git*" --exclude tarballs --exclude dist . dist
# Clean/create a tarball directory
rm -rf tarballs
mkdir -p tarballs
# Create an archive tarball.
tar -czf {name}-$PROJECT_VER.tar.gz dist/
cp {name}-$PROJECT_VER.tar.gz tarballs/{name}-latest.tar.gz
mv {name}-$PROJECT_VER.tar.gz tarballs/
publishers:
- coverage-log
- scp:
site: 'static.openstack.org'
files:
- target: 'logs/$LOG_PATH'
source: './reports/**'
keep-hierarchy: true
copy-after-failure: true
- target: 'tarballs/{name}/'
source: 'tarballs/*.tar.gz'
keep-hierarchy: false
copy-after-failure: false
- console-log