diff --git a/acr-tasks/purge-dev-acr-tasks.sh b/acr-tasks/purge-dev-acr-tasks.sh index 62772f65ae..034b92697c 100644 --- a/acr-tasks/purge-dev-acr-tasks.sh +++ b/acr-tasks/purge-dev-acr-tasks.sh @@ -14,9 +14,6 @@ az acr task create --name weeklyBuildImagePurgeTask -r oryxdevmcr --cmd "$PURGE_ PURGE_CMD="acr purge --filter 'public/oryx/cli:.*' --ago 30d --untagged" az acr task create --name weeklyCliImagePurgeTask -r oryxdevmcr --cmd "$PURGE_CMD" --schedule "0 22 * * WED" --timeout 9000 -c /dev/null -PURGE_CMD="acr purge --filter 'public/oryx/cli-buster:.*' --ago 30d --untagged" -az acr task create --name weeklyCliBusterImagePurgeTask -r oryxdevmcr --cmd "$PURGE_CMD" --schedule "0 22 * * WED" --timeout 9000 -c /dev/null - PURGE_CMD="acr purge --filter 'public/oryx/base:.*' --ago 30d --untagged" az acr task create --name weeklyBaseImagePurgeTask -r oryxdevmcr --cmd "$PURGE_CMD" --schedule "0 22 * * WED" --timeout 9000 -c /dev/null diff --git a/build/buildBuildImages.sh b/build/buildBuildImages.sh index 9d85b5f8b3..67ed4b421a 100755 --- a/build/buildBuildImages.sh +++ b/build/buildBuildImages.sh @@ -412,7 +412,7 @@ function buildCliImage() { debianFlavor="stretch" builtImageName="$builtImageName:debian-$debianFlavor" else - builtImageName="$builtImageName-$debianFlavor:debian-$debianFlavor" + builtImageName="$builtImageName:debian-$debianFlavor" devImageRepo="$DEVBOX_CLI_BUILD_IMAGE_REPO-$debianFlavor" fi echo "dev image tag: "$devImageTag @@ -495,6 +495,7 @@ if [ -z "$imageTypeToBuild" ]; then buildVsoImage "focal" buildVsoImage "bullseye" buildCliImage "buster" + buildCliImage "bullseye" buildCliImage buildBuildPackImage buildFullImage "buster" @@ -536,8 +537,13 @@ elif [ "$imageTypeToBuild" == "vso-bullseye" ]; then elif [ "$imageTypeToBuild" == "cli" ]; then buildCliImage buildCliImage "buster" + buildCliImage "bullseye" +elif [ "$imageTypeToBuild" == "cli-stretch" ]; then + buildCliImage elif [ "$imageTypeToBuild" == "cli-buster" ]; then buildCliImage "buster" +elif [ "$imageTypeToBuild" == "cli-bullseye" ]; then + buildCliImage "bullseye" elif [ "$imageTypeToBuild" == "buildpack" ]; then buildBuildPackImage else diff --git a/images/build/Dockerfiles/cli.Dockerfile b/images/build/Dockerfiles/cli.Dockerfile index d53cdcc0a7..b9377e0f39 100644 --- a/images/build/Dockerfiles/cli.Dockerfile +++ b/images/build/Dockerfiles/cli.Dockerfile @@ -28,6 +28,15 @@ RUN if [ "${DEBIAN_FLAVOR}" = "buster" ]; then \ libcurl4 \ libssl1.1 \ && rm -rf /var/lib/apt/lists/* ; \ + elif [ "${DEBIAN_FLAVOR}" = "bullseye" ]; then \ + apt-get update \ + && apt-get install -y --no-install-recommends \ + libicu67 \ + libcurl4 \ + libssl1.1 \ + libyaml-dev \ + libxml2 \ + && rm -rf /var/lib/apt/lists/* ; \ else \ apt-get update \ && apt-get install -y --no-install-recommends \ @@ -48,6 +57,8 @@ RUN apt-get update \ zlib1g \ rsync \ libgdiplus \ + # Required for mysqlclient + default-libmysqlclient-dev \ && rm -rf /var/lib/apt/lists/* \ && chmod a+x /opt/buildscriptgen/GenerateBuildScript \ && mkdir -p /opt/oryx \ diff --git a/src/BuildScriptGenerator/Php/PhpComposerInstaller.cs b/src/BuildScriptGenerator/Php/PhpComposerInstaller.cs index 588bac10dc..e1288342d6 100644 --- a/src/BuildScriptGenerator/Php/PhpComposerInstaller.cs +++ b/src/BuildScriptGenerator/Php/PhpComposerInstaller.cs @@ -40,7 +40,7 @@ public override void InstallPlatformSpecificSkeletonDependencies(StringBuilder s stringBuilder.AppendLine($"echo 'Installing php-composer specific dependencies...'"); // Install an assortment of traditional tooling (unicode, SSL, HTTP, etc.) - stringBuilder.AppendLine("if [ \"${DEBIAN_FLAVOR}\" = \"buster\" ]; then"); + stringBuilder.AppendLine("if [[ \"${DEBIAN_FLAVOR}\" = \"buster\" || \"${DEBIAN_FLAVOR}\" = \"bullseye\" ]]; then"); stringBuilder.AppendAptGetInstallPackages( "ca-certificates", "libargon2-0", diff --git a/src/BuildScriptGenerator/Php/PhpPlatformInstaller.cs b/src/BuildScriptGenerator/Php/PhpPlatformInstaller.cs index cb4964b26a..b201856c0a 100644 --- a/src/BuildScriptGenerator/Php/PhpPlatformInstaller.cs +++ b/src/BuildScriptGenerator/Php/PhpPlatformInstaller.cs @@ -40,7 +40,7 @@ public override void InstallPlatformSpecificSkeletonDependencies(StringBuilder s stringBuilder.AppendLine($"echo 'Installing {PhpConstants.PlatformName} specific dependencies...'"); // Install an assortment of traditional tooling (unicode, SSL, HTTP, etc.) - stringBuilder.AppendLine("if [ \"${DEBIAN_FLAVOR}\" = \"buster\" ]; then"); + stringBuilder.AppendLine("if [[ \"${DEBIAN_FLAVOR}\" = \"buster\" || \"${DEBIAN_FLAVOR}\" = \"bullseye\" ]]; then"); stringBuilder.AppendAptGetInstallPackages( "ca-certificates", "libargon2-0", diff --git a/tests/Oryx.BuildImage.Tests/DotNetCore/DotNetCoreDynamicInstallTest.cs b/tests/Oryx.BuildImage.Tests/DotNetCore/DotNetCoreDynamicInstallTest.cs index 3c89610730..f7ac6952a5 100644 --- a/tests/Oryx.BuildImage.Tests/DotNetCore/DotNetCoreDynamicInstallTest.cs +++ b/tests/Oryx.BuildImage.Tests/DotNetCore/DotNetCoreDynamicInstallTest.cs @@ -79,7 +79,17 @@ public void BuildsApplication_ByDynamicallyInstallingSDKs_CliBuster( string runtimeVersion) { BuildsApplication_ByDynamicallyInstallingSDKs( - appName, runtimeVersion, _imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); + appName, runtimeVersion, _imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); + } + + [Theory, Trait("category", "cli-bullseye")] + [InlineData(NetCore7PreviewMvcApp, "7.0")] + public void BuildsApplication_ByDynamicallyInstallingSDKs_CliBullseye( + string appName, + string runtimeVersion) + { + BuildsApplication_ByDynamicallyInstallingSDKs( + appName, runtimeVersion, _imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); } private void BuildsApplication_ByDynamicallyInstallingSDKs( diff --git a/tests/Oryx.BuildImage.Tests/DotNetCore/DotNetCoreSampleAppsTest.cs b/tests/Oryx.BuildImage.Tests/DotNetCore/DotNetCoreSampleAppsTest.cs index 418390c9ee..ed0c531d5a 100644 --- a/tests/Oryx.BuildImage.Tests/DotNetCore/DotNetCoreSampleAppsTest.cs +++ b/tests/Oryx.BuildImage.Tests/DotNetCore/DotNetCoreSampleAppsTest.cs @@ -65,8 +65,15 @@ public void PipelineTestInvocationCli() [Fact, Trait("category", "cli-buster")] public void PipelineTestInvocationCliBuster() { - GDIPlusLibrary_IsPresentInTheImage(ImageTestHelperConstants.CliBusterRepository); - Builds_NetCore31App_UsingNetCore31_DotNetSdkVersion(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); + GDIPlusLibrary_IsPresentInTheImage(ImageTestHelperConstants.CliBusterTag); + Builds_NetCore31App_UsingNetCore31_DotNetSdkVersion(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); + } + + [Fact, Trait("category", "cli-bullseye")] + public void PipelineTestInvocationCliBullseye() + { + GDIPlusLibrary_IsPresentInTheImage(ImageTestHelperConstants.CliBullseyeTag); + Builds_NetCore31App_UsingNetCore31_DotNetSdkVersion(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); } private readonly string SdkVersionMessageFormat = "Using .NET Core SDK Version: {0}"; diff --git a/tests/Oryx.BuildImage.Tests/Hugo/HugoDynamicInstallationTest.cs b/tests/Oryx.BuildImage.Tests/Hugo/HugoDynamicInstallationTest.cs index 0ec114d7fe..1a44f16813 100644 --- a/tests/Oryx.BuildImage.Tests/Hugo/HugoDynamicInstallationTest.cs +++ b/tests/Oryx.BuildImage.Tests/Hugo/HugoDynamicInstallationTest.cs @@ -47,7 +47,14 @@ public void PipelineTestInvocationCli() public void PipelineTestInvocationCliBuster() { var imageTestHelper = new ImageTestHelper(); - InstallsHugoVersionDynamically_UsingEnvironmentVariable_AndBuildsApp(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); + InstallsHugoVersionDynamically_UsingEnvironmentVariable_AndBuildsApp(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); + } + + [Fact, Trait("category", "cli-bullseye")] + public void PipelineTestInvocationCliBullseye() + { + var imageTestHelper = new ImageTestHelper(); + InstallsHugoVersionDynamically_UsingEnvironmentVariable_AndBuildsApp(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); } private void InstallsHugoVersionDynamically_UsingEnvironmentVariable_AndBuildsApp(string imageName) diff --git a/tests/Oryx.BuildImage.Tests/Hugo/HugoSampleAppsTest.cs b/tests/Oryx.BuildImage.Tests/Hugo/HugoSampleAppsTest.cs index 1672704fe3..05d53a7488 100644 --- a/tests/Oryx.BuildImage.Tests/Hugo/HugoSampleAppsTest.cs +++ b/tests/Oryx.BuildImage.Tests/Hugo/HugoSampleAppsTest.cs @@ -54,7 +54,14 @@ public void PipelineTestInvocationCli() public void PipelineTestInvocationCliBuster() { var imageTestHelper = new ImageTestHelper(); - GeneratesScript_AndBuilds(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); + GeneratesScript_AndBuilds(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); + } + + [Fact, Trait("category", "cli-bullseye")] + public void PipelineTestInvocationCliBullseye() + { + var imageTestHelper = new ImageTestHelper(); + GeneratesScript_AndBuilds(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); } private void GeneratesScript_AndBuilds(string buildImageName) diff --git a/tests/Oryx.BuildImage.Tests/Java/JavaDynamicInstallationTest.cs b/tests/Oryx.BuildImage.Tests/Java/JavaDynamicInstallationTest.cs index f4c8546188..2df9c112cf 100644 --- a/tests/Oryx.BuildImage.Tests/Java/JavaDynamicInstallationTest.cs +++ b/tests/Oryx.BuildImage.Tests/Java/JavaDynamicInstallationTest.cs @@ -54,7 +54,14 @@ public void BuildsMavenArcheTypeSampleWithDynamicInstallationCli(string version) [MemberData(nameof(VersionsData))] public void BuildsMavenArcheTypeSampleWithDynamicInstallationCliBuster(string version) { - BuildsMavenArcheTypeSampleWithDynamicInstallation(version, _imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); + BuildsMavenArcheTypeSampleWithDynamicInstallation(version, _imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); + } + + [Theory, Trait("category", "cli-bullseye")] + [MemberData(nameof(VersionsData))] + public void BuildsMavenArcheTypeSampleWithDynamicInstallationCliBullseye(string version) + { + BuildsMavenArcheTypeSampleWithDynamicInstallation(version, _imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); } private void BuildsMavenArcheTypeSampleWithDynamicInstallation(string version, string imageName) diff --git a/tests/Oryx.BuildImage.Tests/Java/JavaSampleAppsTest.cs b/tests/Oryx.BuildImage.Tests/Java/JavaSampleAppsTest.cs index 9393dc11c7..ff27a889ff 100644 --- a/tests/Oryx.BuildImage.Tests/Java/JavaSampleAppsTest.cs +++ b/tests/Oryx.BuildImage.Tests/Java/JavaSampleAppsTest.cs @@ -44,7 +44,7 @@ public void JavaSampleAppsTestsCli(string imageTag) } [Theory, Trait("category", "cli-buster")] - [InlineData(ImageTestHelperConstants.CliBusterRepository)] + [InlineData(ImageTestHelperConstants.CliBusterTag)] public void JavaSampleAppsTestsCliBuster(string imageTag) { BuildsMavenArcheTypeSample(imageTag); @@ -53,6 +53,16 @@ public void JavaSampleAppsTestsCliBuster(string imageTag) BuildsSpringBootSampleApp(imageTag); } + [Theory, Trait("category", "cli-bullseye")] + [InlineData(ImageTestHelperConstants.CliBullseyeTag)] + public void JavaSampleAppsTestsCliBullseye(string imageTag) + { + BuildsMavenArcheTypeSample(imageTag); + BuildsMavenJ2EESample(imageTag); + BuildsMavenSimpleJavaApp(imageTag); + BuildsSpringBootSampleApp(imageTag); + } + private void BuildsMavenArcheTypeSample(string imageTag) { // Arrange diff --git a/tests/Oryx.BuildImage.Tests/Node/NodeDynamicInstallationTest.cs b/tests/Oryx.BuildImage.Tests/Node/NodeDynamicInstallationTest.cs index 704cb6797e..f878d43a0e 100644 --- a/tests/Oryx.BuildImage.Tests/Node/NodeDynamicInstallationTest.cs +++ b/tests/Oryx.BuildImage.Tests/Node/NodeDynamicInstallationTest.cs @@ -54,9 +54,22 @@ public static TheoryData ImageNameDataCliBuster { var data = new TheoryData(); var imageTestHelper = new ImageTestHelper(); - data.Add("12.22.11", imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); - data.Add("14.19.1", imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); - data.Add("16.14.2", imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); + data.Add("12.22.11", imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); + data.Add("14.19.1", imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); + data.Add("16.14.2", imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); + return data; + } + } + + public static TheoryData ImageNameDataCliBullseye + { + get + { + var data = new TheoryData(); + var imageTestHelper = new ImageTestHelper(); + data.Add("12.22.11", imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); + data.Add("14.19.1", imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); + data.Add("16.14.2", imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); return data; } } @@ -85,6 +98,14 @@ public void GeneratesScript_AndBuildNodeAppsWithDynamicInstallationCliBuster(str GeneratesScript_AndBuildNodeAppsWithDynamicInstallation(version, buildImageName); } + [Theory, Trait("category", "cli-bullseye")] + [Trait("build-image", "cli-debian-bullseye")] + [MemberData(nameof(ImageNameDataCliBullseye))] + public void GeneratesScript_AndBuildNodeAppsWithDynamicInstallationCliBullseye(string version, string buildImageName) + { + GeneratesScript_AndBuildNodeAppsWithDynamicInstallation(version, buildImageName); + } + private void GeneratesScript_AndBuildNodeAppsWithDynamicInstallation(string version, string buildImageName) { // Arrange diff --git a/tests/Oryx.BuildImage.Tests/Node/NodeJsSampleAppsOtherTests.cs b/tests/Oryx.BuildImage.Tests/Node/NodeJsSampleAppsOtherTests.cs index d9cb52a25f..520e0c6824 100644 --- a/tests/Oryx.BuildImage.Tests/Node/NodeJsSampleAppsOtherTests.cs +++ b/tests/Oryx.BuildImage.Tests/Node/NodeJsSampleAppsOtherTests.cs @@ -60,7 +60,14 @@ public void PipelineTestInvocationCli() public void PipelineTestInvocationCliBuster() { var imageTestHelper = new ImageTestHelper(); - GeneratesScript_AndBuilds(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); + GeneratesScript_AndBuilds(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); + } + + [Fact, Trait("category", "cli-bullseye")] + public void PipelineTestInvocationCliBullseye() + { + var imageTestHelper = new ImageTestHelper(); + GeneratesScript_AndBuilds(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); } private void GeneratesScript_AndBuilds(string buildImageName) diff --git a/tests/Oryx.BuildImage.Tests/Php/PhpDynamicInstallationTest.cs b/tests/Oryx.BuildImage.Tests/Php/PhpDynamicInstallationTest.cs index be37177cc4..6bf2e91faa 100644 --- a/tests/Oryx.BuildImage.Tests/Php/PhpDynamicInstallationTest.cs +++ b/tests/Oryx.BuildImage.Tests/Php/PhpDynamicInstallationTest.cs @@ -75,16 +75,36 @@ public static TheoryData VersionAndImageNameDataCliBuste { var data = new TheoryData(); var imageHelper = new ImageTestHelper(); - data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), PhpVersions.ComposerVersion); - data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), PhpVersions.ComposerVersion); - data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), PhpVersions.ComposerVersion); - data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), PhpVersions.ComposerVersion); + data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerVersion); + data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerVersion); + data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerVersion); + data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.ComposerVersion); // test latest php-composer version - data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), PhpVersions.Composer23Version); - data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), PhpVersions.Composer23Version); - data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), PhpVersions.Composer23Version); - data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), PhpVersions.Composer23Version); + data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.Composer23Version); + data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.Composer23Version); + data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.Composer23Version); + data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), PhpVersions.Composer23Version); + return data; + } + } + + public static TheoryData VersionAndImageNameDataCliBullseye + { + get + { + var data = new TheoryData(); + var imageHelper = new ImageTestHelper(); + data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerVersion); + data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerVersion); + data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerVersion); + data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.ComposerVersion); + + // test latest php-composer version + data.Add(PhpVersions.Php74Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer23Version); + data.Add(PhpVersions.Php80Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer23Version); + data.Add(PhpVersions.Php81Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer23Version); + data.Add(PhpVersions.Php82Version, imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), PhpVersions.Composer23Version); return data; } } @@ -110,6 +130,13 @@ public void BuildsAppByInstallingSdkDynamicallyCliBuster(string phpVersion, stri BuildsAppByInstallingSdkDynamically(phpVersion, imageName, phpComposerVersion, "/opt/php"); } + [Theory, Trait("category", "cli-bullseye")] + [MemberData(nameof(VersionAndImageNameDataCliBullseye))] + public void BuildsAppByInstallingSdkDynamicallyCliBullseye(string phpVersion, string imageName, string phpComposerVersion) + { + BuildsAppByInstallingSdkDynamically(phpVersion, imageName, phpComposerVersion, "/opt/php"); + } + private void BuildsAppByInstallingSdkDynamically( string phpVersion, string imageName, diff --git a/tests/Oryx.BuildImage.Tests/Php/PhpSampleAppsTest.cs b/tests/Oryx.BuildImage.Tests/Php/PhpSampleAppsTest.cs index a780c755c6..e70b0e0c81 100644 --- a/tests/Oryx.BuildImage.Tests/Php/PhpSampleAppsTest.cs +++ b/tests/Oryx.BuildImage.Tests/Php/PhpSampleAppsTest.cs @@ -104,11 +104,18 @@ public void GeneratesScript_AndBuilds_TwigExample_WithDynamicInstallation_Cli(st } [Theory, Trait("category", "cli-buster")] - [InlineData(PhpVersions.Php80Version, ImageTestHelperConstants.CliBusterRepository)] + [InlineData(PhpVersions.Php80Version, ImageTestHelperConstants.CliBusterTag)] public void GeneratesScript_AndBuilds_TwigExample_WithDynamicInstallation_CliBuster(string phpVersion, string imageTag) { GeneratesScript_AndBuilds_TwigExample_WithDynamicInstallation(phpVersion, imageTag); } + [Theory, Trait("category", "cli-bullseye")] + [InlineData(PhpVersions.Php80Version, ImageTestHelperConstants.CliBullseyeTag)] + public void GeneratesScript_AndBuilds_TwigExample_WithDynamicInstallation_CliBullseye(string phpVersion, string imageTag) + { + GeneratesScript_AndBuilds_TwigExample_WithDynamicInstallation(phpVersion, imageTag); + } + private void GeneratesScript_AndBuilds_TwigExample_WithDynamicInstallation(string phpVersion, string imageTag) { // Arrange diff --git a/tests/Oryx.BuildImage.Tests/PulledBuildImageTypeTest.cs b/tests/Oryx.BuildImage.Tests/PulledBuildImageTypeTest.cs index e4f37c8cdd..8aa7b95afc 100644 --- a/tests/Oryx.BuildImage.Tests/PulledBuildImageTypeTest.cs +++ b/tests/Oryx.BuildImage.Tests/PulledBuildImageTypeTest.cs @@ -68,7 +68,14 @@ public void PulledCliStretchBuildImages_Contains_BUILDIMAGE_TYPE_Info() [Trait("category", "cli-buster")] public void PulledCliBusterBuildImages_Contains_BUILDIMAGE_TYPE_Info() { - PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), "cli"); + PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), "cli"); + } + + [Fact] + [Trait("category", "cli-bullseye")] + public void PulledCliBullseyeBuildImages_Contains_BUILDIMAGE_TYPE_Info() + { + PulledBuildImages_Contains_BUILDIMAGE_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), "cli"); } [Fact] diff --git a/tests/Oryx.BuildImage.Tests/PulledBuildOsTypeTest.cs b/tests/Oryx.BuildImage.Tests/PulledBuildOsTypeTest.cs index eb336c878e..67a38a1fa5 100644 --- a/tests/Oryx.BuildImage.Tests/PulledBuildOsTypeTest.cs +++ b/tests/Oryx.BuildImage.Tests/PulledBuildOsTypeTest.cs @@ -89,7 +89,14 @@ public void PulledCliStretchBuildImages_Contains_BUILDOS_TYPE_Info() [Trait("category", "cli-buster")] public void PulledCliBusterBuildImages_Contains_BUILDOS_TYPE_Info() { - PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), "DEBIAN|BUSTER"); + PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), "DEBIAN|BUSTER"); + } + + [Fact] + [Trait("category", "cli-bullseye")] + public void PulledCliBullseyeBuildImages_Contains_BUILDOS_TYPE_Info() + { + PulledBuildImages_Contains_BUILDOS_TYPE_Info(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), "DEBIAN|BULLSEYE"); } [Fact] diff --git a/tests/Oryx.BuildImage.Tests/Python/PythonDynamicInstallationTest.cs b/tests/Oryx.BuildImage.Tests/Python/PythonDynamicInstallationTest.cs index ad4f381a35..5fc35df985 100644 --- a/tests/Oryx.BuildImage.Tests/Python/PythonDynamicInstallationTest.cs +++ b/tests/Oryx.BuildImage.Tests/Python/PythonDynamicInstallationTest.cs @@ -64,7 +64,14 @@ public void PipelineTestInvocationCli() public void PipelineTestInvocationCliBuster() { var imageTestHelper = new ImageTestHelper(); - GeneratesScript_AndBuildsPython_FlaskApp(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository), "3.9.0", "/opt"); + GeneratesScript_AndBuildsPython_FlaskApp(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag), "3.9.0", "/opt"); + } + + [Fact, Trait("category", "cli-bullseye")] + public void PipelineTestInvocationCliBullseye() + { + var imageTestHelper = new ImageTestHelper(); + GeneratesScript_AndBuildsPython_FlaskApp(imageTestHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag), "3.9.0", "/opt"); } private void GeneratesScript_AndBuildsPython_FlaskApp( diff --git a/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs b/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs index 0a960d9b7d..ee84dd7c1a 100644 --- a/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs +++ b/tests/Oryx.BuildImage.Tests/Python/PythonSampleAppsTest.cs @@ -66,7 +66,7 @@ public void PipelineTestInvocationCli(string imageTag) } [Theory, Trait("category", "cli-buster")] - [InlineData(ImageTestHelperConstants.CliBusterRepository)] + [InlineData(ImageTestHelperConstants.CliBusterTag)] public void PipelineTestInvocationCliBuster(string imageTag) { GeneratesScript_AndBuilds(_imageHelper.GetCliImage(imageTag)); @@ -74,6 +74,15 @@ public void PipelineTestInvocationCliBuster(string imageTag) DoesNotGenerateCondaBuildScript_IfImageDoesNotHaveCondaInstalledInIt(imageTag); } + [Theory, Trait("category", "cli-bullseye")] + [InlineData(ImageTestHelperConstants.CliBullseyeTag)] + public void PipelineTestInvocationCliBullseye(string imageTag) + { + GeneratesScript_AndBuilds(_imageHelper.GetCliImage(imageTag)); + JamSpell_CanBe_Installed_In_The_BuildImage(imageTag); + DoesNotGenerateCondaBuildScript_IfImageDoesNotHaveCondaInstalledInIt(imageTag); + } + [Theory] [InlineData(Settings.BuildImageName)] [InlineData(Settings.LtsVersionsBuildImageName)] diff --git a/tests/Oryx.BuildImage.Tests/Ruby/RubyDynamicInstallationTest.cs b/tests/Oryx.BuildImage.Tests/Ruby/RubyDynamicInstallationTest.cs index 2cd364ee2e..2260f427c1 100644 --- a/tests/Oryx.BuildImage.Tests/Ruby/RubyDynamicInstallationTest.cs +++ b/tests/Oryx.BuildImage.Tests/Ruby/RubyDynamicInstallationTest.cs @@ -53,7 +53,7 @@ public void PipelineTestInvocationCli(string imageTag) } [Theory, Trait("category", "cli-buster")] - [InlineData(ImageTestHelperConstants.CliBusterRepository)] + [InlineData(ImageTestHelperConstants.CliBusterTag)] public void PipelineTestInvocationCliBuster(string imageTag) { var imageTestHelper = new ImageTestHelper(); @@ -63,6 +63,17 @@ public void PipelineTestInvocationCliBuster(string imageTag) RubyVersions.Ruby31Version, imageTestHelper.GetCliImage(imageTag)); } + [Theory, Trait("category", "cli-bullseye")] + [InlineData(ImageTestHelperConstants.CliBullseyeTag)] + public void PipelineTestInvocationCliBullseye(string imageTag) + { + var imageTestHelper = new ImageTestHelper(); + GeneratesScript_AndBuildSinatraAppWithDynamicInstall( + RubyVersions.Ruby30Version, imageTestHelper.GetCliImage(imageTag)); + GeneratesScript_AndBuildSinatraAppWithDynamicInstall( + RubyVersions.Ruby31Version, imageTestHelper.GetCliImage(imageTag)); + } + private void GeneratesScript_AndBuildSinatraAppWithDynamicInstall(string version, string buildImageName) { // Please note: diff --git a/tests/Oryx.BuildImage.Tests/Ruby/RubySampleAppsTest.cs b/tests/Oryx.BuildImage.Tests/Ruby/RubySampleAppsTest.cs index d9d6dd5415..8eda2391b3 100644 --- a/tests/Oryx.BuildImage.Tests/Ruby/RubySampleAppsTest.cs +++ b/tests/Oryx.BuildImage.Tests/Ruby/RubySampleAppsTest.cs @@ -51,7 +51,7 @@ public void PipelineTestInvocationCli(string imageTag) } [Theory, Trait("category", "cli-buster")] - [InlineData(ImageTestHelperConstants.CliBusterRepository)] + [InlineData(ImageTestHelperConstants.CliBusterTag)] public void PipelineTestInvocationCliBuster(string imageTag) { var imageTestHelper = new ImageTestHelper(); @@ -60,6 +60,16 @@ public void PipelineTestInvocationCliBuster(string imageTag) GeneratesScript_AndBuildRailsApp(imageTestHelper.GetCliImage(imageTag)); } + [Theory, Trait("category", "cli-bullseye")] + [InlineData(ImageTestHelperConstants.CliBullseyeTag)] + public void PipelineTestInvocationCliBullseye(string imageTag) + { + var imageTestHelper = new ImageTestHelper(); + Builds_JekyllStaticWebApp_UsingCustomBuildCommand( + imageTestHelper.GetCliImage(imageTag)); + GeneratesScript_AndBuildRailsApp(imageTestHelper.GetCliImage(imageTag)); + } + [Fact, Trait("category", "vso-focal")] public void GeneratesScript_AndBuildSinatraApp() { diff --git a/tests/Oryx.BuildImage.Tests/golang/GolangDynamicInstallationTest.cs b/tests/Oryx.BuildImage.Tests/golang/GolangDynamicInstallationTest.cs index 6fbcfc8362..9ab0e6b67e 100644 --- a/tests/Oryx.BuildImage.Tests/golang/GolangDynamicInstallationTest.cs +++ b/tests/Oryx.BuildImage.Tests/golang/GolangDynamicInstallationTest.cs @@ -51,9 +51,16 @@ public void GeneratesScript_AndBuildGolangAppWithDynamicInstall_Cli() [Fact, Trait("category", "cli-buster")] public void GeneratesScript_AndBuildGolangAppWithDynamicInstall_CliBuster() { - GeneratesScript_AndBuildGolangAppWithDynamicInstall(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterRepository)); + GeneratesScript_AndBuildGolangAppWithDynamicInstall(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBusterTag)); } + [Fact, Trait("category", "cli-bullseye")] + public void GeneratesScript_AndBuildGolangAppWithDynamicInstall_CliBullseye() + { + GeneratesScript_AndBuildGolangAppWithDynamicInstall(_imageHelper.GetCliImage(ImageTestHelperConstants.CliBullseyeTag)); + } + + private void GeneratesScript_AndBuildGolangAppWithDynamicInstall(string imageName) { var imageTestHelper = new ImageTestHelper(); diff --git a/tests/Oryx.Tests.Common/ImageTestHelper.cs b/tests/Oryx.Tests.Common/ImageTestHelper.cs index de15a8a1bb..2fd2ee61f4 100644 --- a/tests/Oryx.Tests.Common/ImageTestHelper.cs +++ b/tests/Oryx.Tests.Common/ImageTestHelper.cs @@ -46,9 +46,9 @@ public class ImageTestHelper private const string _buildRepository = ImageTestHelperConstants.BuildRepository; private const string _packRepository = ImageTestHelperConstants.PackRepository; private const string _cliRepository = ImageTestHelperConstants.CliRepository; - private const string _cliBusterRepository = ImageTestHelperConstants.CliBusterRepository; private const string _cliStretchTag = ImageTestHelperConstants.CliStretchTag; private const string _cliBusterTag = ImageTestHelperConstants.CliBusterTag; + private const string _cliBullseyeTag = ImageTestHelperConstants.CliBullseyeTag; private const string _latestTag = ImageTestHelperConstants.LatestStretchTag; private const string _ltsVersionsStretch = ImageTestHelperConstants.LtsVersionsStretch; private const string _ltsVersionsBuster = ImageTestHelperConstants.LtsVersionsBuster; @@ -245,9 +245,13 @@ public string GetBuildImage(string tag) { return GetCliImage(_cliRepository); } - else if (string.Equals(tag, _cliBusterRepository)) + else if (string.Equals(tag, _cliBusterTag)) { - return GetCliImage(_cliBusterRepository); + return GetCliImage(_cliBusterTag); + } + else if(string.Equals(tag, _cliBullseyeTag)) + { + return GetCliImage(_cliBullseyeTag); } else if (string.Equals(tag, _fullStretch)) { @@ -388,9 +392,13 @@ public string GetPackImage() public string GetCliImage(string debianFlavor = null) { if (!string.IsNullOrEmpty(debianFlavor) - && string.Equals(debianFlavor.ToLower(), _cliBusterRepository)) + && string.Equals(debianFlavor.ToLower(), _cliBusterTag)) + { + return $"{_repoPrefix}/{_cliRepository}:{_cliBusterTag}{_tagSuffix}"; + } + else if (!string.IsNullOrEmpty(debianFlavor) && string.Equals(debianFlavor.ToLower(), _cliBullseyeTag)) { - return $"{_repoPrefix}/{_cliBusterRepository}:{_cliBusterTag}{_tagSuffix}"; + return $"{_repoPrefix}/{_cliRepository}:{_cliBullseyeTag}{_tagSuffix}"; } return $"{_repoPrefix}/{_cliRepository}:{_cliStretchTag}{_tagSuffix}"; @@ -516,9 +524,9 @@ public static class ImageTestHelperConstants public const string BuildRepository = "build"; public const string PackRepository = "pack"; public const string CliRepository = "cli"; - public const string CliBusterRepository = "cli-buster"; public const string CliStretchTag = "debian-stretch"; public const string CliBusterTag = "debian-buster"; + public const string CliBullseyeTag = "debian-bullseye"; public const string LatestStretchTag = "debian-stretch"; public const string LtsVersionsStretch = "lts-versions-debian-stretch"; public const string LtsVersionsBuster = "lts-versions-debian-buster"; diff --git a/tests/Oryx.Tests.Common/Settings.cs b/tests/Oryx.Tests.Common/Settings.cs index c743f3e359..308f2f73f3 100644 --- a/tests/Oryx.Tests.Common/Settings.cs +++ b/tests/Oryx.Tests.Common/Settings.cs @@ -18,7 +18,8 @@ public class Settings public const string JamStackBusterBuildImageName = "oryxdevmcr.azurecr.io/public/oryx/build:azfunc-jamstack-debian-buster"; public const string JamStackBuildImageName = "oryxdevmcr.azurecr.io/public/oryx/build:azfunc-jamstack-debian-stretch"; public const string CliBuildImageName = "oryxdevmcr.azurecr.io/public/oryx/cli:debian-stretch"; - public const string CliBusterBuildImageName = "oryxdevmcr.azurecr.io/public/oryx/cli-buster:debian-buster"; + public const string CliBusterBuildImageName = "oryxdevmcr.azurecr.io/public/oryx/cli:debian-buster"; + public const string CliBullseyeBuildImageName = "oryxdevmcr.azurecr.io/public/oryx/cli:debian-bullseye"; public const string LtsVerionsBusterBuildImageName = "oryxdevmcr.azurecr.io/public/oryx/build:lts-versions-debian-buster"; public const string VsoUbuntuBuildImageName = "oryxdevmcr.azurecr.io/public/oryx/build:vso-ubuntu-focal"; diff --git a/vsts/pipelines/ci.yml b/vsts/pipelines/ci.yml index 99d019fd2c..b89d48aae4 100644 --- a/vsts/pipelines/ci.yml +++ b/vsts/pipelines/ci.yml @@ -35,6 +35,9 @@ parameters: - key: CliBuster value: cli-buster + - + key: CliBullseye + value: cli-bullseye - key: Buildpack value: buildpack diff --git a/vsts/pipelines/nightly.yml b/vsts/pipelines/nightly.yml index 83c2573634..489ea2f62e 100644 --- a/vsts/pipelines/nightly.yml +++ b/vsts/pipelines/nightly.yml @@ -33,6 +33,9 @@ parameters: - key: CliBuster value: cli-buster + - + key: CliBullseye + value: cli-bullseye - key: Buildpack value: buildpack diff --git a/vsts/pipelines/validation.yml b/vsts/pipelines/validation.yml index 8f3cfaf9cf..4fbcfd11c0 100644 --- a/vsts/pipelines/validation.yml +++ b/vsts/pipelines/validation.yml @@ -33,6 +33,9 @@ parameters: - key: CliBuster value: cli-buster + - + key: CliBullseye + value: cli-bullseye - key: Buildpack value: buildpack diff --git a/vsts/scripts/pullAndTag.sh b/vsts/scripts/pullAndTag.sh index 595b633799..b32938f223 100644 --- a/vsts/scripts/pullAndTag.sh +++ b/vsts/scripts/pullAndTag.sh @@ -103,7 +103,8 @@ tagBuildImageForIntegrationTest "$imagefilter/build" "vso-debian-bullseye" "$bui tagBuildImageForIntegrationTest "$imagefilter/build" "full-debian-buster" "$buildImageFilter" "$buildImageTagFilter" tagBuildImageForIntegrationTest "$imagefilter/build" "full-debian-bullseye" "$buildImageFilter" "$buildImageTagFilter" tagBuildImageForIntegrationTest "$imagefilter/cli" "debian-stretch" "$buildImageFilter" "$buildImageTagFilter" -tagBuildImageForIntegrationTest "$imagefilter/cli-buster" "debian-buster" "$buildImageFilter" "$buildImageTagFilter" +tagBuildImageForIntegrationTest "$imagefilter/cli" "debian-buster" "$buildImageFilter" "$buildImageTagFilter" +tagBuildImageForIntegrationTest "$imagefilter/cli" "debian-bullseye" "$buildImageFilter" "$buildImageTagFilter" tagBuildImageForIntegrationTest "$imagefilter/pack" "" "$buildImageFilter" "$buildImageTagFilter" diff --git a/vsts/scripts/tagCliImagesForRelease.sh b/vsts/scripts/tagCliImagesForRelease.sh index 41d491e4d4..4a4506a369 100644 --- a/vsts/scripts/tagCliImagesForRelease.sh +++ b/vsts/scripts/tagCliImagesForRelease.sh @@ -20,7 +20,8 @@ if [ -f "$outPmeFile" ]; then fi cliImage="$sourceImageRepo/cli:debian-stretch-$BUILD_DEFINITIONNAME.$RELEASE_TAG_NAME" -cliBusterImage="$sourceImageRepo/cli-buster:debian-buster-$BUILD_DEFINITIONNAME.$RELEASE_TAG_NAME" +cliBusterImage="$sourceImageRepo/cli:debian-buster-$BUILD_DEFINITIONNAME.$RELEASE_TAG_NAME" +cliBullseyeImage="$sourceImageRepo/cli:debian-bullseye-$BUILD_DEFINITIONNAME.$RELEASE_TAG_NAME" echo "Pulling CLI image '$cliImage'..." docker pull "$cliImage" @@ -32,8 +33,15 @@ echo "Pulling CLI buster image '$cliBusterImage'..." docker pull "$cliBusterImage" echo "Retagging CLI buster image for $prodPmeImageRepo with 'debian-buster-$RELEASE_TAG_NAME'..." -echo "$prodPmeImageRepo/cli-buster:debian-buster-$RELEASE_TAG_NAME">>"$outPmeFile" -docker tag "$cliBusterImage" "$prodPmeImageRepo/cli-buster:debian-buster-$RELEASE_TAG_NAME" +echo "$prodPmeImageRepo/cli:debian-buster-$RELEASE_TAG_NAME">>"$outPmeFile" +docker tag "$cliBusterImage" "$prodPmeImageRepo/cli:debian-buster-$RELEASE_TAG_NAME" + +echo "Pulling CLI bullseye image '$cliBullseyeImage'" +docker pull "$cliBullseyeImage" + +echo "Retagging CLI bullseye image for $prodPmeImageRepo with 'debian-bullseye-$RELEASE_TAG_NAME'..." +echo "$prodPmeImageRepo/cli:debian-bullseye-$RELEASE_TAG_NAME">>"$outPmeFile" +docker tag "$cliBullseyeImage" "$prodPmeImageRepo/cli:debian-bullseye-$RELEASE_TAG_NAME" if [ "$sourceBranchName" == "main" ]; then echo "Retagging CLI image with '{os type}-stable'..." @@ -41,8 +49,11 @@ if [ "$sourceBranchName" == "main" ]; then docker tag "$cliImage" "$prodPmeImageRepo/cli:debian-stretch-stable" echo "$prodPmeImageRepo/cli:debian-stretch-stable">>"$outPmeFile" - docker tag "$cliBusterImage" "$prodPmeImageRepo/cli-buster:debian-buster-stable" - echo "$prodPmeImageRepo/cli-buster:debian-buster-stable">>"$outPmeFile" + docker tag "$cliBusterImage" "$prodPmeImageRepo/cli:debian-buster-stable" + echo "$prodPmeImageRepo/cli:debian-buster-stable">>"$outPmeFile" + + docker tag "$cliBullseyeImage" "$prodPmeImageRepo/cli:debian-bullseye-stable" + echo "$prodPmeImageRepo/cli:debian-bullseye-stable">>"$outPmeFile" else echo "Not creating 'stable' or 'latest' tags as source branch is not 'main'. Current branch is $sourceBranchName" fi