From 6fcbaa3404db8e618ed67c034588e6fc32e29f8e Mon Sep 17 00:00:00 2001 From: Alvin Schiller <103769832+AlvinSchiller@users.noreply.github.com> Date: Fri, 27 Oct 2023 01:12:29 +0200 Subject: [PATCH] renamed var DEBIAN_VERSION_NAME to DEBIAN_CODENAME --- .github/workflows/test_docker_debian.yml | 6 +++--- .../test_docker_debian_versionname_sub.yml | 18 +++++++++--------- ci/Dockerfile.debian | 10 +++++----- ci/README.md | 2 +- .../buster-install-default-with-autohotspot.sh | 2 +- .../installscripts/buster-install-default.sh | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test_docker_debian.yml b/.github/workflows/test_docker_debian.yml index ab0b9ec8a..46a620893 100644 --- a/.github/workflows/test_docker_debian.yml +++ b/.github/workflows/test_docker_debian.yml @@ -21,11 +21,11 @@ jobs: # Build container and run tests run: - name: ${{ matrix.debian_version_name }} + name: ${{ matrix.debian_codename }} strategy: fail-fast: false matrix: - debian_version_name: ['bullseye', 'buster'] + debian_codename: ['bullseye', 'buster'] uses: ./.github/workflows/test_docker_debian_versionname_sub.yml with: runs_on: ubuntu-latest @@ -34,4 +34,4 @@ jobs: cache_scope: ${{ github.ref }}-test-debian matrix_usernames: "['pi', 'hans']" matrix_test_scripts: "['run_installation_tests.sh', 'run_installation_tests2.sh', 'run_installation_tests3.sh']" - debian_version_name: ${{ matrix.debian_version_name }} + debian_codename: ${{ matrix.debian_codename }} diff --git a/.github/workflows/test_docker_debian_versionname_sub.yml b/.github/workflows/test_docker_debian_versionname_sub.yml index 24be6ef74..6ae9403db 100644 --- a/.github/workflows/test_docker_debian_versionname_sub.yml +++ b/.github/workflows/test_docker_debian_versionname_sub.yml @@ -9,7 +9,7 @@ on: platform: required: true type: string - debian_version_name: + debian_codename: required: true type: string cache_scope: @@ -32,7 +32,7 @@ on: # let only one instance run the test so cache is not corrupted. # cancel already running instances as only the last run will be relevant concurrency: - group: ${{ inputs.cache_scope }}-${{ inputs.debian_version_name }} + group: ${{ inputs.cache_scope }}-${{ inputs.debian_codename }} cancel-in-progress: true jobs: @@ -68,23 +68,23 @@ jobs: - name: Set Output pre-vars id: pre-vars env: - DEBIAN_VERSION_NAME: ${{ inputs.debian_version_name }} + DEBIAN_CODENAME: ${{ inputs.debian_codename }} DOCKER_IMAGE_NAME: ${{ inputs.docker_image_name }} CACHE_SCOPE: ${{ inputs.cache_scope }} run: | - echo "image_tag_name=${{ env.DOCKER_IMAGE_NAME }}:${{ env.DEBIAN_VERSION_NAME }}-test" >> $GITHUB_OUTPUT - echo "cache_scope=${{ env.CACHE_SCOPE }}-${{ env.DEBIAN_VERSION_NAME }}" >> $GITHUB_OUTPUT + echo "image_tag_name=${{ env.DOCKER_IMAGE_NAME }}:${{ env.DEBIAN_CODENAME }}-test" >> $GITHUB_OUTPUT + echo "cache_scope=${{ env.CACHE_SCOPE }}-${{ env.DEBIAN_CODENAME }}" >> $GITHUB_OUTPUT - name: Set Output vars id: vars env: - DEBIAN_VERSION_NAME: ${{ inputs.debian_version_name }} + DEBIAN_CODENAME: ${{ inputs.debian_codename }} DOCKER_IMAGE_NAME: ${{ inputs.docker_image_name }} LOCAL_REGISTRY_PORT: ${{ inputs.local_registry_port }} run: | echo "image_tag_name=${{ steps.pre-vars.outputs.image_tag_name }}" >> $GITHUB_OUTPUT echo "image_tag_name_local_base=localhost:${{ env.LOCAL_REGISTRY_PORT }}/${{ steps.pre-vars.outputs.image_tag_name }}-base" >> $GITHUB_OUTPUT - echo "image_file_path=./${{ env.DOCKER_IMAGE_NAME }}-${{ env.DEBIAN_VERSION_NAME }}.tar" >> $GITHUB_OUTPUT + echo "image_file_path=./${{ env.DOCKER_IMAGE_NAME }}-${{ env.DEBIAN_CODENAME }}.tar" >> $GITHUB_OUTPUT echo "cache_scope=${{ steps.pre-vars.outputs.cache_scope }}" >> $GITHUB_OUTPUT echo "cache_key=${{ steps.pre-vars.outputs.cache_scope }}-${{ github.sha }}#${{ github.run_attempt }}" >> $GITHUB_OUTPUT @@ -102,7 +102,7 @@ jobs: cache-from: type=gha,scope=${{ steps.vars.outputs.cache_scope }} cache-to: type=gha,mode=max,scope=${{ steps.vars.outputs.cache_scope }} build-args: | - DEBIAN_VERSION_NAME=${{ inputs.debian_version_name }} + DEBIAN_CODENAME=${{ inputs.debian_codename }} GIT_BRANCH=${{ github.head_ref || github.ref_name }} GIT_URL=${{ github.server_url }}/${{ github.event.pull_request.head.repo.full_name || github.repository }} @@ -162,7 +162,7 @@ jobs: docker load --input ${{ needs.build.outputs.image_file_path }} # Run test - - name: Run Test ${{ inputs.debian_version_name }}-${{ matrix.username }}-${{ matrix.test_script }} + - name: Run Test ${{ inputs.debian_codename }}-${{ matrix.username }}-${{ matrix.test_script }} uses: tj-actions/docker-run@v2 with: image: ${{ needs.build.outputs.image_tag_name }} diff --git a/ci/Dockerfile.debian b/ci/Dockerfile.debian index ecfca4460..9d155358e 100644 --- a/ci/Dockerfile.debian +++ b/ci/Dockerfile.debian @@ -1,8 +1,8 @@ # Base Target to build and install all needed base configuration and packages. Specifie the needed platform with the docker '--platform XXX' option -ARG DEBIAN_VERSION_NAME=bullseye +ARG DEBIAN_CODENAME=bullseye ARG BASE_TEST_IMAGE=test-code -FROM debian:${DEBIAN_VERSION_NAME}-slim as base -ARG DEBIAN_VERSION_NAME +FROM debian:${DEBIAN_CODENAME}-slim as base +ARG DEBIAN_CODENAME ENV DOCKER_RUNNING=true RUN touch /boot/cmdlinetxt @@ -15,8 +15,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \ gnupg \ && curl -fsSL http://raspbian.raspberrypi.org/raspbian.public.key | gpg --dearmor > /usr/share/keyrings/raspberrypi-raspbian-keyring.gpg \ && curl -fsSL http://archive.raspberrypi.org/debian/raspberrypi.gpg.key | gpg --dearmor > /usr/share/keyrings/raspberrypi-archive-debian-keyring.gpg \ - && echo "deb [signed-by=/usr/share/keyrings/raspberrypi-raspbian-keyring.gpg] http://raspbian.raspberrypi.org/raspbian/ ${DEBIAN_VERSION_NAME} main contrib non-free rpi" > /etc/apt/sources.list.d/raspi.list \ - && echo "deb [signed-by=/usr/share/keyrings/raspberrypi-archive-debian-keyring.gpg] http://archive.raspberrypi.org/debian/ ${DEBIAN_VERSION_NAME} main" >> /etc/apt/sources.list.d/raspi.list \ + && echo "deb [signed-by=/usr/share/keyrings/raspberrypi-raspbian-keyring.gpg] http://raspbian.raspberrypi.org/raspbian/ ${DEBIAN_CODENAME} main contrib non-free rpi" > /etc/apt/sources.list.d/raspi.list \ + && echo "deb [signed-by=/usr/share/keyrings/raspberrypi-archive-debian-keyring.gpg] http://archive.raspberrypi.org/debian/ ${DEBIAN_CODENAME} main" >> /etc/apt/sources.list.d/raspi.list \ && apt-get update \ && apt-get -y upgrade \ && apt-get -y install \ diff --git a/ci/README.md b/ci/README.md index 6ecbf00c4..bbade3f34 100644 --- a/ci/README.md +++ b/ci/README.md @@ -36,7 +36,7 @@ This is a work in progress so expect things to fail or being flaky. * for builds - on normal PCs use `--platform=linux/amd64` - on a raspberry pi use `--platform=linux/arm/v7` - * to use a different debian version as base add parameter `--build-arg="DEBIAN_VERSION_NAME="` ( = e.g. buster, bullseye, ...). + * to use a different debian version as base add parameter `--build-arg="DEBIAN_CODENAME="` ( = e.g. buster, bullseye, ...). * get something to drink or eat * run the freshly built docker image and start testing. For example: diff --git a/scripts/installscripts/buster-install-default-with-autohotspot.sh b/scripts/installscripts/buster-install-default-with-autohotspot.sh index bc37290fc..703f1c632 100644 --- a/scripts/installscripts/buster-install-default-with-autohotspot.sh +++ b/scripts/installscripts/buster-install-default-with-autohotspot.sh @@ -36,7 +36,7 @@ JUKEBOX_HOME_DIR="${HOME_DIR}/RPi-Jukebox-RFID" LOGDIR="${HOME_DIR}"/phoniebox_logs JUKEBOX_BACKUP_DIR="${HOME_DIR}/BACKUP" -# Get the RaspberryPi OS code name (e.g. buster, bullseye, ...) +# Get the RaspberryPi OS codename (e.g. buster, bullseye, ...) OS_CODENAME="$( . /etc/os-release; printf '%s\n' "$VERSION_CODENAME"; )" printf "Used RaspberryPi OS: ${OS_CODENAME}\n" diff --git a/scripts/installscripts/buster-install-default.sh b/scripts/installscripts/buster-install-default.sh index 17976134e..0bf5f7f83 100644 --- a/scripts/installscripts/buster-install-default.sh +++ b/scripts/installscripts/buster-install-default.sh @@ -36,7 +36,7 @@ JUKEBOX_HOME_DIR="${HOME_DIR}/RPi-Jukebox-RFID" LOGDIR="${HOME_DIR}"/phoniebox_logs JUKEBOX_BACKUP_DIR="${HOME_DIR}/BACKUP" -# Get the RaspberryPi OS code name (e.g. buster, bullseye, ...) +# Get the RaspberryPi OS codename (e.g. buster, bullseye, ...) OS_CODENAME="$( . /etc/os-release; printf '%s\n' "$VERSION_CODENAME"; )" printf "Used RaspberryPi OS: ${OS_CODENAME}\n"