61 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2022-10-15 22:31:37 +02:00
# create folder build
2022-10-15 22:06:06 +02:00
- name: git archive local
local_action:
module: git
2022-10-15 22:49:00 +02:00
repo: "https://{{ git_username | urlencode }}:{{ git_password | urlencode }}@git.valczeryba.ovh/v4l3n71n/{{ quarkus_project }}.git"
2022-10-15 22:06:06 +02:00
dest: "/home/valentin/src/"
2022-10-15 22:49:00 +02:00
archive: "/tmp/{{ quarkus_project }}.tar.gz"
2022-10-15 22:06:06 +02:00
force: yes
update: yes
2022-10-15 22:49:00 +02:00
when: "quarkus_project is defined"
2022-10-15 22:06:06 +02:00
- name: Create directory
file:
2022-10-15 22:49:00 +02:00
path: "{{ home_dir }}/{{ quarkus_project }}"
2022-10-15 22:06:06 +02:00
state: directory
2022-10-15 22:49:00 +02:00
when: "quarkus_project is defined"
2022-10-15 22:06:06 +02:00
2022-10-15 22:49:00 +02:00
- name: Extract covas quarkus
2022-10-15 22:06:06 +02:00
unarchive:
2022-10-15 22:49:00 +02:00
src: "/tmp/{{ quarkus_project }}.tar.gz"
dest: "{{ home_dir }}/{{ quarkus_project }}"
when: "quarkus_project is defined"
2022-10-15 22:06:06 +02:00
- name: Template env file
template:
2022-10-15 22:49:00 +02:00
src: "env-build.j2"
2022-11-03 21:53:42 +01:00
dest: "{{ home_dir }}/{{ quarkus_project }}/.env"
- name: Pause for build image
pause:
2022-11-06 18:13:59 +01:00
prompt: aller au dossier {{ home_dir }}/{{ quarkus_project }}, et exécuter le script build-image.sh
- name: Get quarkus image
docker_image_info:
name: quarkus-native
register: result
- name: Check quarkus image
assert:
that:
- result.images | length == 1
2022-11-26 18:37:05 +01:00
- name: Login to scaleway registry
docker_login:
registry_url: rg.fr-par.scw.cloud/covas
username: nologin
password: "{{ token_scaleway }}"
reauthorize: true
2022-11-06 18:13:59 +01:00
- name: Tag and push to custom registry
docker_image:
name: quarkus-native
2022-11-26 18:37:05 +01:00
repository: rg.fr-par.scw.cloud/covas/quarkus-native
2022-11-06 18:13:59 +01:00
tag: latest
push: yes
source: local