fuel-ccp-ci-config/jenkins-tp/jobs/macros.yaml

170 lines
3.6 KiB
YAML

#
# Configurable repository sources
#
- scm:
name: mcpinstaller
scm:
- git:
url: 'ssh://nextgen-ci@review.fuel-infra.org:29418/{scm-repo}'
branches:
- '{scm-branch}'
basedir: '{scm-basedir}'
- scm:
name: openstack
scm:
- git:
url: 'https://git.openstack.org/openstack/{scm-repo}.git'
branches:
- '{scm-branch}'
basedir: '{scm-basedir}'
- scm:
name: fuel-infra
scm:
- git:
url: 'ssh://nextgen-ci@review.fuel-infra.org:29418/{scm-repo}.git'
basedir: '{scm-basedir}'
skip-tag: true
branches:
- '{scm-branch}'
- scm:
name: zuul_repo
scm:
- git:
url: $ZUUL_URL/$ZUUL_PROJECT
branches:
- $ZUUL_BRANCH
#
# Repository source with gerrit changes
#
- scm:
name: zuul_repo_trigger
scm:
- git:
basedir: '{scm-basedir}'
branches:
- $ZUUL_BRANCH
remotes:
- gerrit:
refspec: $ZUUL_REF
url: $ZUUL_URL/$ZUUL_PROJECT
#
# Static repositories
#
#
# SSH credentials
#
- wrapper:
name: fuel-ccp-ci-jenkins
wrappers:
- ssh-agent-credentials:
users:
- '77acc946-f346-4665-8271-c141b6ae9764'
- wrapper:
name: fuel-ccp-ci-docs
wrappers:
- ssh-agent-credentials:
users:
- '04a7dbe6-f3cd-4cc1-afc5-b8f2bd6cbb38'
- wrapper:
name: 'ng-cleanup'
wrappers:
- workspace-cleanup
#
# Publishers
#
# TODO: check target fuel-ccp-ci
- publisher:
name: logs-public
publishers:
- ssh:
site: 'ci-logs.fuel-infra.org'
target: 'fuel-ccp-ci/$JOB_NAME/$BUILD_ID'
source: 'logs/*'
flatten: true
- publisher:
name: logs-private
publishers:
- archive:
allow-empty: true
artifacts: 'logs/*'
latest-only: false
- publisher:
name: email-image-build
publishers:
- email-ext:
body: '{body-failed}'
aborted: true
failure: true
still-failing: true
fixed: false
send-to:
- recipients
recipients: '{mail-to}'
subject: '[Jenkins] $JOB_NAME - #$BUILD_ID'
#
# Builders
#
- builder:
name: check-tox
builders:
- shell: 'tox -v -e {tox-test}'
- builder:
name: build-image
builders:
- shell: |
#!/bin/bash -xe
virtualenv {name}env
source {name}env/bin/activate
pip install --upgrade pip
pip install fuel-ccp/
cat > ccp-test.yaml << EOF
debug: True
builder:
no_cache: True
images:
namespace: {name}build
tag: latest
maintainer: mirantis@mirantis.com
repositories:
path: containers/openstack
skip_empty: True
names: [{repos}]
EOF
cat ccp-test.yaml
ccp --config-file ccp-test.yaml build
deactivate
- builder:
name: get-from-zuul-container
builders:
- shell: |
git clone https://git.openstack.org/openstack/fuel-ccp
mkdir -p containers/$ZUUL_PROJECT
cd containers/$ZUUL_PROJECT
git clone https://git.openstack.org/$ZUUL_PROJECT .
git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF
git checkout FETCH_HEAD
- builder:
name: get-from-zuul
builders:
- shell: |
git clone https://git.openstack.org/$ZUUL_PROJECT .
git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF
git checkout FETCH_HEAD
git status