Browse Source

Merge "Add branching in LOCI"

Zuul 4 months ago
parent
commit
886620357f
1 changed files with 14 additions and 1 deletions
  1. 14
    1
      playbooks/vars.yaml

+ 14
- 1
playbooks/vars.yaml View File

@@ -17,7 +17,17 @@ reuse_requirements: False
17 17
 # Override Zuul inferrence of source directory from project name to always
18 18
 # use "loci".
19 19
 loci_src_dir: "src/git.openstack.org/openstack/loci"
20
-branch: "{{ zuul_execution_branch.split('/')[-1] }}"
20
+# Branch name used for image building and publishing
21
+# If running in an environment with zuul and under a branched project
22
+# (like openstack/cinder, openstack/nova, ... but not openstack/loci)
23
+# this will be automatically be set to the appropriate branch name (rocky, queens, ...)
24
+branch: "{{ branchname | default(zuul_execution_branch.split('/')[-1]) }}"
25
+# Upstream code reference.
26
+# As LOCI is not building images on a per-commit basis on upstream openstack projects,
27
+# pointing to upstream zuul_branch for gating is enough.
28
+# If a project_ref is passed in a gating variable (like how you would do directly
29
+# in the command line), it will get consumed during image building.
30
+project_reference: "{% if project_ref is defined %}{{ project_ref }}{% elif zuul_branch is defined %}{{ zuul_branch }}{% else %}master{% endif %}"
21 31
 
22 32
 distros:
23 33
   - name: centos
@@ -30,6 +40,7 @@ distros:
30 40
       project:
31 41
         PROJECT: "{{ project }}"
32 42
         PROJECT_REPO: http://172.17.0.1/git/openstack/{{ project }}
43
+        PROJECT_REF: "{{ project_reference }}"
33 44
         WHEELS: 172.17.0.1:5000/loci/requirements:{{ branch }}-centos
34 45
         FROM: base:centos
35 46
       requirements:
@@ -49,6 +60,7 @@ distros:
49 60
       project:
50 61
         PROJECT: "{{ project }}"
51 62
         PROJECT_REPO: http://172.17.0.1/git/openstack/{{ project }}
63
+        PROJECT_REF: "{{ project_reference }}"
52 64
         WHEELS: 172.17.0.1:5000/loci/requirements:{{ branch }}-ubuntu
53 65
         FROM: base:ubuntu
54 66
       requirements:
@@ -84,6 +96,7 @@ distros:
84 96
 #      project:
85 97
 #        PROJECT: "{{ project }}"
86 98
 #        PROJECT_REPO: http://172.17.0.1/git/openstack/{{ project }}
99
+#        PROJECT_REF: "{{ project_reference }}"
87 100
 #        WHEELS: 172.17.0.1:5000/loci/requirements:master-debian
88 101
 #        FROM: base:debian
89 102
 #      requirements:

Loading…
Cancel
Save