Browse Source

Merge zuul-website-media when publishing site

The protected attribute is removed so these jobs can also be run
in the zuul-website-media project.  The parent job retains an
allowed-project setting which accomplishes the same thing.

Depends-On: https://review.openstack.org/561747
Change-Id: Ifc310307632d3388b5ff8bdedd7e8153406d69d6
changes/49/561749/5
James E. Blair 1 year ago
parent
commit
66643f2e05
3 changed files with 14 additions and 4 deletions
  1. 6
    1
      .zuul.yaml
  2. 2
    1
      roles/build-site/README.rst
  3. 6
    2
      roles/build-site/tasks/main.yaml

+ 6
- 1
.zuul.yaml View File

@@ -2,6 +2,9 @@
2 2
     name: zuul-website-build
3 3
     description: |
4 4
       Publishes a draft version of the Zuul website.
5
+    required-projects:
6
+      - openstack-infra/zuul-website
7
+      - openstack-infra/zuul-website-media
5 8
     success-url: html/
6 9
     run: playbooks/build-site.yaml
7 10
     post-run: playbooks/publish-draft-site.yaml
@@ -13,7 +16,9 @@
13 16
     parent: publish-zuul-website
14 17
     description: |
15 18
       Publishes the Zuul website.
16
-    protected: True  # Only run this job in this repo
19
+    required-projects:
20
+      - openstack-infra/zuul-website
21
+      - openstack-infra/zuul-website-media
17 22
     run: playbooks/build-site.yaml
18 23
     post-run: playbooks/publish-site.yaml
19 24
     nodeset:

+ 2
- 1
roles/build-site/README.rst View File

@@ -4,7 +4,8 @@ The Zuul website is currently static, however, if it later is built
4 4
 by a static site generator, or otherwise needs pre-processing,
5 5
 this role should perform that.
6 6
 
7
-Right now, it just copies files.
7
+Right now, it just copies files from the zuul-website and
8
+zuul-website-media repos.
8 9
 
9 10
 **Role Variables**
10 11
 

+ 6
- 2
roles/build-site/tasks/main.yaml View File

@@ -1,4 +1,8 @@
1
-- name: Copy site to output directory
1
+- name: Copy website to output directory
2 2
   copy:
3
-    src: "{{ zuul_work_dir }}/www/"
3
+    src: "{{ zuul.executor.work_root }}/{{ zuul.projects['git.openstack.org/openstack-infra/zuul-website'].src_dir }}/www/"
4 4
     dest: "{{ output_dir }}"
5
+- name: Copy media to output directory
6
+  copy:
7
+    src: "{{ zuul.executor.work_root }}/{{ zuul.projects['git.openstack.org/openstack-infra/zuul-website-media'].src_dir }}/media/"
8
+    dest: "{{ output_dir }}/media"

Loading…
Cancel
Save