docker: prefix role vars
These probably should have been prefixed to start with. The roles are brand new, not publicised, and likely not widely used. I think we can merge this without announcement or deprecation. Change-Id: I7825ef6fee1325b6d4fcc179032652eb5530d016
This commit is contained in:
parent
806d901b94
commit
1c827e4761
@ -42,7 +42,7 @@ using this role.
|
||||
The project directory. Serves as the base for
|
||||
:zuul:rolevar:`build-docker-image.docker_images.context`.
|
||||
|
||||
.. zuul:rolevar:: credentials
|
||||
.. zuul:rolevar:: docker_credentials
|
||||
:type: dict
|
||||
|
||||
This is only required for the upload and promote roles. This is
|
||||
|
@ -10,4 +10,4 @@
|
||||
--tag {{ item.repository }}:change_{{ zuul.change }}
|
||||
args:
|
||||
chdir: "{{ zuul_work_dir }}/{{ item.context }}"
|
||||
loop: "{{ images }}"
|
||||
loop: "{{ docker_images }}"
|
||||
|
@ -5,16 +5,16 @@
|
||||
url: "https://hub.docker.com/v2/users/login/"
|
||||
body_format: json
|
||||
body:
|
||||
username: "{{ credentials.username }}"
|
||||
password: "{{ credentials.password }}"
|
||||
username: "{{ docker_credentials.username }}"
|
||||
password: "{{ docker_credentials.password }}"
|
||||
register: jwt_token
|
||||
- name: Promote image
|
||||
loop: "{{ images }}"
|
||||
loop: "{{ docker_images }}"
|
||||
loop_control:
|
||||
loop_var: image
|
||||
include_tasks: promote-retag.yaml
|
||||
- name: Delete obsolete tags
|
||||
loop: "{{ images }}"
|
||||
loop: "{{ docker_images }}"
|
||||
loop_control:
|
||||
loop_var: image
|
||||
include_tasks: promote-cleanup.yaml
|
||||
|
@ -2,8 +2,8 @@
|
||||
no_log: true
|
||||
uri:
|
||||
url: "https://auth.docker.io/token?service=registry.docker.io&scope=repository:{{ image.repository }}:pull,push"
|
||||
user: "{{ credentials.username }}"
|
||||
password: "{{ credentials.password }}"
|
||||
user: "{{ docker_credentials.username }}"
|
||||
password: "{{ docker_credentials.password }}"
|
||||
force_basic_auth: true
|
||||
register: token
|
||||
- name: Get manifest
|
||||
|
@ -1,6 +1,6 @@
|
||||
- name: Log in to dockerhub
|
||||
command: "docker login -u {{ credentials.username }} -p {{ credentials.password }}"
|
||||
command: "docker login -u {{ docker_credentials.username }} -p {{ docker_credentials.password }}"
|
||||
no_log: true
|
||||
- name: Upload to dockerhub
|
||||
command: "docker push {{ item.repository }}:change_{{ zuul.change }}"
|
||||
loop: "{{ images }}"
|
||||
loop: "{{ docker_images }}"
|
||||
|
Loading…
Reference in New Issue
Block a user