Skip to content

Commit

Permalink
automation: create EXPORT_DIR only in scripts
Browse files Browse the repository at this point in the history
We already prepare the exported-artifacts directory in test scripts if
it does not exists. There is no reason to create it before in the GitHub
action. This simplifies the action a little and reduces duplication.

Signed-off-by: Tomáš Golembiovský <[email protected]>
  • Loading branch information
nyoxi committed Feb 1, 2022
1 parent 60cb84b commit c5b84f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
matrix:
distro: [el8stream, el9stream]
steps:
- name: Prepare env
run: mkdir -p ${PWD}/${EXPORT_DIR}/
- uses: actions/checkout@v2
with:
fetch-depth: 0
Expand Down
8 changes: 4 additions & 4 deletions automation/build-artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -xe
[[ -d exported-artifacts ]] \
|| mkdir -p exported-artifacts
[[ -d "${EXPORT_DIR}" ]] \
|| mkdir -p "${EXPORT_DIR}"

# mock runner is not setting up the system correctly
# https://issues.redhat.com/browse/CPDEVOPS-242
Expand All @@ -27,7 +27,7 @@ rpmbuild \
-ta ./*.tar.gz

# Move tarball to exported artifacts
mv ./*.tar.gz exported-artifacts/
mv ./*.tar.gz "${EXPORT_DIR}/"

# Move RPMs to exported artifacts
find "$BUILD_DIR" -iname \*rpm -exec mv "{}" exported-artifacts/ \;
find "$BUILD_DIR" -iname \*rpm -exec mv "{}" "${EXPORT_DIR}/" \;
4 changes: 2 additions & 2 deletions automation/check-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH="..:.:$PYTHONPATH" \
python3 -m coverage run --rcfile=../automation/coverage.rc testrunner.py ./*.py
python3 -m coverage html --rcfile=../automation/coverage.rc
mv htmlcov ../exported-artifacts/htmlcov-py3
mv htmlcov "../${EXPORT_DIR}/htmlcov-py3"
cd ..

dnf --downloadonly install -y exported-artifacts/*noarch*.rpm
dnf --downloadonly install -y "${EXPORT_DIR}"/*noarch*.rpm

0 comments on commit c5b84f8

Please sign in to comment.