-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrelease.yml
55 lines (49 loc) · 1.8 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- name: Package an Allspark release
hosts: all
roles:
- { role: download, force_download: true }
tasks:
- name: Creating release directory
file:
state: directory
path: "{{ allspark_release_tmp_directory }}/{{ item }}"
with_items:
- images
- dependencies
- name: Archive RedHat system dependencies for installer
script: "files/download_yum_packages.sh {{ allspark_release_tmp_directory }}/dependencies"
- name: Archive Jenkins plugins
shell: "files/download_jenkins_plugins.sh"
environment:
VOLUME_NAME: allspark_jenkins_plugins
TARGET: "{{ allspark_release_tmp_directory}}/dependencies/jenkins_plugins"
REQUIREMENTS_FILE: "{{ playbook_dir }}/files/jenkins_plugins.txt"
when: allspark_jenkins.enabled
#Need to analyse on issue #74
tags:
- skip_ansible_lint
- name: Export Docker images
docker_image:
state: present
archive_path: "{{ allspark_release_tmp_directory}}/images/{{ item | b64encode }}.tar"
name: "{{ downloads[item].image }}:{{ downloads[item].tag }}"
with_items: "{{ downloads.keys() | list }}"
# - name: Compress release into destination file
# archive:
# path: "{{ allspark_release_tmp_directory }}/*"
# dest: "{{ allspark_release_destination }}"
# remove: True
# become: true
# Using shell instead of unarchive because pigz (multicore compression)
# is not yet supported by the archive module
- name: Compress release into destination file
shell: "tar -c --use-compress-program=pigz -f {{ allspark_release_destination }} -C {{ allspark_release_tmp_directory }} ."
args:
warn: False
become: true
tags:
- skip_ansible_lint
- name: Clean up release directory
file:
path: "{{ allspark_release_tmp_directory }}"
state: absent