Skip to content

Commit

Permalink
.github: removed torcx artifact handling from github CI
Browse files Browse the repository at this point in the history
Signed-off-by: Thilo Fromm <[email protected]>
  • Loading branch information
t-lo committed Oct 26, 2023
1 parent 3cfe25a commit 54d04cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 63 deletions.
28 changes: 3 additions & 25 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,8 @@ jobs:
[ -z "${{ inputs.image_formats }}" ] || IMAGE_FORMATS="${{ inputs.image_formats }}"
echo "IMAGE_FORMATS=${IMAGE_FORMATS}" >> $GITHUB_ENV
# Artifact root for images and torcx tarball as seen from within the container
# Artifact root for images as seen from within the container
echo "CI_CONTAINER_ARTIFACT_ROOT=/home/sdk/trunk/src/scripts/artifacts" >> $GITHUB_ENV
echo "CI_CONTAINER_TORCX_ROOT=/home/sdk/trunk/src/scripts/artifacts/torcx" >> $GITHUB_ENV
mkdir -p artifacts/torcx
# Placeholder URL for run-kola-tests.yaml, "Extract artifacts" step which will replace
# this with its IP address.
echo "TORCX_TESTS_PACKAGE_URL=http://localhost:12345" >> $GITHUB_ENV
if [ -n "${{ inputs.custom_sdk_version }}" ] ; then
echo "CUSTOM_SDK_VERSION=${{ inputs.custom_sdk_version }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -146,9 +140,7 @@ jobs:
# which will be re-used by subsequent build steps.
./run_sdk_container -n "${container_name}" -v "${version}" \
-C "${sdk_image}" \
./build_packages --board="${arch}-usr" \
--torcx_output_root="${CI_CONTAINER_TORCX_ROOT}" \
--torcx_extra_pkg_url="${TORCX_TESTS_PACKAGE_URL}"
./build_packages --board="${arch}-usr"
# Create binpkgs tarball for archiving as artifact later
./run_sdk_container -n "${container_name}" \
Expand Down Expand Up @@ -193,7 +185,7 @@ jobs:
./run_sdk_container -n "${container_name}" \
./build_image --board="${arch}-usr" --group="${channel}" \
--output_root="${CI_CONTAINER_ARTIFACT_ROOT}" \
--torcx_root="${CI_CONTAINER_TORCX_ROOT}" prodtar container
prodtar container
- name: Generate reports
shell: bash
Expand Down Expand Up @@ -291,12 +283,6 @@ jobs:
mv * ../../images/
)
# create a tarball for torcx package + JSON file because upload-artifacts cannot handle filenames containing colons
# (such as "docker:20.10.torcx.tgz")
mv artifacts/torcx/${arch}-usr/latest/torcx_manifest.json artifacts/torcx/pkgs/
tar -C artifacts/torcx/pkgs/ -cvf torcx.tar .
- name: Upload binpkgs
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -336,14 +322,6 @@ jobs:
path: |
scripts/artifacts/images/flatcar_developer_container*
- name: Upload torcx tarball
uses: actions/upload-artifact@v3
with:
retention-days: 7
name: ${{ matrix.arch }}-torcx
path: |
scripts/torcx.tar
- name: Upload reports
uses: actions/upload-artifact@v3
with:
Expand Down
40 changes: 2 additions & 38 deletions .github/workflows/run-kola-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,6 @@ jobs:
with:
name: ${{ matrix.arch }}-devcontainer

- name: Download torcx tarball
if: ${{ !inputs.workflow_run_id }}
uses: actions/download-artifact@v3
with:
name: ${{ matrix.arch }}-torcx

- name: Download binpkgs from other workflow
uses: gabriel-samfira/action-download-artifact@v5
if: ${{ inputs.workflow_run_id }}
Expand Down Expand Up @@ -141,24 +135,15 @@ jobs:
run_id: ${{ inputs.workflow_run_id }}
name: ${{ matrix.arch }}-devcontainer

- name: Download torcx tarball from other workflow
uses: gabriel-samfira/action-download-artifact@v5
if: ${{ inputs.workflow_run_id }}
with:
workflow: ${{ inputs.workflow_name_or_id }}
workflow_conclusion: success
run_id: ${{ inputs.workflow_run_id }}
name: ${{ matrix.arch }}-torcx

- name: Extract artifacts
shell: bash
run: |
exec 2>&1
set -x
set -euo pipefail
# Set up a webserver for devcontainer and torcx tests.
# The respective tests will download devcontainer and torcx tarball via http.
# Set up a webserver for devcontainer tests.
# The respective tests will download devcontainer via http.
# The devcontainer test will then run a build
# which will download and install binpkgs into the dev container.
# For the sake of that test we will serve both via a temporary local web server.
Expand All @@ -174,19 +159,6 @@ jobs:
mv flatcar_developer_container* ${TESTS_WEBSERVER_WEBROOT}
tar -C ${TESTS_WEBSERVER_WEBROOT} -xvf binpkgs.tar
tar -C ${TESTS_WEBSERVER_WEBROOT} -xvf torcx.tar
# Move torcx package into plain webroot
# (path consists of <arch>/<packagename>/<checksum>/<packagename>:<version>.torcx.tar.gz)
mv "${TESTS_WEBSERVER_WEBROOT}/${{ matrix.arch }}-usr"/*/*/*.torcx.tgz \
"${TESTS_WEBSERVER_WEBROOT}"
# Update torcx.json's http URL to point to the webserver IP.
# ci.yaml defines the "localhost" placeholder in its "Set Environment" step.
sed -i "s,http://localhost:12345,http://${TESTS_WEBSERVER_IP}:${TESTS_WEBSERVER_PORT}," \
"${TESTS_WEBSERVER_WEBROOT}/torcx_manifest.json"
cat "${TESTS_WEBSERVER_WEBROOT}/torcx_manifest.json"
# Extract the generic image we'll use for qemu tests.
# Note that the qemu[_uefi] tests use the generic image instead of the
# qemu vendor VM image ("Astronaut: [...] Always have been.").
Expand Down Expand Up @@ -221,14 +193,6 @@ jobs:
source ci-automation/test.sh
# Provide our own torcx prepare function so we use our local manifest json.
# This is called by test_run below.
function __prepare_torcx() {
shift; shift # no need for arch or vernum
local destdir="$1"
cp "../${TESTS_WEBSERVER_WEBROOT}/torcx_manifest.json" "${destdir}"
}
PARALLEL_ARCH=10
cat > sdk_container/.env <<EOF
Expand Down

0 comments on commit 54d04cf

Please sign in to comment.