Created
August 10, 2016 17:31
-
-
Save harlowja/748ddc47dd327ba25de6f60d77c5c5e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This contains all the jobs needed for testing of the external version | |
# of cloud-init and internal building and testing of our extensions and | |
# package building processes. | |
- project: | |
name: cloud-init | |
#mail-to: cloud@godaddy.com | |
os: | |
- cent6 | |
- cent7 | |
jobs: | |
- 'cloud-init-test' | |
- 'cloud-init-patch' | |
- 'cloud-init-post-patch-test' | |
- 'cloud-init-post-patch-package-{os}' | |
- job: | |
name: 'cloud-init-test' | |
node: build-slaves | |
# We don't want this job running when downstream jobs are still | |
# working through there stuff... | |
block-downstream: true | |
defaults: global | |
display-name: "Cloud-init (upstream) download & test" | |
scm: | |
- "cloud-init" | |
builders: | |
- net-info | |
- revoke-sudo | |
- setup-venv | |
- shell: | | |
#!/bin/bash -xe | |
source .venv/bin/activate | |
nosetests --with-xunit -v | |
triggers: | |
- pollscm: '@hourly' | |
publishers: | |
- junit: | |
results: nosetests.xml | |
#- email-ext: | |
# recipients: cloud@godaddy.com | |
# attach-build-log: true | |
# reply-to: cloud@godaddy.com | |
# failure: true | |
- trigger-parameterized-builds: | |
- project: cloud-init-patch | |
git-revision: true | |
include-upstream: true | |
condition: SUCCESS | |
node-parameters: true | |
- job: | |
name: 'cloud-init-patch' | |
defaults: global | |
node: build-slaves | |
# We don't want this job running when downstream jobs are still | |
# working through there stuff... (especially since those jobs will | |
# pull the workspace from the last successful post-patch job). | |
block-downstream: true | |
display-name: "Cloud-init (downstream) augmentation" | |
scm: | |
# Due to how the prior job exports the git-revision, this usage | |
# should ensure that the checkout of cloud-init uses the same git | |
# revision that passede the prior tests. | |
- "cloud-init" | |
builders: | |
- net-info | |
- revoke-sudo | |
- shell: | | |
#!/bin/bash -xe | |
# Checkout the additions repo... | |
# | |
# TODO(harlowja): is there a better way to do this (using the scm | |
# path) without blowing away the env variables from the prior job?? | |
git clone git@github.secureserver.net:cloudplatform/els-cloud-init.git | |
ADD_ON_DIR=$WORKSPACE/els-cloud-init | |
cp $ADD_ON_DIR/cloud.cfg config/cloud.cfg | |
for filename in $(ls $ADD_ON_DIR/modules); do | |
cp $ADD_ON_DIR/modules/$filename cloudinit/config/$filename | |
# NOTE(harlowja): this is needed otherwise the package building won't | |
# find these files when building a tarball (since they were never | |
# committed). | |
git add cloudinit/config/$filename | |
done | |
for filename in $(ls $ADD_ON_DIR/templates); do | |
cp $ADD_ON_DIR/templates/$filename templates/$filename | |
# NOTE(harlowja): this is needed otherwise the package building won't | |
# find these files when building a tarball (since they were never | |
# committed). | |
git add templates/$filename | |
done | |
cp $ADD_ON_DIR/05_logging.cfg config/cloud.cfg.d/05_logging.cfg | |
publishers: | |
#- email-ext: | |
# recipients: cloud@godaddy.com | |
# attach-build-log: true | |
# reply-to: cloud@godaddy.com | |
# failure: true | |
- clone-workspace: | |
override-default-excludes: true | |
- trigger: | |
project: 'cloud-init-post-patch-test' | |
- job: | |
name: 'cloud-init-post-patch-test' | |
display-name: "Cloud-init (downstream) post-augmentation testing" | |
node: build-slaves | |
defaults: global | |
builders: | |
- net-info | |
- revoke-sudo | |
- setup-venv | |
- shell: | | |
#!/bin/bash -xe | |
source .venv/bin/activate | |
nosetests --with-xunit -v | |
publishers: | |
- junit: | |
results: nosetests.xml | |
#- email-ext: | |
# recipients: cloud@godaddy.com | |
# attach-build-log: true | |
# reply-to: cloud@godaddy.com | |
# failure: true | |
- trigger: | |
project: 'cloud-init-post-patch-package-cent6' | |
- trigger: | |
project: 'cloud-init-post-patch-package-cent7' | |
scm: | |
- workspace: | |
parent-job: cloud-init-patch | |
criteria: Successful | |
- job-template: | |
name: 'cloud-init-post-patch-package-{os}' | |
display-name: "Cloud-init (downstream) post-augmentation packaging for {os}" | |
defaults: global | |
node: build-slave-{os} | |
builders: | |
- net-info | |
- revoke-sudo | |
- setup-venv | |
- prep-pkg-build | |
- shell: | | |
#!/bin/bash -xe | |
source .venv/bin/activate | |
distro_kind={os} | |
# Get cloud-init rpm building to build out the source rpm. | |
if [ "$distro_kind" == "cent7" ]; then | |
boot_type="systemd" | |
elif [ "$distro_kind" == "cent6" ]; then | |
boot_type="sysvinit" | |
else | |
echo "Unknown distro $distro_kind" | |
exit 1 | |
fi | |
python packages/brpm -b $boot_type -v --srpm | |
#publishers: | |
#- email-ext: | |
# recipients: cloud@godaddy.com | |
# attach-build-log: true | |
# reply-to: cloud@godaddy.com | |
# failure: true | |
scm: | |
- workspace: | |
parent-job: cloud-init-patch | |
criteria: Successful |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment