Add branching in LOCI

This will allow us to create jobs with branches to publish
images for different upstream branches direcly in LOCI.

Change-Id: I57e6cadd647e2bb624da4fea9749534de4617926
This commit is contained in:
Jean-Philippe Evrard 2018-10-11 10:13:08 +02:00
parent a45d25d181
commit 6bcde4f007
1 changed files with 14 additions and 1 deletions

View File

@ -13,7 +13,17 @@ reuse_requirements: False
# when running as a post job for cinder, the project is "cinder". We statically
# declare the path rather than using zuul variables so thats not an issue
loci_src_dir: "src/git.openstack.org/openstack/loci"
branch: "{{ zuul_execution_branch.split('/')[-1] }}"
# Branch name used for image building and publishing
# If running in an environment with zuul and under a branched project
# (like openstack/cinder, openstack/nova, ... but not openstack/loci)
# this will be automatically be set to the appropriate branch name (rocky, queens, ...)
branch: "{{ branchname | default(zuul_execution_branch.split('/')[-1]) }}"
# Upstream code reference.
# As LOCI is not building images on a per-commit basis on upstream openstack projects,
# pointing to upstream zuul_branch for gating is enough.
# If a project_ref is passed in a gating variable (like how you would do directly
# in the command line), it will get consumed during image building.
project_reference: "{% if project_ref is defined %}{{ project_ref }}{% elif zuul_branch is defined %}{{ zuul_branch }}{% else %}master{% endif %}"
distros:
- name: centos
@ -26,6 +36,7 @@ distros:
project:
PROJECT: "{{ project }}"
PROJECT_REPO: http://172.17.0.1/git/openstack/{{ project }}
PROJECT_REF: "{{ project_reference }}"
WHEELS: 172.17.0.1:5000/loci/requirements:{{ branch }}-centos
FROM: base:centos
requirements:
@ -45,6 +56,7 @@ distros:
project:
PROJECT: "{{ project }}"
PROJECT_REPO: http://172.17.0.1/git/openstack/{{ project }}
PROJECT_REF: "{{ project_reference }}"
WHEELS: 172.17.0.1:5000/loci/requirements:{{ branch }}-ubuntu
FROM: base:ubuntu
requirements:
@ -65,6 +77,7 @@ distros:
# project:
# PROJECT: "{{ project }}"
# PROJECT_REPO: http://172.17.0.1/git/openstack/{{ project }}
# PROJECT_REF: "{{ project_reference }}"
# WHEELS: 172.17.0.1:5000/loci/requirements:master-debian
# FROM: base:debian
# requirements: