From fdb68c342400dc39788bb20a151625d65ba2a210 Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Tue, 21 May 2024 19:45:53 +0900 Subject: [PATCH] Update LLC to SIA. New Windows agent workflow --- .github/workflows/images_build_rhel.yml | 18 +++++++++++++++--- Dockerfiles/agent/alpine/Dockerfile | 2 +- Dockerfiles/agent/centos/Dockerfile | 2 +- Dockerfiles/agent/ol/Dockerfile | 2 +- Dockerfiles/agent/rhel/Dockerfile | 4 ++-- Dockerfiles/agent/ubuntu/Dockerfile | 2 +- Dockerfiles/agent/windows/Dockerfile | 2 +- Dockerfiles/agent2/alpine/Dockerfile | 2 +- Dockerfiles/agent2/centos/Dockerfile | 2 +- Dockerfiles/agent2/ol/Dockerfile | 2 +- Dockerfiles/agent2/rhel/Dockerfile | 4 ++-- Dockerfiles/agent2/ubuntu/Dockerfile | 2 +- Dockerfiles/agent2/windows/Dockerfile | 2 +- Dockerfiles/build-base/alpine/Dockerfile | 2 +- Dockerfiles/build-base/centos/Dockerfile | 2 +- Dockerfiles/build-base/ol/Dockerfile | 2 +- Dockerfiles/build-base/rhel/Dockerfile | 4 ++-- Dockerfiles/build-base/ubuntu/Dockerfile | 2 +- .../build-base/windows/Dockerfile.agent | 2 +- Dockerfiles/build-mysql/alpine/Dockerfile | 2 +- Dockerfiles/build-mysql/centos/Dockerfile | 2 +- Dockerfiles/build-mysql/ol/Dockerfile | 2 +- Dockerfiles/build-mysql/rhel/Dockerfile | 4 ++-- Dockerfiles/build-mysql/ubuntu/Dockerfile | 2 +- .../build-mysql/windows/Dockerfile.agent | 2 +- .../build-mysql/windows/Dockerfile.agent2 | 2 +- Dockerfiles/build-pgsql/alpine/Dockerfile | 2 +- Dockerfiles/build-pgsql/centos/Dockerfile | 2 +- Dockerfiles/build-pgsql/ol/Dockerfile | 2 +- Dockerfiles/build-pgsql/ubuntu/Dockerfile | 2 +- Dockerfiles/build-sqlite3/alpine/Dockerfile | 2 +- Dockerfiles/build-sqlite3/centos/Dockerfile | 2 +- Dockerfiles/build-sqlite3/ol/Dockerfile | 2 +- Dockerfiles/build-sqlite3/rhel/Dockerfile | 4 ++-- Dockerfiles/build-sqlite3/ubuntu/Dockerfile | 2 +- Dockerfiles/java-gateway/alpine/Dockerfile | 2 +- Dockerfiles/java-gateway/centos/Dockerfile | 2 +- Dockerfiles/java-gateway/ol/Dockerfile | 2 +- Dockerfiles/java-gateway/rhel/Dockerfile | 4 ++-- Dockerfiles/java-gateway/ubuntu/Dockerfile | 2 +- Dockerfiles/proxy-mysql/alpine/Dockerfile | 2 +- Dockerfiles/proxy-mysql/centos/Dockerfile | 2 +- Dockerfiles/proxy-mysql/ol/Dockerfile | 2 +- Dockerfiles/proxy-mysql/rhel/Dockerfile | 4 ++-- Dockerfiles/proxy-mysql/ubuntu/Dockerfile | 2 +- Dockerfiles/proxy-sqlite3/alpine/Dockerfile | 2 +- Dockerfiles/proxy-sqlite3/centos/Dockerfile | 2 +- Dockerfiles/proxy-sqlite3/ol/Dockerfile | 2 +- Dockerfiles/proxy-sqlite3/rhel/Dockerfile | 4 ++-- Dockerfiles/proxy-sqlite3/ubuntu/Dockerfile | 2 +- Dockerfiles/server-mysql/alpine/Dockerfile | 2 +- Dockerfiles/server-mysql/centos/Dockerfile | 2 +- Dockerfiles/server-mysql/ol/Dockerfile | 2 +- Dockerfiles/server-mysql/rhel/Dockerfile | 4 ++-- Dockerfiles/server-mysql/ubuntu/Dockerfile | 2 +- Dockerfiles/server-pgsql/alpine/Dockerfile | 2 +- Dockerfiles/server-pgsql/centos/Dockerfile | 2 +- Dockerfiles/server-pgsql/ol/Dockerfile | 2 +- Dockerfiles/server-pgsql/ubuntu/Dockerfile | 2 +- Dockerfiles/snmptraps/alpine/Dockerfile | 2 +- Dockerfiles/snmptraps/centos/Dockerfile | 2 +- Dockerfiles/snmptraps/ol/Dockerfile | 2 +- Dockerfiles/snmptraps/rhel/Dockerfile | 4 ++-- Dockerfiles/snmptraps/ubuntu/Dockerfile | 2 +- Dockerfiles/web-apache-mysql/alpine/Dockerfile | 2 +- Dockerfiles/web-apache-mysql/centos/Dockerfile | 2 +- Dockerfiles/web-apache-mysql/ol/Dockerfile | 2 +- Dockerfiles/web-apache-mysql/ubuntu/Dockerfile | 2 +- Dockerfiles/web-apache-pgsql/alpine/Dockerfile | 2 +- Dockerfiles/web-apache-pgsql/centos/Dockerfile | 2 +- Dockerfiles/web-apache-pgsql/ol/Dockerfile | 2 +- Dockerfiles/web-apache-pgsql/ubuntu/Dockerfile | 2 +- Dockerfiles/web-nginx-mysql/alpine/Dockerfile | 2 +- Dockerfiles/web-nginx-mysql/centos/Dockerfile | 2 +- Dockerfiles/web-nginx-mysql/ol/Dockerfile | 2 +- Dockerfiles/web-nginx-mysql/rhel/Dockerfile | 4 ++-- Dockerfiles/web-nginx-mysql/ubuntu/Dockerfile | 2 +- Dockerfiles/web-nginx-pgsql/alpine/Dockerfile | 2 +- Dockerfiles/web-nginx-pgsql/centos/Dockerfile | 2 +- Dockerfiles/web-nginx-pgsql/ol/Dockerfile | 2 +- Dockerfiles/web-nginx-pgsql/ubuntu/Dockerfile | 2 +- 81 files changed, 106 insertions(+), 94 deletions(-) diff --git a/.github/workflows/images_build_rhel.yml b/.github/workflows/images_build_rhel.yml index 6f84de1e1..13a4909ed 100644 --- a/.github/workflows/images_build_rhel.yml +++ b/.github/workflows/images_build_rhel.yml @@ -20,6 +20,9 @@ on: required: true default: false type: boolean + trunk_version: + description: 'Specify trunk major version' + type: string defaults: run: @@ -30,7 +33,7 @@ permissions: env: TRUNK_ONLY_EVENT: ${{ contains(fromJSON('["schedule"]'), github.event_name) }} - AUTO_PUSH_IMAGES: ${{ ! contains(fromJSON('["workflow_dispatch", "push"]'), github.event_name) && vars.AUTO_PUSH_IMAGES }} + AUTO_PUSH_IMAGES: ${{ (! contains(fromJSON('["push"]'), github.event_name) && vars.AUTO_PUSH_IMAGES) || (contains(fromJSON('["workflow_dispatch"]'), github.event_name) && inputs.publish_images == 'true' ) }} LATEST_BRANCH: ${{ github.event.repository.default_branch }} TRUNK_GIT_BRANCH: "refs/heads/trunk" @@ -139,6 +142,7 @@ jobs: env: LATEST_BRANCH: ${{ env.LATEST_BRANCH }} github_ref: ${{ github.ref }} + TRUNK_MAJOR_VERSION: ${{ inputs.trunk_version }} run: | result=false sha_short=$(git rev-parse --short HEAD) @@ -156,13 +160,21 @@ jobs: echo "::group::Branch metadata" echo "is_default_branch - $result" echo "current_branch - $github_ref" - echo "secret_prefix=RHEL_${github_ref//.}" + if [ "${github_ref//.}" == "trunk" ] && [ ! -z "$TRUNK_MAJOR_VERSION" ]; then + echo "secret_prefix=RHEL_${TRUNK_MAJOR_VERSION//.}" + else + echo "secret_prefix=RHEL_${github_ref//.}" + fi echo "sha_short - $sha_short" echo "::endgroup::" echo "is_default_branch=$result" >> $GITHUB_OUTPUT echo "current_branch=$github_ref" >> $GITHUB_OUTPUT - echo "secret_prefix=RHEL_${github_ref//.}" >> $GITHUB_OUTPUT + if [ "${github_ref//.}" == "trunk" ] && [ ! -z "$TRUNK_MAJOR_VERSION" ]; then + echo "secret_prefix=RHEL_${TRUNK_MAJOR_VERSION//.}" >> $GITHUB_OUTPUT + else + echo "secret_prefix=RHEL_${github_ref//.}" >> $GITHUB_OUTPUT + fi echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - name: Cleanup existing cache diff --git a/Dockerfiles/agent/alpine/Dockerfile b/Dockerfiles/agent/alpine/Dockerfile index ed11a898b..2708f93dc 100644 --- a/Dockerfiles/agent/alpine/Dockerfile +++ b/Dockerfiles/agent/alpine/Dockerfile @@ -21,7 +21,7 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov