Merge "Allow artifact promote jobs a little more control over renaming"

This commit is contained in:
Zuul 2019-06-12 20:38:13 +00:00 committed by Gerrit Code Review
commit ecae832e79
2 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,8 @@
- hosts: localhost
vars:
name_replacement: '.*?(-py.*?\.whl|\.tar\.gz)'
name_target: "{{zuul.project.short_name}}-{{zuul.branch | replace('/', '-')}}\\1"
name_extra: "{{ (artifact_extra_name|default('') and '-'+artifact_extra_name or '') | regex_replace('[^a-zA-z1-9_\\-.]', '') }}"
name_target: "{{zuul.project.short_name}}{{ name_extra }}-{{zuul.branch | replace('/', '-')}}\\1"
tasks:
- name: Check execution context
when: "zuul.branch is not defined"

View File

@ -466,9 +466,14 @@
The name of the job which built the artifacts which this
job should download and promote.
.. zuul:jobvar:: download_artifact_name
.. zuul:jobvar:: download_artifact_name
The name of the artifact.
.. zuul:jobvar:: artifact_extra_name
The artifact will be renamed to PROJECT-BRANCH.ext; if this
argument is present, it will be PROJECT-EXTRA-BRANCH.ext.
abstract: True
run: playbooks/artifacts/promote.yaml
nodeset:
@ -503,6 +508,7 @@
vars:
download_artifact_job: build-javascript-content-tarball
download_artifact_name: javascript_content
artifact_extra_name: js-content
secrets:
- secret: opendev-zuul-tarballs
name: afs