зеркало из https://github.com/microsoft/Oryx.git
Remove debian flavor specific repo for cli (#1847)
* Removed debian specific repo for cli * Added tests for cli-bullseye * Added cli-bullseye * Removed CliBullseyeRepository reference * Fix validation failures * Fix validation failures * Fixed syntax error * Fixed syntax error * Fix cli failures * Fixed cli image name for stretch * Added libssl1.0.2 * Remove libssl1.0.2 * Removed extra line * Fix validation failures * Fix validation failures
This commit is contained in:
Родитель
be0d21db81
Коммит
709e3808fb
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Php
|
|||
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",
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Php
|
|||
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",
|
||||
|
|
|
@ -79,7 +79,17 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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(
|
||||
|
|
|
@ -65,8 +65,15 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
[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}";
|
||||
|
|
|
@ -47,7 +47,14 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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)
|
||||
|
|
|
@ -54,7 +54,14 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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)
|
||||
|
|
|
@ -54,7 +54,14 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
[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)
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Theory, Trait("category", "cli-buster")]
|
||||
[InlineData(ImageTestHelperConstants.CliBusterRepository)]
|
||||
[InlineData(ImageTestHelperConstants.CliBusterTag)]
|
||||
public void JavaSampleAppsTestsCliBuster(string imageTag)
|
||||
{
|
||||
BuildsMavenArcheTypeSample(imageTag);
|
||||
|
@ -53,6 +53,16 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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
|
||||
|
|
|
@ -54,9 +54,22 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
{
|
||||
var data = new TheoryData<string, string>();
|
||||
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<string, string> ImageNameDataCliBullseye
|
||||
{
|
||||
get
|
||||
{
|
||||
var data = new TheoryData<string, string>();
|
||||
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 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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
|
||||
|
|
|
@ -60,7 +60,14 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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)
|
||||
|
|
|
@ -75,16 +75,36 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
{
|
||||
var data = new TheoryData<string, string, string>();
|
||||
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<string, string, string> VersionAndImageNameDataCliBullseye
|
||||
{
|
||||
get
|
||||
{
|
||||
var data = new TheoryData<string, string, string>();
|
||||
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 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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,
|
||||
|
|
|
@ -104,11 +104,18 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[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
|
||||
|
|
|
@ -68,7 +68,14 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
[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]
|
||||
|
|
|
@ -89,7 +89,14 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
[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]
|
||||
|
|
|
@ -64,7 +64,14 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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(
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[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 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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)]
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Theory, Trait("category", "cli-buster")]
|
||||
[InlineData(ImageTestHelperConstants.CliBusterRepository)]
|
||||
[InlineData(ImageTestHelperConstants.CliBusterTag)]
|
||||
public void PipelineTestInvocationCliBuster(string imageTag)
|
||||
{
|
||||
var imageTestHelper = new ImageTestHelper();
|
||||
|
@ -63,6 +63,17 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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:
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
}
|
||||
|
||||
[Theory, Trait("category", "cli-buster")]
|
||||
[InlineData(ImageTestHelperConstants.CliBusterRepository)]
|
||||
[InlineData(ImageTestHelperConstants.CliBusterTag)]
|
||||
public void PipelineTestInvocationCliBuster(string imageTag)
|
||||
{
|
||||
var imageTestHelper = new ImageTestHelper();
|
||||
|
@ -60,6 +60,16 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
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()
|
||||
{
|
||||
|
|
|
@ -51,9 +51,16 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
[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();
|
||||
|
|
|
@ -46,9 +46,9 @@ namespace Microsoft.Oryx.Tests.Common
|
|||
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 @@ namespace Microsoft.Oryx.Tests.Common
|
|||
{
|
||||
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 @@ namespace Microsoft.Oryx.Tests.Common
|
|||
public string GetCliImage(string debianFlavor = null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(debianFlavor)
|
||||
&& string.Equals(debianFlavor.ToLower(), _cliBusterRepository))
|
||||
&& string.Equals(debianFlavor.ToLower(), _cliBusterTag))
|
||||
{
|
||||
return $"{_repoPrefix}/{_cliBusterRepository}:{_cliBusterTag}{_tagSuffix}";
|
||||
return $"{_repoPrefix}/{_cliRepository}:{_cliBusterTag}{_tagSuffix}";
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(debianFlavor) && string.Equals(debianFlavor.ToLower(), _cliBullseyeTag))
|
||||
{
|
||||
return $"{_repoPrefix}/{_cliRepository}:{_cliBullseyeTag}{_tagSuffix}";
|
||||
}
|
||||
|
||||
return $"{_repoPrefix}/{_cliRepository}:{_cliStretchTag}{_tagSuffix}";
|
||||
|
@ -516,9 +524,9 @@ namespace Microsoft.Oryx.Tests.Common
|
|||
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";
|
||||
|
|
|
@ -18,7 +18,8 @@ namespace Microsoft.Oryx.Tests.Common
|
|||
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";
|
||||
|
||||
|
|
|
@ -35,6 +35,9 @@ parameters:
|
|||
-
|
||||
key: CliBuster
|
||||
value: cli-buster
|
||||
-
|
||||
key: CliBullseye
|
||||
value: cli-bullseye
|
||||
-
|
||||
key: Buildpack
|
||||
value: buildpack
|
||||
|
|
|
@ -33,6 +33,9 @@ parameters:
|
|||
-
|
||||
key: CliBuster
|
||||
value: cli-buster
|
||||
-
|
||||
key: CliBullseye
|
||||
value: cli-bullseye
|
||||
-
|
||||
key: Buildpack
|
||||
value: buildpack
|
||||
|
|
|
@ -33,6 +33,9 @@ parameters:
|
|||
-
|
||||
key: CliBuster
|
||||
value: cli-buster
|
||||
-
|
||||
key: CliBullseye
|
||||
value: cli-bullseye
|
||||
-
|
||||
key: Buildpack
|
||||
value: buildpack
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче