Skip to content

Commit e9e679f

Browse files
committed
Restart act_runner after update
And add a test scenario
1 parent 2794c3b commit e9e679f

File tree

9 files changed

+106
-7
lines changed

9 files changed

+106
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.5]
9+
#### Fixed
10+
11+
- Restart act_runner after update
12+
813
## [1.0.4]
914

1015
#### Fixed

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace: wzzrd
88
name: gitea
99

1010
# The version of the collection. Must be compatible with semantic versioning
11-
version: 1.0.4
11+
version: 1.0.5
1212

1313
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
1414
readme: README.md

roles/act/molecule/default/molecule.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,3 @@ provisioner:
2626
name: ansible
2727
verifier:
2828
name: ansible
29-
driver:
30-
options:
31-
managed: false
32-
login_cmd_template: "podman exec -ti {instance} bash"
33-
ansible_connection_options:
34-
ansible_connection: podman
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
- name: Converge act_runner 0.2.6
2+
hosts: all
3+
gather_facts: false
4+
vars:
5+
act_runner_version: "0.2.6"
6+
pre_tasks:
7+
- name: Gather required subset of facts
8+
ansible.builtin.setup:
9+
gather_subset:
10+
- '!all'
11+
12+
roles:
13+
- role: act
14+
15+
- name: Converge act_runner 0.2.10
16+
hosts: all
17+
gather_facts: false
18+
vars:
19+
act_runner_version: "0.2.10"
20+
pre_tasks:
21+
- name: Gather required subset of facts
22+
ansible.builtin.setup:
23+
gather_subset:
24+
- '!all'
25+
26+
roles:
27+
- role: act
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
dependency:
3+
name: galaxy
4+
options:
5+
requirements-file: requirements.yml
6+
platforms:
7+
- name: ubi8
8+
image: registry.access.redhat.com/ubi8/ubi-init
9+
pre_built_image: true
10+
cgroupns_mode: host
11+
volumes:
12+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
13+
privileged: true
14+
command: "/usr/sbin/init"
15+
platform: linux/amd64
16+
- name: ubi9
17+
image: registry.access.redhat.com/ubi9/ubi-init
18+
pre_built_image: true
19+
cgroupns_mode: host
20+
volumes:
21+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
22+
privileged: true
23+
command: "/usr/sbin/init"
24+
platform: linux/amd64
25+
provisioner:
26+
name: ansible
27+
verifier:
28+
name: ansible
29+
scenario:
30+
test_sequence:
31+
- dependency - cleanup
32+
- destroy
33+
- syntax
34+
- create
35+
- prepare
36+
- converge
37+
- side_effect
38+
- verify
39+
- cleanup
40+
- destroy

roles/act/molecule/update/prepare.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- name: Prepare containers for molecule tests
2+
hosts: all
3+
gather_facts: false
4+
tasks:
5+
- name: Install packages for during tests
6+
ansible.builtin.package:
7+
name: xz
8+
state: present
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
collections:
2+
- containers.podman
3+
- community.general

roles/act/molecule/update/verify.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
- name: Verify
2+
hosts: all
3+
# We disable gather facts because it would fail due to our container not
4+
# having python installed. This will not prevent use from running 'raw'
5+
# commands. Most molecule users are expected to use containers that already
6+
# have python installed in order to avoid notable delays installing it.
7+
gather_facts: false
8+
9+
tasks:
10+
- name: Check if act_runner binary exists
11+
block:
12+
- name: Check for existence of /usr/local/bin/act_runner
13+
ansible.builtin.stat:
14+
path: /usr/local/bin/act_runner
15+
register: act_runner_stat_result
16+
17+
- name: Verify result of previous task
18+
ansible.builtin.assert:
19+
that:
20+
- act_runner_stat_result.stat.exists

roles/act/tasks/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
- name: Download and install new binary, if needed
6161
when: (detected_version is not defined) or
6262
(act_runner_version != detected_version[1:])
63+
notify: Restart act_runner
6364
tags:
6465
- version
6566
block:
@@ -88,6 +89,7 @@
8889
dest: "{{ act_user_home }}/checksums.txt"
8990
owner: "{{ act_user }}"
9091
mode: "0640"
92+
force: true
9193

9294
- name: Get checksum for release from file
9395
block:

0 commit comments

Comments
 (0)