project-config/playbooks/javascript/post-stackviz.yaml
Clark Boylan 2db422f0b8 Run ansible-lint on Ubuntu Noble
We ran into issues getting ansible-lint to run on Noble without updating
everything to current ish versions due to Python 3.12 compatibility
issues. Updating everything in this way created a bunch of new lint
errors we need to fix so we worked around the problem previously by
pinning back to Jammy.

Now we move the job back to Noble (the default Nodeset) and update the
tooling and fix the linter errors. This should allow us to move forward
in a productive manner on modern platforms.

The linter errors we fix include:

 * Naming every play
 * Ensuring every play name starts with a capital letter
 * Using fully qualified collection names for action modules
   (archive, git_config, and synchronize)
 * Quoting octal file modes

Change-Id: I96560c5ce2a5af39d39b3fc339862932a856bd13
2024-08-21 12:55:46 -07:00

46 lines
1.3 KiB
YAML

- name: Process Stackviz Artifacts
hosts: all
tasks:
- name: Rename tarball and move it to a subdir named dist as well
shell: |
mkdir dist
mv {{ zuul.project.short_name }}*.tar.gz dist/{{ zuul.project.short_name }}-latest.tar.gz
args:
executable: /bin/bash
chdir: "{{ zuul.project.src_dir }}/dist"
# 302 mkdir used in place of argument state=directory to file module
tags:
- skip_ansible_lint
- name: Ensure artifacts directory exists
file:
path: "{{ zuul.executor.work_root }}/artifacts"
state: directory
delegate_to: localhost
- name: Collect artifacts
ansible.posix.synchronize:
dest: "{{ zuul.executor.work_root }}/artifacts/"
mode: pull
src: "{{ zuul.project.src_dir }}/dist/"
verify_host: true
- name: Find tarball tarball
find:
file_type: file
paths: "{{ zuul.project.src_dir }}/dist/"
patterns: "*.tar.gz"
register: result
- name: Return artifacts to Zuul
loop: "{{ result.files }}"
zuul_return:
data:
zuul:
artifacts:
- name: Javascript content archive
url: "artifacts/{{ item.path | basename }}"
metadata:
type: javascript_content