File tree Expand file tree Collapse file tree
build_with_dockerfile/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ delta-consul-c
3737[user-vault]
3838localhost
3939
40+ [user-local]
41+ localhost
42+
4043[worker]
4144localhost
4245
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ gamma-consul-c
4141[user-vault]
4242localhost
4343
44+ [user-local]
45+ localhost
46+
4447[worker]
4548localhost
4649
Original file line number Diff line number Diff line change 11app_name : image-builder
22name : " {{ app_name }}"
3- # namespace (can include "registry.runnable.com:")
4- image_builder_docker_namespace : " {{ registry_host }}/runnable/image-builder"
5- app_repo : git@github.com:CodeNow/{{ app_name }}.git
3+
4+ repo : git@github.com:CodeNow/{{ name }}.git
65
76# consul values
87consul_values :
Original file line number Diff line number Diff line change 11---
2+ - hosts : user-local
3+ vars_files :
4+ - group_vars/alpha-image-builder.yml
5+ roles :
6+ - { role: build_with_dockerfile }
7+
28- hosts : " {{ dock | default('docks') }}"
39 vars_files :
410 - group_vars/alpha-image-builder.yml
511 roles :
6- - { role: notify, tags: [notify] }
7- - { role: node, tags: [setup] }
8- - { role: git_repo }
9- - { role: image-builder }
12+ - { role: pull-image }
1013 - { role: consul_value, tags: [consul_value] }
Original file line number Diff line number Diff line change 3030 become : yes
3131 command : docker build {{ build_args | default("") }} --tag="{{ container_image }}:{{ container_tag }}" "{{ build_dir }}/{{ name }}/repo"
3232
33+ - name : login to registry
34+ delegate_to : " {{ builder }}"
35+ tags : deploy, build
36+ become : yes
37+ command : docker login -u {{ registry_username }} -p {{ registry_token }} -e "info@runnable.com" {{ registry_host }}
38+
3339- name : push docker image
3440 delegate_to : " {{ builder }}"
3541 tags : deploy, build
3642 become : yes
37- ignore_errors : True
3843 command : docker push {{ container_image }}:{{ container_tag }}
44+
45+ - name : logout of registry
46+ delegate_to : " {{ builder }}"
47+ tags : deploy, build
48+ become : yes
49+ command : docker logout {{ registry_host }}
Original file line number Diff line number Diff line change 3131- name : set number of images built
3232 tags : deploy, build
3333 set_fact :
34+ # Quay IO includes deleted images in this query through the `end_ts` property
3435 no_images_found : " {{ currently_built_tags|json_query('json.tags')|length == 0 }}"
3536
3637- name : set number of images built
192193 tags : deploy, build
193194 when : build_image
194195 become : yes
195- command : docker logout
196+ command : docker logout {{ registry_host }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ---
2+ - name : login to registry
3+ tags : deploy
4+ become : yes
5+ command : docker login -u {{ registry_username }} -p {{ registry_token }} -e "info@runnable.com" {{ registry_host }}
6+
7+ - name : pull image
8+ tags : deploy
9+ become : true
10+ command : docker pull {{ container_image }}:{{ container_tag }}
11+
12+ - name : logout of registry
13+ tags : deploy
14+ become : yes
15+ command : docker logout {{ registry_host }}
You can’t perform that action at this time.
0 commit comments