Skip to content

Commit 0c49a5c

Browse files
committed
Use environment variables in tests
1 parent 237f4fc commit 0c49a5c

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

.github/workflows/testing-farm.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ jobs:
2828
tmt_path: "tmt"
2929
tmt_plan_regex: "fedora-init"
3030
pull_request_status_name: "Fedora init test"
31-
update_pull_request_status: "true"
3231
create_github_summary: "true"
33-
variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};REPO_NAME=${{ github.repository }};PR_NUMBER=${{ github.event.issue.number }};"
32+
update_pull_request_status: "true"
33+
variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};PR_HEAD=${{ github.event.pull_request.head.sha }};"
34+
3435
test-upgrade:
3536
runs-on: ubuntu-latest
3637

@@ -55,7 +56,7 @@ jobs:
5556
pull_request_status_name: "Fedora upgrade test"
5657
update_pull_request_status: "true"
5758
create_github_summary: "true"
58-
variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};REPO_NAME=${{ github.repository }};PR_NUMBER=${{ github.event.issue.number }};"
59+
variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};PR_HEAD=${{ github.event.pull_request.head.sha }};"
5960
container-test-init:
6061
runs-on: ubuntu-latest
6162

@@ -80,7 +81,8 @@ jobs:
8081
pull_request_status_name: "Fedora container init test"
8182
update_pull_request_status: "true"
8283
create_github_summary: "true"
83-
variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};REPO_NAME=${{ github.repository }};PR_NUMBER=${{ github.event.issue.number }};"
84+
variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};PR_HEAD=${{ github.event.pull_request.head.sha }};"
85+
8486
container-test-upgrade:
8587
runs-on: ubuntu-latest
8688

@@ -105,6 +107,6 @@ jobs:
105107
pull_request_status_name: "Fedora container upgrade test"
106108
update_pull_request_status: "true"
107109
create_github_summary: "true"
108-
variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};REPO_NAME=${{ github.repository }};PR_NUMBER=${{ github.event.pull_request.head.sha }};"
110+
variables: "REPO_URL=${{ github.server_url }}/${{ github.repository }};PR_HEAD=${{ github.event.pull_request.head.sha }};"
109111

110112

tmt/tests/container/sanity/init/init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
# prep
3-
git clone "$TESTING_FARM_GIT_URL" repo
3+
git clone "$REPO_URL" repo
44
cd repo
5-
git fetch origin "$TESTING_FARM_GIT_REF"
5+
git fetch origin "$PR_HEAD"
66
git checkout FETCH_HEAD
77

88
grep -q systemd /proc/1/comm

tmt/tests/container/sanity/upgrade/upgrade.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
# prep
3-
git clone "$TESTING_FARM_GIT_URL" repo
3+
git clone "$REPO_URL" repo
44
cd repo
5-
git fetch origin "$TESTING_FARM_GIT_REF"
5+
git fetch origin "$PR_HEAD"
66
git checkout FETCH_HEAD
77

88
echo "Fedora release:"

tmt/tests/virtual/sanity/init/init.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/bin/bash
22
# prep
3-
git clone "$TESTING_FARM_GIT_URL" repo
3+
git clone "$REPO_URL" repo
44
cd repo
5-
git fetch origin "$TESTING_FARM_GIT_REF"
5+
git fetch origin "$PR_HEAD"
66
git checkout FETCH_HEAD
7+
git log -1 --oneline
78

89
# setup
910
autoreconf -vfi

tmt/tests/virtual/sanity/upgrade/upgrade.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
# prep
3-
git clone "$TESTING_FARM_GIT_URL" repo
3+
git clone "$REPO_URL" repo
44
cd repo
5-
git fetch origin "$TESTING_FARM_GIT_REF"
5+
git fetch origin "$PR_HEAD"
66
git checkout FETCH_HEAD
77
echo "Fedora release:"
88
cat /etc/fedora-release

0 commit comments

Comments
 (0)