Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Support our new GOS release shredder #7

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/actions/autopkgtest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@ runs:
using: "composite"
steps:
- run: |
# Formerly we used autopkgtest:buster docker container to run our buster lxc container.
# Since latest upgrades on our host lxc-start is segfaulting within the buster container for unknown reason.
# As a workaround we use the bullseye docker container instead of the buster one for all tests.
docker run --pull always --privileged --rm -v ${{ env.CI_PROJECT_DIR }}:/__w -e WORKING_DIR="/__w" --workdir /__w ${{ inputs.registry }}/${{ inputs.arch }}/autopkgtest:bullseye
docker run --pull always --privileged --rm -v ${{ env.CI_PROJECT_DIR }}:/__w -e WORKING_DIR="/__w" --workdir /__w ${{ inputs.registry }}/${{ inputs.arch }}/autopkgtest:${{ inputs.debian_release_name }}
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/clean/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ runs:
using: "composite"
steps:
- run: |
docker run --rm -v ${{ env.CI_PROJECT_DIR }}:/__w -e GOS_REPOSITORY_HOST="${{ inputs.host }}" -e GOS_REPOSITORY_KEY="${{ inputs.key }}" -e WORKING_DIR="/__w" --workdir /__w ${{ inputs.registry }}/${{ inputs.arch }}/repository:latest /action.sh --clean
docker run --rm -v ${{ env.CI_PROJECT_DIR }}:/__w -e GOS_REPOSITORY_HOST="${{ inputs.host }}" -e GOS_REPOSITORY_KEY="${{ inputs.key }}" -e WORKING_DIR="/__w" --workdir /__w ${{ inputs.registry }}/${{ inputs.arch }}/repository:bookworm /action.sh --clean
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ runs:
using: "composite"
steps:
- run: |
docker run --rm -v ${{ env.CI_PROJECT_DIR }}:/__w -e GOS_REPOSITORY_HOST="${{ inputs.host }}" -e GOS_REPOSITORY_KEY="${{ inputs.key }}" -e WORKING_DIR="/__w" --workdir /__w ${{ inputs.registry }}/${{ inputs.arch }}/repository:latest /action.sh --publish
docker run --rm -v ${{ env.CI_PROJECT_DIR }}:/__w -e GOS_REPOSITORY_HOST="${{ inputs.host }}" -e GOS_REPOSITORY_KEY="${{ inputs.key }}" -e WORKING_DIR="/__w" --workdir /__w ${{ inputs.registry }}/${{ inputs.arch }}/repository:bookworm /action.sh --publish
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ runs:
using: "composite"
steps:
- run: |
docker run --pull always --rm -v ${{ env.CI_PROJECT_DIR }}:${{ env.CI_PROJECT_DIR }} -e GOS_REPOSITORY_HOST="${{ inputs.host }}" -e GOS_REPOSITORY_KEY="${{ inputs.key }}" -e WORKING_DIR="${{ env.WORKING_DIR }}" --workdir ${{ env.CI_PROJECT_DIR }} ${{ inputs.registry }}/${{ inputs.arch }}/repository:latest /action.sh --upload
docker run --pull always --rm -v ${{ env.CI_PROJECT_DIR }}:${{ env.CI_PROJECT_DIR }} -e GOS_REPOSITORY_HOST="${{ inputs.host }}" -e GOS_REPOSITORY_KEY="${{ inputs.key }}" -e WORKING_DIR="${{ env.WORKING_DIR }}" --workdir ${{ env.CI_PROJECT_DIR }} ${{ inputs.registry }}/${{ inputs.arch }}/repository:bookworm /action.sh --upload
shell: bash
37 changes: 19 additions & 18 deletions .github/workflows/gos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,22 @@ jobs:
release: ${{ steps.release.outputs.release }}
debian_release_name: ${{ steps.release.outputs.debian_release_name }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Gather information
id: release
run: |
RELEASE=$(head -n 1 debian/changelog | cut -d ' ' -f3 | cut -d ';' -f1)
echo "::set-output name=release::$RELEASE"

echo "release=$RELEASE" >> $GITHUB_OUTPUT
if [ "$RELEASE" = "gos4.3" ] || [ "$RELEASE" = "gos5.0" ] || [ "$RELEASE" = "gos6.0" ]; then
DEBIAN_RELEASE_NAME="stretch"
elif [ "$RELEASE" = "gos20.08" ] || [ "$RELEASE" = "gos21.04" ] || [ "$RELEASE" = "gos21.10" ]; then
DEBIAN_RELEASE_NAME="buster"
elif [ "$RELEASE" = "abomination" ]; then
DEBIAN_RELEASE_NAME="bullseye"
elif [ "$RELEASE" = "shredder" ]; then
DEBIAN_RELEASE_NAME="bookworm"
fi
echo "::set-output name=debian_release_name::$DEBIAN_RELEASE_NAME"
echo "debian_release_name=$DEBIAN_RELEASE_NAME" >> $GITHUB_OUTPUT

build:
name: Build Debian Packages
Expand All @@ -90,15 +91,15 @@ jobs:
runs-on: ${{ matrix.runner }}
steps:
# Checkout is required, otherwise we have no data in workspace.
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build package
uses: greenbone/gos-ci/.github/actions/build@main
with:
arch: ${{ matrix.arch }}${{ matrix.subversion }}
registry: ${{ secrets.GOS_CI_REGISTRY }}
debian_release_name: ${{ needs.gather.outputs.debian_release_name }}
- name: Upload changes
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: "build_output_${{ matrix.arch }}"
path: ./debian/output
Expand All @@ -110,9 +111,9 @@ jobs:
needs: build
runs-on: self-hosted-generic
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download artifacts from build
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: ${{ env.WORKING_DIR }}
- run: |
Expand Down Expand Up @@ -141,9 +142,9 @@ jobs:
runner: gos-ci-arm64
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download artifacts from build
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: "build_output_${{ matrix.arch }}"
path: ${{ env.WORKING_DIR }}
Expand All @@ -170,9 +171,9 @@ jobs:
# Research why this is not working. -.-
# if: hashFiles('debian/tests/control')
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download artifacts from build
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: "build_output_${{ matrix.arch }}"
path: ${{ env.WORKING_DIR }}
Expand All @@ -198,9 +199,9 @@ jobs:
runs-on: ${{ matrix.runner }}
if: inputs.GOS_CI_DISABLE_PIUPARTS == 0
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download artifacts from build
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: "build_output_${{ matrix.arch }}"
path: ${{ env.WORKING_DIR }}
Expand All @@ -227,7 +228,7 @@ jobs:
if: inputs.GOS_CI_DISABLE_BLHC == 0
steps:
- name: Download artifacts from build
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: "build_output_${{ matrix.arch }}"
path: ${{ env.WORKING_DIR }}
Expand All @@ -251,9 +252,9 @@ jobs:
needs.test-autopkgtest.result == 'success' &&
(needs.test-piuparts.result == 'success' || (inputs.GOS_CI_DISABLE_PIUPARTS != 0 && needs.test-piuparts.result == 'skipped')) &&
(needs.test-blhc.result == 'success' || (inputs.GOS_CI_DISABLE_BLHC != 0 && needs.test-blhc.result == 'skipped')) &&
contains(fromJson('["gos20.08", "gos21.04", "gos21.10", "abomination"]'), github.ref_name)
contains(fromJson('["gos20.08", "gos21.04", "gos21.10", "abomination", "shredder"]'), github.ref_name)
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Trigger publish
uses: greenbone/gos-ci/.github/actions/publish@main
with:
Expand All @@ -267,7 +268,7 @@ jobs:
needs: [test-lintian, test-autopkgtest, test-piuparts, test-blhc, publish]
if: ${{ always() }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cleanup repository
uses: greenbone/gos-ci/.github/actions/clean@main
with:
Expand Down
Loading