Improve CI (#3348)

* Remove superfluous test.

* Use remote_temp_dir instead of output_dir on remote.

* Read certificate from correct place.

* Adjust more places.

* Fix boolean.

* Improve cryptography setup.

* Fix java_keystore changes.

* Need to copy binary from remote.

* Use correct Python for serve script.

* Sleep before downloading.

* Use correct Python interpreter.

* Avoid failing shebang test.

* Fix permission error with macOS 11.1.

* Avoid shebang trouble.
This commit is contained in:
Felix Fontein 2021-09-09 07:31:44 +02:00 committed by GitHub
commit 7c43cc3faa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 440 additions and 394 deletions

View file

@ -1,2 +1,3 @@
dependencies:
- setup_pkg_mgr
- setup_remote_tmp_dir

View file

@ -14,15 +14,23 @@
- debug: var=install_pycdlib
- set_fact:
output_dir_test: '{{ output_dir }}/test_iso_create'
output_test_dir: '{{ remote_tmp_dir }}/test_iso_create'
# - include_tasks: prepare_dest_dir.yml
- name: Copy files and directories
copy:
src: '{{ item }}'
dest: '{{ remote_tmp_dir }}/{{ item }}'
loop:
- test1.cfg
- test_dir
- name: Test check mode
iso_create:
src_files:
- "{{ role_path }}/files/test1.cfg"
dest_iso: "{{ output_dir_test }}/test.iso"
- "{{ remote_tmp_dir }}/test1.cfg"
dest_iso: "{{ output_test_dir }}/test.iso"
interchange_level: 3
register: iso_result
check_mode: yes
@ -30,7 +38,7 @@
- name: Check if iso file created
stat:
path: "{{ output_dir_test }}/test.iso"
path: "{{ output_test_dir }}/test.iso"
register: iso_file
- debug: var=iso_file
- assert:
@ -41,15 +49,15 @@
- name: Create iso file with a specified file
iso_create:
src_files:
- "{{ role_path }}/files/test1.cfg"
dest_iso: "{{ output_dir_test }}/test.iso"
- "{{ remote_tmp_dir }}/test1.cfg"
dest_iso: "{{ output_test_dir }}/test.iso"
interchange_level: 3
register: iso_result
- debug: var=iso_result
- name: Check if iso file created
stat:
path: "{{ output_dir_test }}/test.iso"
path: "{{ output_test_dir }}/test.iso"
register: iso_file
- assert:
@ -60,16 +68,16 @@
- name: Create iso file with a specified file and folder
iso_create:
src_files:
- "{{ role_path }}/files/test1.cfg"
- "{{ role_path }}/files/test_dir"
dest_iso: "{{ output_dir_test }}/test1.iso"
- "{{ remote_tmp_dir }}/test1.cfg"
- "{{ remote_tmp_dir }}/test_dir"
dest_iso: "{{ output_test_dir }}/test1.iso"
interchange_level: 3
register: iso_result
- debug: var=iso_result
- name: Check if iso file created
stat:
path: "{{ output_dir_test }}/test1.iso"
path: "{{ output_test_dir }}/test1.iso"
register: iso_file
- assert:
@ -80,15 +88,15 @@
- name: Create iso file with volume identification string
iso_create:
src_files:
- "{{ role_path }}/files/test1.cfg"
dest_iso: "{{ output_dir_test }}/test2.iso"
- "{{ remote_tmp_dir }}/test1.cfg"
dest_iso: "{{ output_test_dir }}/test2.iso"
vol_ident: "OEMDRV"
register: iso_result
- debug: var=iso_result
- name: Check if iso file created
stat:
path: "{{ output_dir_test }}/test2.iso"
path: "{{ output_test_dir }}/test2.iso"
register: iso_file
- assert:
@ -99,15 +107,15 @@
- name: Create iso file with Rock Ridge extention
iso_create:
src_files:
- "{{ role_path }}/files/test1.cfg"
dest_iso: "{{ output_dir_test }}/test3.iso"
- "{{ remote_tmp_dir }}/test1.cfg"
dest_iso: "{{ output_test_dir }}/test3.iso"
rock_ridge: "1.09"
register: iso_result
- debug: var=iso_result
- name: Check if iso file created
stat:
path: "{{ output_dir_test }}/test3.iso"
path: "{{ output_test_dir }}/test3.iso"
register: iso_file
- assert:
@ -118,15 +126,15 @@
- name: Create iso file with Joliet extention
iso_create:
src_files:
- "{{ role_path }}/files/test1.cfg"
dest_iso: "{{ output_dir_test }}/test4.iso"
- "{{ remote_tmp_dir }}/test1.cfg"
dest_iso: "{{ output_test_dir }}/test4.iso"
joliet: 3
register: iso_result
- debug: var=iso_result
- name: Check if iso file created
stat:
path: "{{ output_dir_test }}/test4.iso"
path: "{{ output_test_dir }}/test4.iso"
register: iso_file
- assert:
@ -137,15 +145,15 @@
- name: Create iso file with UDF enabled
iso_create:
src_files:
- "{{ role_path }}/files/test1.cfg"
dest_iso: "{{ output_dir_test }}/test5.iso"
- "{{ remote_tmp_dir }}/test1.cfg"
dest_iso: "{{ output_test_dir }}/test5.iso"
udf: True
register: iso_result
- debug: var=iso_result
- name: Check if iso file created
stat:
path: "{{ output_dir_test }}/test5.iso"
path: "{{ output_test_dir }}/test5.iso"
register: iso_file
- assert:

View file

@ -3,10 +3,10 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- name: Make sure our testing sub-directory does not exist
file:
path: '{{ output_dir_test }}'
path: '{{ output_test_dir }}'
state: absent
- name: Create our testing sub-directory
file:
path: '{{ output_dir_test }}'
path: '{{ output_test_dir }}'
state: directory