From 87b51107b8418f1d437f903c754f79efc0118410 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 00:19:15 +0800 Subject: [PATCH 01/17] Drop docker-compose V1 --- compose/Dockerfile | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 compose/Dockerfile diff --git a/compose/Dockerfile b/compose/Dockerfile deleted file mode 100644 index 2cb3e4a..0000000 --- a/compose/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -# target: teslaconsulting/docker-compose:1.29.2 -FROM debian:bullseye-20220418-slim AS build -WORKDIR /usr/local/bin -COPY docker-compose-Linux-x86_64 /usr/local/bin/docker-compose -RUN chmod 755 /usr/local/bin/docker-compose -ENTRYPOINT [ "docker-compose" ] From 7234e0070df0d0f950cf29f2b75fc7dcfe3cacad Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 00:27:18 +0800 Subject: [PATCH 02/17] upgrade minver@4.3.0 --- minver/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minver/Dockerfile b/minver/Dockerfile index c754c8d..61477e2 100644 --- a/minver/Dockerfile +++ b/minver/Dockerfile @@ -1,8 +1,8 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0 # Install minver Console global tool -ARG DOTNET_MINVER_VERSION=4.2.0 -ARG DOTNET_MINVER_SHA512=4a4588a6e22152549396364108b8657a6d0e4cb61937732f587286e3637950d993570dd592a210425fe4681e572369c214721cc035b3344105d381096e74ff29 +ARG DOTNET_MINVER_VERSION=4.3.0 +ARG DOTNET_MINVER_SHA512=90e851ccee7ec6249b0ba48221646a7d43b938fa074e3da7a22470ab0ea548d5c7e2a8b8628f3204d9ddf163f5c16f2b804d21f50165dc7e20848f155e288c0e ENV DOTNET_MINVER_VERSION=${DOTNET_MINVER_VERSION} RUN curl -SL --output minver-cli.$DOTNET_MINVER_VERSION.nupkg https://globalcdn.nuget.org/packages/minver-cli.$DOTNET_MINVER_VERSION.nupkg \ From 4fc0cccc351bb658a82d2a95e9a2f324032d38cb Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 01:25:49 +0800 Subject: [PATCH 03/17] Verify minver build --- minver/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/minver/Dockerfile b/minver/Dockerfile index 61477e2..46917bf 100644 --- a/minver/Dockerfile +++ b/minver/Dockerfile @@ -14,4 +14,5 @@ RUN curl -SL --output minver-cli.$DOTNET_MINVER_VERSION.nupkg https://globalcdn. && ln -s /usr/share/minver-cli/minver /usr/bin/minver \ && chmod 755 /usr/share/minver-cli/minver \ && find /usr/share/minver-cli -print | grep -i '.*[.]nupkg$' | xargs rm \ - && dotnet nuget locals all --clear + && dotnet nuget locals all --clear \ + && minver --help From 5c820d9e5b54916b982d9cdc2ecafbc605214dc3 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 01:27:23 +0800 Subject: [PATCH 04/17] Cleanup docker hub build --- teamcity-agent/hooks/build | 72 -------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 teamcity-agent/hooks/build diff --git a/teamcity-agent/hooks/build b/teamcity-agent/hooks/build deleted file mode 100644 index c6a8141..0000000 --- a/teamcity-agent/hooks/build +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -IMAGE_NAME1="${DOCKER_REPO}:${SOURCE_COMMIT:0:7}" -IMAGE_LATEST="${DOCKER_REPO}:latest" - -cat < ${DOCKER_BUID}" -eval $DOCKER_BUID - -ret_val=$? -if [[ ${ret_val} -eq 0 ]]; then - if [[ -n "${IMAGE_NAME1}" ]]; then - echo "Pushing=> ${IMAGE_NAME1}" - docker push ${IMAGE_NAME1} - fi - - if [[ -n "${IMAGE_LATEST}" ]]; then - echo "Pushing=> ${IMAGE_LATEST}" - docker push ${IMAGE_LATEST} - fi - - if [[ -n "${IMAGE_NAME2}" ]]; then - echo "Pushing=> ${IMAGE_NAME2}" - docker push ${IMAGE_NAME2} - fi - - if [[ -n "${IMAGE_NAME3}" ]]; then - echo "Pushing=> ${IMAGE_NAME3}" - docker push ${IMAGE_NAME3} - fi -else - exit ret_val -fi From 1bac24a1abd4c0f3d6eb4cf55e96ae5504d086d0 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 01:39:24 +0800 Subject: [PATCH 05/17] docker:cli break changes /usr/libexec/docker/cli-plugins -> /usr/local/libexec/docker/cli-plugins --- teamcity-agent/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teamcity-agent/Dockerfile b/teamcity-agent/Dockerfile index 40381a9..b227396 100644 --- a/teamcity-agent/Dockerfile +++ b/teamcity-agent/Dockerfile @@ -22,7 +22,7 @@ COPY --from=dotnetsdk5 /usr/share/dotnet /usr/share/dotnet COPY --from=dotnetsdk6 /usr/share/dotnet /usr/share/dotnet COPY --from=dotnetsdk6 /usr/share/powershell /usr/share/powershell COPY --from=minver /usr/share/minver-cli /usr/share/minver-cli -COPY --from=dockercli /usr/libexec/docker/cli-plugins /usr/libexec/docker/cli-plugins +COPY --from=dockercli /usr/local/libexec/docker/cli-plugins /usr/local/libexec/docker/cli-plugins FROM ${TEAMCITYAGENT_IMAGE_REPOS}:${TEAMCITYAGENT_IMAGE_TAG} AS final @@ -73,7 +73,7 @@ RUN ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \ && ln -s /usr/share/minver-cli/minver /usr/bin/minver \ && chmod +x /usr/share/minver-cli/minver \ && rm /usr/local/bin/docker-compose \ - && ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose \ + && ln -s /usr/local/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose \ && chmod +x /usr/libexec/docker/cli-plugins/docker-* \ # Install module Pester - for root user && pwsh -Command "Install-Module -Name Pester -Scope AllUsers -Force" \ From 2544bad7c2b2f6a8b345f57dc871de3a4afd2216 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 01:49:44 +0800 Subject: [PATCH 06/17] Improve remove /usr/local/bin/docker-compose --- teamcity-agent/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/teamcity-agent/Dockerfile b/teamcity-agent/Dockerfile index b227396..a43c17b 100644 --- a/teamcity-agent/Dockerfile +++ b/teamcity-agent/Dockerfile @@ -72,7 +72,7 @@ RUN ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \ && chmod 755 /usr/share/powershell/pwsh \ && ln -s /usr/share/minver-cli/minver /usr/bin/minver \ && chmod +x /usr/share/minver-cli/minver \ - && rm /usr/local/bin/docker-compose \ + && [ -e /usr/local/bin/docker-compose ] && rm /usr/local/bin/docker-compose \ && ln -s /usr/local/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose \ && chmod +x /usr/libexec/docker/cli-plugins/docker-* \ # Install module Pester - for root user From 8ee1f0d622c42b7f564b4b48652e559dddfee9d3 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 02:28:26 +0800 Subject: [PATCH 07/17] Install docker-compose-plugin package --- teamcity-agent/Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/teamcity-agent/Dockerfile b/teamcity-agent/Dockerfile index a43c17b..21a6922 100644 --- a/teamcity-agent/Dockerfile +++ b/teamcity-agent/Dockerfile @@ -11,7 +11,7 @@ FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION6_TAG} AS dotnetsdk6 FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION5_TAG} AS dotnetsdk5 FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION31_TAG} AS dotnetsdk3 FROM $MINVER_IMAGE AS minver -FROM $DOCKER_CLI_IMAGE AS dockercli +# FROM $DOCKER_CLI_IMAGE AS dockercli -> use apt-get install docker-compose-plugin FROM scratch AS build # make sure folder exist @@ -22,7 +22,7 @@ COPY --from=dotnetsdk5 /usr/share/dotnet /usr/share/dotnet COPY --from=dotnetsdk6 /usr/share/dotnet /usr/share/dotnet COPY --from=dotnetsdk6 /usr/share/powershell /usr/share/powershell COPY --from=minver /usr/share/minver-cli /usr/share/minver-cli -COPY --from=dockercli /usr/local/libexec/docker/cli-plugins /usr/local/libexec/docker/cli-plugins +# COPY --from=dockercli /usr/local/libexec/docker/cli-plugins /usr/local/libexec/docker/cli-plugins FROM ${TEAMCITYAGENT_IMAGE_REPOS}:${TEAMCITYAGENT_IMAGE_TAG} AS final @@ -68,16 +68,21 @@ ENV DOTNET_SDK_VERSION31=${DOTNET_SDK_VERSION31} \ COPY --from=build /usr /usr -RUN ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \ +RUN apt-get update \ + && apt-get install docker-compose-plugin -y \ + && apt-get upgrade -y \ + && ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \ && chmod 755 /usr/share/powershell/pwsh \ && ln -s /usr/share/minver-cli/minver /usr/bin/minver \ && chmod +x /usr/share/minver-cli/minver \ && [ -e /usr/local/bin/docker-compose ] && rm /usr/local/bin/docker-compose \ - && ln -s /usr/local/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose \ + && ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose \ && chmod +x /usr/libexec/docker/cli-plugins/docker-* \ # Install module Pester - for root user && pwsh -Command "Install-Module -Name Pester -Scope AllUsers -Force" \ - && dotnet nuget locals all --clear + && dotnet nuget locals all --clear \ + && apt-get clean \ + && rm -rf /var/cache/apt/archives /var/lib/apt/lists/* USER buildagent From cba78c73a3f7b2bbc9c81b0ba947df28d2b5e586 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 02:56:52 +0800 Subject: [PATCH 08/17] Add .NET 7.0 and 8.0 from Jammy to Focal --- teamcity-agent/Dockerfile | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/teamcity-agent/Dockerfile b/teamcity-agent/Dockerfile index 21a6922..703b4f3 100644 --- a/teamcity-agent/Dockerfile +++ b/teamcity-agent/Dockerfile @@ -1,12 +1,16 @@ ARG DOTNET_SDK_VERSION31_TAG=3.1-focal ARG DOTNET_SDK_VERSION5_TAG=5.0-focal ARG DOTNET_SDK_VERSION6_TAG=6.0-focal +ARG DOTNET_SDK_VERSION7_TAG=7.0-jammy +ARG DOTNET_SDK_VERSION8_TAG=8.0-preview-jammy ARG MINVER_IMAGE_TAG=latest ARG MINVER_IMAGE=teslaconsulting/minver-cli:$MINVER_IMAGE_TAG ARG DOCKER_CLI_IMAGE=docker:cli ARG TEAMCITYAGENT_IMAGE_REPOS=jetbrains/teamcity-agent ARG TEAMCITYAGENT_IMAGE_TAG=2022.04.4-linux +FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION8_TAG} AS dotnetsdk8 +FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION7_TAG} AS dotnetsdk7 FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION6_TAG} AS dotnetsdk6 FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION5_TAG} AS dotnetsdk5 FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION31_TAG} AS dotnetsdk3 @@ -20,7 +24,9 @@ WORKDIR /usr/share COPY --from=dotnetsdk3 /usr/share/dotnet /usr/share/dotnet COPY --from=dotnetsdk5 /usr/share/dotnet /usr/share/dotnet COPY --from=dotnetsdk6 /usr/share/dotnet /usr/share/dotnet -COPY --from=dotnetsdk6 /usr/share/powershell /usr/share/powershell +COPY --from=dotnetsdk7 /usr/share/dotnet /usr/share/dotnet +COPY --from=dotnetsdk8 /usr/share/dotnet /usr/share/dotnet +COPY --from=dotnetsdk8 /usr/share/powershell /usr/share/powershell COPY --from=minver /usr/share/minver-cli /usr/share/minver-cli # COPY --from=dockercli /usr/local/libexec/docker/cli-plugins /usr/local/libexec/docker/cli-plugins @@ -40,6 +46,14 @@ ARG DOTNET_SDK_VERSION6=6.0.0 ARG ASPNET_VERSION6=6.0.0 ARG DOTNET_VERSION6=6.0.0 +ARG DOTNET_SDK_VERSION7=7.0.0 +ARG ASPNET_VERSION7=7.0.0 +ARG DOTNET_VERSION7=7.0.0 + +ARG DOTNET_SDK_VERSION8=8.0.0 +ARG ASPNET_VERSION8=8.0.0 +ARG DOTNET_VERSION8=8.0.0 + ARG POWERSHELL_VERSION=7.2.6 ARG MINVER_VERSION=4.2.0 ARG DOCKER_COMPOSE_VERSION=2.11.2 @@ -57,9 +71,17 @@ ENV DOTNET_SDK_VERSION31=${DOTNET_SDK_VERSION31} \ ASPNET_VERSION6=${ASPNET_VERSION6} \ DOTNET_VERSION6=${DOTNET_VERSION6} \ \ - DOTNET_SDK_VERSION=${DOTNET_SDK_VERSION6} \ - ASPNET_VERSION=${ASPNET_VERSION6} \ - DOTNET_VERSION=${DOTNET_VERSION6} \ + DOTNET_SDK_VERSION7=${DOTNET_SDK_VERSION7} \ + ASPNET_VERSION7=${ASPNET_VERSION7} \ + DOTNET_VERSION7=${DOTNET_VERSION7} \ + \ + DOTNET_SDK_VERSION8=${DOTNET_SDK_VERSION8} \ + ASPNET_VERSION8=${ASPNET_VERSION8} \ + DOTNET_VERSION8=${DOTNET_VERSION8} \ + \ + DOTNET_SDK_VERSION=${DOTNET_SDK_VERSION8} \ + ASPNET_VERSION=${ASPNET_VERSION8} \ + DOTNET_VERSION=${DOTNET_VERSION8} \ \ POWERSHELL_VERSION=${POWERSHELL_VERSION} \ POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetSDK-Ubuntu-20.04 \ @@ -80,6 +102,8 @@ RUN apt-get update \ && chmod +x /usr/libexec/docker/cli-plugins/docker-* \ # Install module Pester - for root user && pwsh -Command "Install-Module -Name Pester -Scope AllUsers -Force" \ + && dotnet --help \ + && dotnet --info \ && dotnet nuget locals all --clear \ && apt-get clean \ && rm -rf /var/cache/apt/archives /var/lib/apt/lists/* From 25e08095502cd07451e30bad381e93adb6f3ca32 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 03:05:55 +0800 Subject: [PATCH 09/17] Update .NET 7.0 and 8.0 version --- .../workflows/docker-teamcityagent-image.yml | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-teamcityagent-image.yml b/.github/workflows/docker-teamcityagent-image.yml index 8b60bb2..b220c39 100644 --- a/.github/workflows/docker-teamcityagent-image.yml +++ b/.github/workflows/docker-teamcityagent-image.yml @@ -87,7 +87,7 @@ jobs: Write-Output "::set-output name=aspnet::$aspnetcore_version" Write-Output "::set-output name=dotnet::$dotnet_version" - - name: Get .NET 5 Versions + - name: Get .NET 5.0 Versions id: dotnet5_vers shell: pwsh run: | @@ -97,7 +97,7 @@ jobs: Write-Output "::set-output name=aspnet::$($dotnet_vers[1])" Write-Output "::set-output name=dotnet::$($dotnet_vers[2])" - - name: Get .NET 6 Versions + - name: Get .NET 6.0 Versions id: dotnet6_vers shell: pwsh run: | @@ -107,6 +107,26 @@ jobs: Write-Output "::set-output name=aspnet::$($dotnet_vers[1])" Write-Output "::set-output name=dotnet::$($dotnet_vers[2])" + - name: Get .NET 7.0 Versions + id: dotnet7_vers + shell: pwsh + run: | + $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:7.0-jammy sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') + Write-Output "Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" + Write-Output "::set-output name=sdk::$($dotnet_vers[0])" + Write-Output "::set-output name=aspnet::$($dotnet_vers[1])" + Write-Output "::set-output name=dotnet::$($dotnet_vers[2])" + + - name: Get .NET 8.0 Versions + id: dotnet8_vers + shell: pwsh + run: | + $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:8.0-preview-jammy sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') + Write-Output "Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" + Write-Output "::set-output name=sdk::$($dotnet_vers[0])" + Write-Output "::set-output name=aspnet::$($dotnet_vers[1])" + Write-Output "::set-output name=dotnet::$($dotnet_vers[2])" + - name: Build and push id: docker_build uses: docker/build-push-action@v2 @@ -127,5 +147,11 @@ jobs: DOTNET_SDK_VERSION6=${{ steps.dotnet6_vers.outputs.sdk }} ASPNET_VERSION6=${{ steps.dotnet6_vers.outputs.aspnet }} DOTNET_VERSION6=${{ steps.dotnet6_vers.outputs.dotnet }} + DOTNET_SDK_VERSION7=${{ steps.dotnet7_vers.outputs.sdk }} + ASPNET_VERSION7=${{ steps.dotnet7_vers.outputs.aspnet }} + DOTNET_VERSION7=${{ steps.dotnet7_vers.outputs.dotnet }} + DOTNET_SDK_VERSION8=${{ steps.dotnet8_vers.outputs.sdk }} + ASPNET_VERSION8=${{ steps.dotnet8_vers.outputs.aspnet }} + DOTNET_VERSION8=${{ steps.dotnet8_vers.outputs.dotnet }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From 582e6b07c038d9d8c7006b1d6d2d377e2c13769a Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 03:36:45 +0800 Subject: [PATCH 10/17] Get PowerShell version --- .github/workflows/docker-teamcityagent-image.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-teamcityagent-image.yml b/.github/workflows/docker-teamcityagent-image.yml index b220c39..7b602d0 100644 --- a/.github/workflows/docker-teamcityagent-image.yml +++ b/.github/workflows/docker-teamcityagent-image.yml @@ -121,11 +121,12 @@ jobs: id: dotnet8_vers shell: pwsh run: | - $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:8.0-preview-jammy sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') + $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:8.0-preview-jammy sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION;pwsh --version') Write-Output "Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" Write-Output "::set-output name=sdk::$($dotnet_vers[0])" Write-Output "::set-output name=aspnet::$($dotnet_vers[1])" Write-Output "::set-output name=dotnet::$($dotnet_vers[2])" + Write-Output "::set-output name=pwsh::$($dotnet_vers[3].SubString(11))" - name: Build and push id: docker_build @@ -153,5 +154,6 @@ jobs: DOTNET_SDK_VERSION8=${{ steps.dotnet8_vers.outputs.sdk }} ASPNET_VERSION8=${{ steps.dotnet8_vers.outputs.aspnet }} DOTNET_VERSION8=${{ steps.dotnet8_vers.outputs.dotnet }} + POWERSHELL_VERSION=${{ steps.dotnet8_vers.outputs.pwsh }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} From e657228f009b3e590791d9914fb870a41992d314 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 11:38:49 +0800 Subject: [PATCH 11/17] Update actions/checkout@v3 --- .github/workflows/docker-minver-image.yml | 2 +- .github/workflows/docker-teamcityagent-image.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-minver-image.yml b/.github/workflows/docker-minver-image.yml index 3ec0beb..882a9ca 100644 --- a/.github/workflows/docker-minver-image.yml +++ b/.github/workflows/docker-minver-image.yml @@ -16,7 +16,7 @@ jobs: name: build-${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Docker Repos Selection id: repos diff --git a/.github/workflows/docker-teamcityagent-image.yml b/.github/workflows/docker-teamcityagent-image.yml index 7b602d0..897c4ae 100644 --- a/.github/workflows/docker-teamcityagent-image.yml +++ b/.github/workflows/docker-teamcityagent-image.yml @@ -16,7 +16,7 @@ jobs: name: build-${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Docker Repos Selection id: repos From bcb57d84a89b992d60d82992a25cd077b3f23c9b Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 11:46:01 +0800 Subject: [PATCH 12/17] Update docker/metadata-action@v4 --- .github/workflows/docker-minver-image.yml | 2 +- .github/workflows/docker-teamcityagent-image.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-minver-image.yml b/.github/workflows/docker-minver-image.yml index 882a9ca..be3b170 100644 --- a/.github/workflows/docker-minver-image.yml +++ b/.github/workflows/docker-minver-image.yml @@ -31,7 +31,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: | ${{ steps.repos.outputs.content }} diff --git a/.github/workflows/docker-teamcityagent-image.yml b/.github/workflows/docker-teamcityagent-image.yml index 897c4ae..5f78f7f 100644 --- a/.github/workflows/docker-teamcityagent-image.yml +++ b/.github/workflows/docker-teamcityagent-image.yml @@ -31,7 +31,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: | ${{ steps.repos.outputs.content }} From 87911e4326c69007aba823a8e734c5dc10a34e3b Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 11:58:58 +0800 Subject: [PATCH 13/17] Update ::set-output -> Write-Output >> $env:GITHUB_OUTPUT --- .github/workflows/docker-minver-image.yml | 2 +- .../workflows/docker-teamcityagent-image.yml | 38 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docker-minver-image.yml b/.github/workflows/docker-minver-image.yml index be3b170..4d316eb 100644 --- a/.github/workflows/docker-minver-image.yml +++ b/.github/workflows/docker-minver-image.yml @@ -27,7 +27,7 @@ jobs: $repos+='%0A' $repos+='teslaconsulting/minver-cli' } - Write-Output "::set-output name=content::$repos" + Write-Output "content=$repos" >> $env:GITHUB_OUTPUT - name: Docker meta id: meta diff --git a/.github/workflows/docker-teamcityagent-image.yml b/.github/workflows/docker-teamcityagent-image.yml index 5f78f7f..07dc9fb 100644 --- a/.github/workflows/docker-teamcityagent-image.yml +++ b/.github/workflows/docker-teamcityagent-image.yml @@ -27,7 +27,7 @@ jobs: $repos+='%0A' $repos+='teslaconsulting/teamcity-agent' } - Write-Output "::set-output name=content::$repos" + Write-Output "content=$repos" >> $env:GITHUB_OUTPUT - name: Docker meta id: meta @@ -63,7 +63,7 @@ jobs: Write-Output "Minver help:`n$minver_help" $minver_version=$minver_help[0] -Replace '^[^0-9]+([0-9.]+)[^0-9].*$','$1' Write-Output "Minver version: $minver_version" - Write-Output "::set-output name=version::$minver_version" + Write-Output "version=$minver_version" >> $env:GITHUB_OUTPUT - name: Get Docker Compose version id: docker_compose_version @@ -72,7 +72,7 @@ jobs: echo "Docker compose version raw: $DOCKER_COMPOSE_VERSION" DOCKER_COMPOSE_VERSION=${DOCKER_COMPOSE_VERSION#Docker Compose version v} echo "Docker compose version only: '$DOCKER_COMPOSE_VERSION'" - echo "::set-output name=version::$DOCKER_COMPOSE_VERSION" + echo "version=$DOCKER_COMPOSE_VERSION" >> $GITHUB_OUTPUT - name: Get .NETCore 3.1 Versions id: dotnetcore31_vers @@ -83,9 +83,9 @@ jobs: $aspnetcore_version=$dotnet_info_raw -replace '^.+Microsoft.AspNetCore.App\s+([0-9.]+)[^0-9.].*$','$1' $dotnet_version=$dotnet_info_raw -replace '^.+Microsoft.NETCore.App\s+([0-9.]+)[^0-9.].*$','$1' Write-Output "Version SDK:$dotnet_sdk_version ASP.NET:$aspnetcore_version .NETCore:$dotnet_version" - Write-Output "::set-output name=sdk::$dotnet_sdk_version" - Write-Output "::set-output name=aspnet::$aspnetcore_version" - Write-Output "::set-output name=dotnet::$dotnet_version" + Write-Output "sdk=$dotnet_sdk_version" >> $env:GITHUB_OUTPUT + Write-Output "aspnet=$aspnetcore_version" >> $env:GITHUB_OUTPUT + Write-Output "dotnet=$dotnet_version" >> $env:GITHUB_OUTPUT - name: Get .NET 5.0 Versions id: dotnet5_vers @@ -93,9 +93,9 @@ jobs: run: | $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:5.0-focal sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') Write-Output "Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" - Write-Output "::set-output name=sdk::$($dotnet_vers[0])" - Write-Output "::set-output name=aspnet::$($dotnet_vers[1])" - Write-Output "::set-output name=dotnet::$($dotnet_vers[2])" + Write-Output "sdk=$($dotnet_vers[0])" >> $env:GITHUB_OUTPUT + Write-Output "aspnet=$($dotnet_vers[1])" >> $env:GITHUB_OUTPUT + Write-Output "dotnet=$($dotnet_vers[2])" >> $env:GITHUB_OUTPUT - name: Get .NET 6.0 Versions id: dotnet6_vers @@ -103,9 +103,9 @@ jobs: run: | $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:6.0-focal sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') Write-Output "Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" - Write-Output "::set-output name=sdk::$($dotnet_vers[0])" - Write-Output "::set-output name=aspnet::$($dotnet_vers[1])" - Write-Output "::set-output name=dotnet::$($dotnet_vers[2])" + Write-Output "sdk=$($dotnet_vers[0])" >> $env:GITHUB_OUTPUT + Write-Output "aspnet=$($dotnet_vers[1])" >> $env:GITHUB_OUTPUT + Write-Output "dotnet=$($dotnet_vers[2])" >> $env:GITHUB_OUTPUT - name: Get .NET 7.0 Versions id: dotnet7_vers @@ -113,9 +113,9 @@ jobs: run: | $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:7.0-jammy sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') Write-Output "Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" - Write-Output "::set-output name=sdk::$($dotnet_vers[0])" - Write-Output "::set-output name=aspnet::$($dotnet_vers[1])" - Write-Output "::set-output name=dotnet::$($dotnet_vers[2])" + Write-Output "sdk=$($dotnet_vers[0])" >> $env:GITHUB_OUTPUT + Write-Output "aspnet=$($dotnet_vers[1])" >> $env:GITHUB_OUTPUT + Write-Output "dotnet=$($dotnet_vers[2])" >> $env:GITHUB_OUTPUT - name: Get .NET 8.0 Versions id: dotnet8_vers @@ -123,10 +123,10 @@ jobs: run: | $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:8.0-preview-jammy sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION;pwsh --version') Write-Output "Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" - Write-Output "::set-output name=sdk::$($dotnet_vers[0])" - Write-Output "::set-output name=aspnet::$($dotnet_vers[1])" - Write-Output "::set-output name=dotnet::$($dotnet_vers[2])" - Write-Output "::set-output name=pwsh::$($dotnet_vers[3].SubString(11))" + Write-Output "sdk=$($dotnet_vers[0])" >> $env:GITHUB_OUTPUT + Write-Output "aspnet=$($dotnet_vers[1])" >> $env:GITHUB_OUTPUT + Write-Output "dotnet=$($dotnet_vers[2])" >> $env:GITHUB_OUTPUT + Write-Output "pwsh=$($dotnet_vers[3].SubString(11))" >> $env:GITHUB_OUTPUT - name: Build and push id: docker_build From d51f026f4d9b483d1ff5fa7fb1e3f227fc6bef58 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 12:22:30 +0800 Subject: [PATCH 14/17] Update docker/setup-buildx-action@v2 --- .github/workflows/docker-minver-image.yml | 2 +- .github/workflows/docker-teamcityagent-image.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-minver-image.yml b/.github/workflows/docker-minver-image.yml index 4d316eb..0790df8 100644 --- a/.github/workflows/docker-minver-image.yml +++ b/.github/workflows/docker-minver-image.yml @@ -42,7 +42,7 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub if: github.event_name != 'pull_request' diff --git a/.github/workflows/docker-teamcityagent-image.yml b/.github/workflows/docker-teamcityagent-image.yml index 07dc9fb..91d781a 100644 --- a/.github/workflows/docker-teamcityagent-image.yml +++ b/.github/workflows/docker-teamcityagent-image.yml @@ -46,7 +46,7 @@ jobs: # uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub if: github.event_name != 'pull_request' From f3baa2fb1c8921f5d7922650452b8a22b9755aa9 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 13:22:52 +0800 Subject: [PATCH 15/17] Update docker/login-action@v2 --- .github/workflows/docker-minver-image.yml | 2 +- .github/workflows/docker-teamcityagent-image.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-minver-image.yml b/.github/workflows/docker-minver-image.yml index 0790df8..37bceeb 100644 --- a/.github/workflows/docker-minver-image.yml +++ b/.github/workflows/docker-minver-image.yml @@ -46,7 +46,7 @@ jobs: - name: Login to Docker Hub if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} diff --git a/.github/workflows/docker-teamcityagent-image.yml b/.github/workflows/docker-teamcityagent-image.yml index 91d781a..0ea0711 100644 --- a/.github/workflows/docker-teamcityagent-image.yml +++ b/.github/workflows/docker-teamcityagent-image.yml @@ -50,7 +50,7 @@ jobs: - name: Login to Docker Hub if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} From 98899be5e1e1bd19f99b6ce53182f115926c9c5b Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 13:34:25 +0800 Subject: [PATCH 16/17] Update docker/build-push-action@v4 --- .github/workflows/docker-minver-image.yml | 2 +- .github/workflows/docker-teamcityagent-image.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-minver-image.yml b/.github/workflows/docker-minver-image.yml index 37bceeb..0340de8 100644 --- a/.github/workflows/docker-minver-image.yml +++ b/.github/workflows/docker-minver-image.yml @@ -53,7 +53,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: ./minver push: ${{ github.event_name != 'pull_request' }} diff --git a/.github/workflows/docker-teamcityagent-image.yml b/.github/workflows/docker-teamcityagent-image.yml index 0ea0711..f3d11c6 100644 --- a/.github/workflows/docker-teamcityagent-image.yml +++ b/.github/workflows/docker-teamcityagent-image.yml @@ -130,7 +130,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: ./teamcity-agent push: ${{ github.event_name != 'pull_request' }} From 22d8fff55b94090411d9fe9bcdb0ff8530384ea8 Mon Sep 17 00:00:00 2001 From: Tho Ho Date: Sat, 15 Jul 2023 13:53:13 +0800 Subject: [PATCH 17/17] Update README --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0007be0..f04b685 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Docker teamcity-agent with multi .NET SDKs -Customized Teamcity Agent image Ubuntu 20.04, add more tooks and .NET SDK +Customized Teamcity Agent image Ubuntu 20.04 (Focal Fossa), add more tooks and .NET SDK ## Docker Hub and Dockerfile @@ -13,12 +13,11 @@ https://hub.docker.com/r/teslaconsulting/teamcity-agent Update per build. - Latest tag: `2022.04.4-linux` -- .NET 6 SDK: 6.0.401 -- .NET 6 and ASP.NETCore 6: 6.0.9 +- .NET 8 SDK: 8.0.100-preview.6.23330.14 +- .NET 7 SDK: 7.0.306 +- .NET 6 SDK: 6.0.412 - .NET 5 SDK: 5.0.408 -- .NET 5 and ASP.NETCore 5: 5.0.17 -- .NETCore 3.1 SDK: 3.1.423 -- .NET 3.1 and ASP.NETCore 3.1: 3.1.29 -- Powershell Core: 7.2.6 -- MinVer Cli: 4.2.0 -- Docker Compose v2: 2.11.2 +- .NETCore 3.1 SDK: 3.1.426 +- Powershell Core: 7.4.0-preview.3 +- MinVer Cli: 4.3.0 +- Docker Compose v2: 2.20.0