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

@ -6,31 +6,31 @@
- name: 'Download Nodejs'
unarchive:
src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/yarn/{{ nodejs_path }}.tar.gz'
dest: '{{ output_dir }}'
dest: '{{ remote_tmp_dir }}'
remote_src: yes
creates: '{{ output_dir }}/{{ nodejs_path }}.tar.gz'
creates: '{{ remote_tmp_dir }}/{{ nodejs_path }}.tar.gz'
- name: 'Download Yarn'
unarchive:
src: 'https://ansible-ci-files.s3.amazonaws.com/test/integration/targets/yarn/yarn-v{{yarn_version}}.tar.gz'
dest: '{{ output_dir }}'
dest: '{{ remote_tmp_dir }}'
remote_src: yes
creates: '{{ output_dir }}/yarn-v{{yarn_version}}_pkg.tar.gz'
creates: '{{ remote_tmp_dir }}/yarn-v{{yarn_version}}_pkg.tar.gz'
- name: 'Copy node to directory created earlier'
command: "mv {{ output_dir }}/{{ nodejs_path }} /usr/local/lib/nodejs/{{nodejs_path}}"
command: "mv {{ remote_tmp_dir }}/{{ nodejs_path }} /usr/local/lib/nodejs/{{nodejs_path}}"
# Clean up before running tests
- name: Remove any previous Nodejs modules
file:
path: '{{output_dir}}/node_modules'
path: '{{remote_tmp_dir}}/node_modules'
state: absent
# Set vars for our test harness
- vars:
#node_bin_path: "/usr/local/lib/nodejs/node-v{{nodejs_version}}/bin"
node_bin_path: "/usr/local/lib/nodejs/{{ nodejs_path }}/bin"
yarn_bin_path: "{{ output_dir }}/yarn-v{{ yarn_version }}/bin"
yarn_bin_path: "{{ remote_tmp_dir }}/yarn-v{{ yarn_version }}/bin"
package: 'iconv-lite'
environment:
PATH: "{{ node_bin_path }}:{{ansible_env.PATH}}"
@ -45,11 +45,11 @@
- name: 'Create dummy package.json'
copy:
src: templates/package.j2
dest: '{{ output_dir }}/package.json'
dest: '{{ remote_tmp_dir }}/package.json'
- name: 'Install all packages.'
yarn:
path: '{{ output_dir }}'
path: '{{ remote_tmp_dir }}'
executable: '{{ yarn_bin_path }}/yarn'
state: present
environment:
@ -57,7 +57,7 @@
- name: 'Install the same package from package.json again.'
yarn:
path: '{{ output_dir }}'
path: '{{ remote_tmp_dir }}'
executable: '{{ yarn_bin_path }}/yarn'
name: '{{ package }}'
state: present
@ -71,7 +71,7 @@
- name: 'Install all packages in check mode.'
yarn:
path: '{{ output_dir }}'
path: '{{ remote_tmp_dir }}'
executable: '{{ yarn_bin_path }}/yarn'
state: present
environment:
@ -89,7 +89,7 @@
- name: 'Install package with explicit version (older version of package)'
yarn:
path: '{{ output_dir }}'
path: '{{ remote_tmp_dir }}'
executable: '{{ yarn_bin_path }}/yarn'
name: left-pad
version: 1.1.0
@ -104,7 +104,7 @@
- name: 'Upgrade old package'
yarn:
path: '{{ output_dir }}'
path: '{{ remote_tmp_dir }}'
executable: '{{ yarn_bin_path }}/yarn'
name: left-pad
state: latest
@ -118,7 +118,7 @@
- name: 'Remove a package'
yarn:
path: '{{ output_dir }}'
path: '{{ remote_tmp_dir }}'
executable: '{{ yarn_bin_path }}/yarn'
name: '{{ package }}'
state: absent