Skip to content

Commit 3eb893d

Browse files
committed
testing-farm: install pre-release packages with Ansible
It's better to keep the test script focused on testing, not machine preparation.
1 parent 0f656de commit 3eb893d

File tree

4 files changed

+21
-14
lines changed

4 files changed

+21
-14
lines changed

testing-farm/prepare/machine-prepare.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
test_user: single-host-testing
1010

1111
roles:
12+
- pre-release-packages
1213
- credentials
1314
- ca-trust
1415
- resalloc
@@ -35,15 +36,6 @@
3536
package:
3637
name:
3738
- git
38-
state: latest
39-
40-
- name: print packit variable
41-
ansible.builtin.debug:
42-
msg: "$PACKIT_TARGET_SHA is '{{ lookup('ansible.builtin.env', 'PACKIT_TARGET_SHA') }}'"
43-
44-
- name: print packit variable
45-
ansible.builtin.debug:
46-
msg: "$PACKIT_PR_ID is '{{ lookup('ansible.builtin.env', 'PACKIT_PR_ID') }}'"
4739

4840
tasks:
4941
- name: create a testing project
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
- name: Install the script for pre-release package installation
3+
ansible.builtin.template:
4+
src: "{{ item }}.j2"
5+
dest: /usr/local/bin/{{ item }}
6+
mode: '0755'
7+
loop:
8+
- install-pre-release-packages
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#! /bin/bash
2+
3+
set -ex
4+
5+
cd "{{ lookup('env', 'TMT_TREE') }}"
6+
cd "$(git rev-parse --show-toplevel)"
7+
8+
packages=$(PYTHON_PKG_SUFFIX=3 ./releng/detect-changed-packages "$PACKIT_TARGET_SHA")
9+
./releng/install-copr-packages "@copr/copr-pull-requests:pr:$PACKIT_PR_ID" "$PACKIT_COMMIT_SHA" $packages

testing-farm/tests/sanity/test.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/bin/sh -eux
22

33
cd "$(git rev-parse --show-toplevel)"
4-
5-
# Note:
6-
# https://gitlab.com/testing-farm/tests/-/issues/2
7-
packages=$(PYTHON_PKG_SUFFIX=3 ./releng/detect-changed-packages "$PACKIT_TARGET_SHA")
8-
./releng/install-copr-packages "@copr/copr-pull-requests:pr:$PACKIT_PR_ID" "$PACKIT_COMMIT_SHA" $packages
4+
rpm -qa
5+
env
6+
pwd

0 commit comments

Comments
 (0)