зеркало из https://github.com/microsoft/Oryx.git
Pauld/1597308 parameterize pipelines (#1534)
* add ability to pass in sdk base url as build arg * parameterize storage account that platform binaries job uploads to * added environment variable to control the storage account we use for testing * update runtime and build image building so that it respects the passed in sdk storage account * add some more parameterization to pipelines to allow for configurable storage accounts * validation pipeline fix * fix validation * pass in parameter as variable * add appsvc constant * pass in parameters correctly * make integration test use testing storage account, and add some versions that are missing * allow platform binaries to be configured for different storage accounts * add env var to integration testing * removed added versions to build * pr feedback: specify storage account name, fix some missing parameters, better logs * make a dotnetcore 3.1 test use the testing storage account to pull SDKs
This commit is contained in:
Родитель
a2a3bff22e
Коммит
a93a1521c7
|
@ -2,6 +2,7 @@
|
|||
|
||||
ENABLE_DYNAMIC_INSTALL_KEY='ENABLE_DYNAMIC_INSTALL'
|
||||
SDK_STORAGE_BASE_URL_KEY_NAME='ORYX_SDK_STORAGE_BASE_URL'
|
||||
TESTING_SDK_STORAGE_URL_KEY_NAME='ORYX_TEST_SDK_STORAGE_URL'
|
||||
DEV_SDK_STORAGE_BASE_URL='https://oryxsdksdev.blob.core.windows.net'
|
||||
SANDBOX_SDK_STORAGE_BASE_URL='https://oryxsdkssandbox.blob.core.windows.net'
|
||||
PROD_SDK_STORAGE_BASE_URL='https://oryxsdksprod.blob.core.windows.net'
|
||||
|
|
|
@ -41,6 +41,10 @@ while (( "$#" )); do
|
|||
imageTypeToBuild=$2
|
||||
shift 2
|
||||
;;
|
||||
-s|--sdk-storage-account-url)
|
||||
sdkStorageAccountUrl=$2
|
||||
shift 2
|
||||
;;
|
||||
--) # end argument parsing
|
||||
shift
|
||||
break
|
||||
|
@ -61,6 +65,13 @@ eval set -- "$PARAMS"
|
|||
echo
|
||||
echo "Image type to build is set to: $imageTypeToBuild"
|
||||
|
||||
if [ -z "$sdkStorageAccountUrl" ]; then
|
||||
sdkStorageAccountUrl=$PROD_SDK_CDN_STORAGE_BASE_URL
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "SDK storage account url set to: $sdkStorageAccountUrl"
|
||||
|
||||
declare -r supportFilesImageName="oryxdevmcr.azurecr.io/private/oryx/support-files-image-for-build"
|
||||
|
||||
function BuildAndTagStage()
|
||||
|
@ -192,7 +203,7 @@ function buildGitHubActionsImage() {
|
|||
echo "-------------Creating build image for GitHub Actions-------------------"
|
||||
docker build -t $builtImageName \
|
||||
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
|
||||
--build-arg DEBIAN_FLAVOR=$debianFlavor \
|
||||
--label com.microsoft.oryx="$labelContent" \
|
||||
-f "$BUILD_IMAGES_GITHUB_ACTIONS_DOCKERFILE" \
|
||||
|
@ -285,7 +296,7 @@ function buildLtsVersionsImage() {
|
|||
echo "-------------Creating lts versions build image-------------------"
|
||||
docker build -t $builtImageName \
|
||||
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
|
||||
--label com.microsoft.oryx="$labelContent" \
|
||||
-f "$ltsBuildImageDockerFile" \
|
||||
.
|
||||
|
@ -350,7 +361,7 @@ function buildVsoFocalImage() {
|
|||
local builtImageName="$ACR_BUILD_VSO_FOCAL_IMAGE_NAME"
|
||||
docker build -t $builtImageName \
|
||||
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
|
||||
--label com.microsoft.oryx="$labelContent" \
|
||||
-f "$BUILD_IMAGES_VSO_FOCAL_DOCKERFILE" \
|
||||
.
|
||||
|
@ -388,7 +399,7 @@ function buildCliImage() {
|
|||
echo "-------------Creating CLI image-------------------"
|
||||
docker build -t $builtImageName \
|
||||
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
|
||||
--build-arg DEBIAN_FLAVOR=$debianFlavor \
|
||||
--label com.microsoft.oryx="$labelContent" \
|
||||
-f "$BUILD_IMAGES_CLI_DOCKERFILE" \
|
||||
|
@ -427,7 +438,7 @@ function buildFullImage() {
|
|||
echo "-------------Creating full image-------------------"
|
||||
docker build -t $builtImageName \
|
||||
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
|
||||
--build-arg DEBIAN_FLAVOR=$debianFlavor \
|
||||
--label com.microsoft.oryx="$labelContent" \
|
||||
-f "$BUILD_IMAGES_FULL_DOCKERFILE" \
|
||||
|
|
|
@ -10,6 +10,7 @@ declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
|
|||
|
||||
PLATFORM_TO_BUILD=$1
|
||||
DEBIAN_FLAVOR_TO_BUILD=$2
|
||||
SDK_STORAGE_ACCOUNT_URL=$3
|
||||
platformsDir="$REPO_DIR/platforms"
|
||||
|
||||
# TODO: find a better place for chmod
|
||||
|
@ -17,28 +18,28 @@ chmod +x $platformsDir/golang/getGolangSdk.sh
|
|||
|
||||
case $PLATFORM_TO_BUILD in
|
||||
'dotnet')
|
||||
"$platformsDir/dotnet/getDotNetSdk.sh" $DEBIAN_FLAVOR_TO_BUILD
|
||||
"$platformsDir/dotnet/getDotNetSdk.sh" $DEBIAN_FLAVOR_TO_BUILD $SDK_STORAGE_ACCOUNT_URL
|
||||
;;
|
||||
'python')
|
||||
"$platformsDir/python/buildPython.sh" $DEBIAN_FLAVOR_TO_BUILD
|
||||
"$platformsDir/python/buildPython.sh" $DEBIAN_FLAVOR_TO_BUILD $SDK_STORAGE_ACCOUNT_URL
|
||||
;;
|
||||
'php')
|
||||
"$platformsDir/php/buildPhp.sh" $DEBIAN_FLAVOR_TO_BUILD
|
||||
"$platformsDir/php/buildPhp.sh" $DEBIAN_FLAVOR_TO_BUILD $SDK_STORAGE_ACCOUNT_URL
|
||||
;;
|
||||
'nodejs')
|
||||
"$platformsDir/nodejs/getNode.sh" $DEBIAN_FLAVOR_TO_BUILD
|
||||
"$platformsDir/nodejs/getNode.sh" $DEBIAN_FLAVOR_TO_BUILD $SDK_STORAGE_ACCOUNT_URL
|
||||
;;
|
||||
'golang')
|
||||
"$platformsDir/golang/getGolangSdk.sh" $DEBIAN_FLAVOR_TO_BUILD
|
||||
"$platformsDir/golang/getGolangSdk.sh" $DEBIAN_FLAVOR_TO_BUILD $SDK_STORAGE_ACCOUNT_URL
|
||||
;;
|
||||
'ruby')
|
||||
"$platformsDir/ruby/buildRuby.sh" $DEBIAN_FLAVOR_TO_BUILD
|
||||
"$platformsDir/ruby/buildRuby.sh" $DEBIAN_FLAVOR_TO_BUILD $SDK_STORAGE_ACCOUNT_URL
|
||||
;;
|
||||
'java')
|
||||
"$platformsDir/java/getJavaSdk.sh" $DEBIAN_FLAVOR_TO_BUILD
|
||||
"$platformsDir/java/getJavaSdk.sh" $DEBIAN_FLAVOR_TO_BUILD $SDK_STORAGE_ACCOUNT_URL
|
||||
;;
|
||||
'maven')
|
||||
"$platformsDir/java/maven/getMaven.sh" $DEBIAN_FLAVOR_TO_BUILD
|
||||
"$platformsDir/java/maven/getMaven.sh" $DEBIAN_FLAVOR_TO_BUILD $SDK_STORAGE_ACCOUNT_URL
|
||||
;;
|
||||
*) echo "Unknown image directory";;
|
||||
esac
|
|
@ -14,6 +14,37 @@ source $REPO_DIR/build/__variables.sh
|
|||
source $REPO_DIR/build/__functions.sh
|
||||
source $REPO_DIR/build/__sdkStorageConstants.sh
|
||||
|
||||
# https://medium.com/@Drew_Stokes/bash-argument-parsing-54f3b81a6a8f
|
||||
PARAMS=""
|
||||
while (( "$#" )); do
|
||||
case "$1" in
|
||||
-s|--sdk-storage-account-url)
|
||||
sdkStorageAccountUrl=$2
|
||||
shift 2
|
||||
;;
|
||||
--) # end argument parsing
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*|--*=) # unsupported flags
|
||||
echo "Error: Unsupported flag $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
*) # preserve positional arguments
|
||||
PARAMS="$PARAMS $1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# set positional arguments in their proper place
|
||||
eval set -- "$PARAMS"
|
||||
|
||||
if [ -z "$sdkStorageAccountUrl" ]; then
|
||||
sdkStorageAccountUrl=$PROD_SDK_CDN_STORAGE_BASE_URL
|
||||
fi
|
||||
echo
|
||||
echo "SDK storage account url set to: $sdkStorageAccountUrl"
|
||||
|
||||
runtimeImagesSourceDir="$RUNTIME_IMAGES_SRC_DIR"
|
||||
runtimeSubDir=""
|
||||
runtimeImageDebianFlavor="buster"
|
||||
|
@ -110,7 +141,7 @@ for dockerFile in $dockerFiles; do
|
|||
-t $localImageTagName \
|
||||
--build-arg AI_KEY=$APPLICATION_INSIGHTS_INSTRUMENTATION_KEY \
|
||||
--build-arg SDK_STORAGE_ENV_NAME=$SDK_STORAGE_BASE_URL_KEY_NAME \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$PROD_SDK_CDN_STORAGE_BASE_URL \
|
||||
--build-arg SDK_STORAGE_BASE_URL_VALUE=$sdkStorageAccountUrl \
|
||||
--build-arg DEBIAN_FLAVOR=$runtimeImageDebianFlavor \
|
||||
--build-arg USER_DOTNET_AI_VERSION=$USER_DOTNET_AI_VERSION \
|
||||
$args \
|
||||
|
|
|
@ -232,6 +232,7 @@
|
|||
bash: /bin/bash
|
||||
benv: /opt/oryx/benv
|
||||
pre-run-command-env-var-name: PRE_RUN_COMMAND
|
||||
app-svc-file-name: appsvc.yaml
|
||||
outputs:
|
||||
- type: csharp
|
||||
directory: src/BuildScriptGenerator.Common
|
||||
|
@ -281,6 +282,7 @@
|
|||
constants:
|
||||
enable-dynamic-install-key: ENABLE_DYNAMIC_INSTALL
|
||||
sdk-storage-base-url-key-name: ORYX_SDK_STORAGE_BASE_URL
|
||||
testing-sdk-storage-url-key-name: ORYX_TEST_SDK_STORAGE_URL
|
||||
dev-sdk-storage-base-url: https://oryxsdksdev.blob.core.windows.net
|
||||
sandbox-sdk-storage-base-url: https://oryxsdkssandbox.blob.core.windows.net
|
||||
prod-sdk-storage-base-url: https://oryxsdksprod.blob.core.windows.net
|
||||
|
|
|
@ -12,6 +12,13 @@ declare -r testProjectName="Oryx.BuildImage.Tests"
|
|||
|
||||
# Load all variables
|
||||
source $REPO_DIR/build/__variables.sh
|
||||
source $REPO_DIR/build/__sdkStorageConstants.sh
|
||||
|
||||
if [ -z "$ORYX_TEST_SDK_STORAGE_URL" ]; then
|
||||
echo
|
||||
echo "Setting environment variable 'ORYX_TEST_SDK_STORAGE_URL' to default value '$DEV_SDK_STORAGE_BASE_URL' for build image tests."
|
||||
export ORYX_TEST_SDK_STORAGE_URL="$DEV_SDK_STORAGE_BASE_URL"
|
||||
fi
|
||||
|
||||
if [ "$1" = "skipBuildingImages" ]
|
||||
then
|
||||
|
@ -20,7 +27,7 @@ then
|
|||
else
|
||||
echo
|
||||
echo "Invoking script '$buildBuildImagesScript'..."
|
||||
$buildBuildImagesScript "$0"
|
||||
$buildBuildImagesScript -s $ORYX_TEST_SDK_STORAGE_URL "$0"
|
||||
fi
|
||||
|
||||
if [ -n "$2" ]
|
||||
|
|
|
@ -8,6 +8,13 @@ set -e
|
|||
|
||||
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && pwd )
|
||||
source $REPO_DIR/build/__variables.sh
|
||||
source $REPO_DIR/build/__sdkStorageConstants.sh
|
||||
|
||||
if [ -z "$ORYX_TEST_SDK_STORAGE_URL" ]; then
|
||||
echo
|
||||
echo "Setting environment variable 'ORYX_TEST_SDK_STORAGE_URL' to default value '$DEV_SDK_STORAGE_BASE_URL' for integration tests."
|
||||
export ORYX_TEST_SDK_STORAGE_URL="$DEV_SDK_STORAGE_BASE_URL"
|
||||
fi
|
||||
|
||||
# When this script is run in CI agent these environment variables are already set
|
||||
if [ -z "$SQLSERVER_DATABASE_HOST" ]; then
|
||||
|
|
|
@ -12,6 +12,13 @@ declare -r testProjectName="Oryx.RuntimeImage.Tests"
|
|||
|
||||
# Load all variables
|
||||
source $REPO_DIR/build/__variables.sh
|
||||
source $REPO_DIR/build/__sdkStorageConstants.sh
|
||||
|
||||
if [ -z "$ORYX_TEST_SDK_STORAGE_URL" ]; then
|
||||
echo
|
||||
echo "Setting environment variable 'ORYX_TEST_SDK_STORAGE_URL' to default value '$DEV_SDK_STORAGE_BASE_URL' for runtime image tests."
|
||||
export ORYX_TEST_SDK_STORAGE_URL="$DEV_SDK_STORAGE_BASE_URL"
|
||||
fi
|
||||
|
||||
if [ "$1" = "skipBuildingImages" ]
|
||||
then
|
||||
|
@ -20,7 +27,7 @@ then
|
|||
else
|
||||
echo
|
||||
echo "Invoking script '$buildRuntimeImagesScript'..."
|
||||
$buildRuntimeImagesScript "$@"
|
||||
$buildRuntimeImagesScript -s $ORYX_TEST_SDK_STORAGE_URL "$@"
|
||||
fi
|
||||
|
||||
if [ -n "$2" ]
|
||||
|
|
|
@ -16,6 +16,25 @@
|
|||
- 3.1.419
|
||||
- 3.1.420
|
||||
- 3.1.422
|
||||
- 6.0.100-preview.1.21103.13
|
||||
- 6.0.100-preview.2.21155.3
|
||||
- 6.0.100-preview.3.21202.5
|
||||
- 6.0.100-preview.4.21255.9
|
||||
- 6.0.100-preview.5.21302.13
|
||||
- 6.0.100-preview.6.21355.2
|
||||
- 6.0.100-preview.7.21379.14
|
||||
- 6.0.100-rc.1.21458.32
|
||||
- 6.0.100-rc.2.21505.57
|
||||
- 6.0.100-rtm.21524.1
|
||||
- 6.0.100
|
||||
- 6.0.201
|
||||
- 6.0.300
|
||||
- 6.0.301
|
||||
- 6.0.400
|
||||
- 7.0.100-preview.1.22110.4
|
||||
- 7.0.100-preview.5.22307.18
|
||||
- 7.0.100-preview.6.22352.1
|
||||
- 7.0.100-preview.7.22377.5
|
||||
|
||||
### buster
|
||||
|
||||
|
@ -174,7 +193,6 @@
|
|||
- 3.1.417
|
||||
- 3.1.419
|
||||
- 3.1.420
|
||||
- 3.1.422
|
||||
- 5.0.100-preview.1.20155.7
|
||||
- 5.0.100-preview.2.20176.6
|
||||
- 5.0.100-preview.3.20216.6
|
||||
|
@ -211,7 +229,6 @@
|
|||
- 6.0.201
|
||||
- 6.0.300
|
||||
- 6.0.301
|
||||
- 6.0.400
|
||||
- 7.0.100-preview.1.22110.4
|
||||
- 7.0.100-preview.5.22307.18
|
||||
- 7.0.100-preview.6.22352.1
|
||||
|
@ -358,6 +375,14 @@
|
|||
|
||||
### bullseye
|
||||
|
||||
- 12.19.0
|
||||
- 12.20.0
|
||||
- 12.21.0
|
||||
- 12.22.0
|
||||
- 12.22.4
|
||||
- 12.22.6
|
||||
- 12.22.9
|
||||
- 12.22.11
|
||||
- 14.15.0
|
||||
- 14.15.1
|
||||
- 14.16.0
|
||||
|
@ -844,6 +869,9 @@
|
|||
- 3.7.12
|
||||
- 3.8.6
|
||||
- 3.8.12
|
||||
- 3.9.0
|
||||
- 3.9.1rc1
|
||||
- 3.9.7
|
||||
- 3.10.0a2
|
||||
- 3.10.0
|
||||
- 3.10.4
|
||||
|
@ -925,6 +953,13 @@
|
|||
|
||||
### bullseye
|
||||
|
||||
- 2.5.8
|
||||
- 2.6.6
|
||||
- 2.7.1
|
||||
- 2.7.2
|
||||
- 3.0.0
|
||||
- 3.0.3
|
||||
- 3.1.1
|
||||
|
||||
### buster
|
||||
|
||||
|
|
|
@ -11,12 +11,13 @@ function downloadFileAndVerifyChecksum() {
|
|||
local version="$2"
|
||||
local downloadedFileName="$3"
|
||||
local downloadableFileName="$3"
|
||||
local sdkStorageAccountUrl="$4"
|
||||
local headersFile="/tmp/headers.txt"
|
||||
|
||||
echo "Downloading $platformName version '$version'..."
|
||||
echo "Downloading $platformName version '$version' from '$sdkStorageAccountUrl'..."
|
||||
request="curl
|
||||
-D $headersFile
|
||||
-SL $DEV_SDK_STORAGE_BASE_URL/$platformName/$downloadableFileName
|
||||
-SL $sdkStorageAccountUrl/$platformName/$downloadableFileName
|
||||
--output $downloadedFileName"
|
||||
$__CURRENT_DIR/retry.sh "$request"
|
||||
# Use all lowercase letters to find the header and it's value
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
ENABLE_DYNAMIC_INSTALL_KEY='ENABLE_DYNAMIC_INSTALL'
|
||||
SDK_STORAGE_BASE_URL_KEY_NAME='ORYX_SDK_STORAGE_BASE_URL'
|
||||
TESTING_SDK_STORAGE_URL_KEY_NAME='ORYX_TEST_SDK_STORAGE_URL'
|
||||
DEV_SDK_STORAGE_BASE_URL='https://oryxsdksdev.blob.core.windows.net'
|
||||
SANDBOX_SDK_STORAGE_BASE_URL='https://oryxsdkssandbox.blob.core.windows.net'
|
||||
PROD_SDK_STORAGE_BASE_URL='https://oryxsdksprod.blob.core.windows.net'
|
||||
|
|
|
@ -3,12 +3,13 @@ ARG DEBIAN_FLAVOR
|
|||
# Use the curl flavor of buildpack-deps as the base image, which is lighter than the standard flavor; more information here: https://hub.docker.com/_/buildpack-deps
|
||||
FROM buildpack-deps:${DEBIAN_FLAVOR}-curl as main
|
||||
ARG DEBIAN_FLAVOR
|
||||
ARG SDK_STORAGE_BASE_URL_VALUE="https://oryx-cdn.microsoft.io"
|
||||
ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
|
||||
|
||||
COPY --from=oryxdevmcr.azurecr.io/private/oryx/buildscriptgenerator /opt/buildscriptgen/ /opt/buildscriptgen/
|
||||
COPY --from=oryxdevmcr.azurecr.io/private/oryx/support-files-image-for-build /tmp/oryx/ /opt/tmp
|
||||
|
||||
ENV ORYX_SDK_STORAGE_BASE_URL="https://oryx-cdn.microsoft.io" \
|
||||
ENV ORYX_SDK_STORAGE_BASE_URL=${SDK_STORAGE_BASE_URL_VALUE} \
|
||||
ENABLE_DYNAMIC_INSTALL="true" \
|
||||
PATH="/usr/local/go/bin:/opt/python/latest/bin:/opt/oryx:/opt/yarn/stable/bin:/opt/hugo/lts:$PATH" \
|
||||
DYNAMIC_INSTALL_ROOT_DIR="/opt" \
|
||||
|
|
|
@ -20,7 +20,9 @@ RUN ./build.sh golang /opt/startupcmdgen/golang
|
|||
### oryx build image
|
||||
FROM buildpack-deps:${DEBIAN_FLAVOR}-curl
|
||||
ARG DEBIAN_FLAVOR
|
||||
ARG SDK_STORAGE_BASE_URL_VALUE="https://oryx-cdn.microsoft.io"
|
||||
ENV DEBIAN_FLAVOR=$DEBIAN_FLAVOR
|
||||
ENV ORYX_SDK_STORAGE_BASE_URL=${SDK_STORAGE_BASE_URL_VALUE}
|
||||
|
||||
# docker multi-stage builds
|
||||
COPY --from=oryxdevmcr.azurecr.io/private/oryx/support-files-image-for-build /tmp/oryx/ /opt/tmp
|
||||
|
@ -83,6 +85,5 @@ RUN set -ex \
|
|||
# enables custom logging
|
||||
&& cp -f $imagesDir/build/logger.sh /opt/oryx/logger
|
||||
|
||||
ENV ORYX_SDK_STORAGE_BASE_URL="https://oryx-cdn.microsoft.io"
|
||||
ENV ENABLE_DYNAMIC_INSTALL="true"
|
||||
ENV PATH="$PATH:/opt/oryx"
|
|
@ -9,8 +9,13 @@ set -ex
|
|||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
source $CURRENT_DIR/../__common.sh
|
||||
|
||||
sdkStorageAccountUrl="$ORYX_SDK_STORAGE_BASE_URL"
|
||||
if [ -z "$sdkStorageAccountUrl" ]; then
|
||||
sdkStorageAccountUrl=$DEV_SDK_STORAGE_BASE_URL
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Installing .NET Core SDK $DOTNET_SDK_VER ..."
|
||||
echo "Installing .NET Core SDK $DOTNET_SDK_VER from $sdkStorageAccountUrl ..."
|
||||
echo
|
||||
|
||||
debianFlavor="$DEBIAN_FLAVOR"
|
||||
|
@ -27,7 +32,7 @@ else
|
|||
fileName="dotnet-$debianFlavor-$DOTNET_SDK_VER.tar.gz"
|
||||
fi
|
||||
|
||||
downloadFileAndVerifyChecksum dotnet $DOTNET_SDK_VER $fileName
|
||||
downloadFileAndVerifyChecksum dotnet $DOTNET_SDK_VER $fileName $sdkStorageAccountUrl
|
||||
|
||||
globalJsonContent="{\"sdk\":{\"version\":\"$DOTNET_SDK_VER\"}}"
|
||||
|
||||
|
|
|
@ -44,6 +44,11 @@ VERSION="$2"
|
|||
debianFlavor=$DEBIAN_FLAVOR
|
||||
fileName="$PLATFORM_NAME-$VERSION.tar.gz"
|
||||
|
||||
sdkStorageAccountUrl="$ORYX_SDK_STORAGE_BASE_URL"
|
||||
if [ -z "$sdkStorageAccountUrl" ]; then
|
||||
sdkStorageAccountUrl=$DEV_SDK_STORAGE_BASE_URL
|
||||
fi
|
||||
|
||||
if [ -z "$debianFlavor" ] || [ "$debianFlavor" == "stretch" ]; then
|
||||
# Use default sdk file name
|
||||
fileName="$PLATFORM_NAME-$VERSION.tar.gz"
|
||||
|
@ -58,7 +63,7 @@ if [ -z "$targetDir" ]; then
|
|||
fi
|
||||
|
||||
START_TIME=$SECONDS
|
||||
downloadFileAndVerifyChecksum $PLATFORM_NAME $VERSION $fileName
|
||||
downloadFileAndVerifyChecksum $PLATFORM_NAME $VERSION $fileName $sdkStorageAccountUrl
|
||||
ELAPSED_TIME=$(($SECONDS - $START_TIME))
|
||||
echo "Downloaded and verified checksum in $ELAPSED_TIME sec(s)."
|
||||
|
||||
|
|
|
@ -16,8 +16,9 @@ imageName="oryx/platformsdk"
|
|||
blobExists() {
|
||||
local containerName="$1"
|
||||
local blobName="$2"
|
||||
local sdkStorageAccountUrl="$3"
|
||||
local exitCode=1
|
||||
curl -I $DEV_SDK_STORAGE_BASE_URL/$containerName/$blobName 2> /tmp/curlError.txt 1> /tmp/curlOut.txt
|
||||
curl -I $sdkStorageAccountUrl/$containerName/$blobName 2> /tmp/curlError.txt 1> /tmp/curlOut.txt
|
||||
grep "HTTP/1.1 200 OK" /tmp/curlOut.txt &> /dev/null
|
||||
exitCode=$?
|
||||
rm -f /tmp/curlOut.txt
|
||||
|
@ -32,9 +33,10 @@ blobExists() {
|
|||
shouldBuildSdk() {
|
||||
local containerName="$1"
|
||||
local blobName="$2"
|
||||
local sdkStorageAccountUrl="$3"
|
||||
|
||||
# return whatever exit code the following returns
|
||||
blobExists $containerName $blobName
|
||||
blobExists $containerName $blobName $sdkStorageAccountUrl
|
||||
exitCode=$?
|
||||
if [ "$exitCode" == 0 ]; then
|
||||
return 1
|
||||
|
|
|
@ -13,6 +13,7 @@ source $REPO_DIR/platforms/__common.sh
|
|||
dotNetPlatformDir="$REPO_DIR/platforms/dotnet"
|
||||
targetDir="$volumeHostDir/dotnet"
|
||||
debianFlavor="$1"
|
||||
sdkStorageAccountUrl="$2"
|
||||
mkdir -p "$targetDir"
|
||||
|
||||
getDotNetCoreSdk() {
|
||||
|
@ -39,7 +40,7 @@ getDotNetCoreSdk() {
|
|||
runtimeVersionMetadataName="$DOTNET_RUNTIME_VERSION_METADATA_NAME"
|
||||
fi
|
||||
|
||||
if shouldBuildSdk dotnet $downloadedFile || shouldOverwriteSdk || shouldOverwritePlatformSdk dotnet; then
|
||||
if shouldBuildSdk dotnet $downloadedFile $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk dotnet; then
|
||||
echo "Downloading .NET Core SDK version '$sdkVersion'..."
|
||||
echo
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ source $REPO_DIR/platforms/__common.sh
|
|||
golangPlatformDir="$REPO_DIR/platforms/golang"
|
||||
targetDir="$volumeHostDir/golang"
|
||||
debianFlavor="$1"
|
||||
sdkStorageAccountUrl="$2"
|
||||
mkdir -p "$targetDir"
|
||||
|
||||
getGolangSdk() {
|
||||
|
@ -37,7 +38,7 @@ getGolangSdk() {
|
|||
sdkVersionMetadataName="$SDK_VERSION_METADATA_NAME"
|
||||
fi
|
||||
|
||||
if shouldBuildSdk golang $downloadedFile || shouldOverwriteSdk || shouldOverwritePlatformSdk golang; then
|
||||
if shouldBuildSdk golang $downloadedFile $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk golang; then
|
||||
echo "Downloading golang SDK version '$sdkVersion'..."
|
||||
echo
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ source $REPO_DIR/platforms/__common.sh
|
|||
javaPlatformDir="$REPO_DIR/platforms/java"
|
||||
hostJavaArtifactsDir="$volumeHostDir/java"
|
||||
debianFlavor="$1"
|
||||
sdkStorageAccountUrl="$2"
|
||||
mkdir -p "$hostJavaArtifactsDir"
|
||||
|
||||
rm -rf /tmp/java
|
||||
|
@ -102,7 +103,7 @@ downloadJavaSdk()
|
|||
return
|
||||
fi
|
||||
|
||||
if shouldBuildSdk java $tarFileName || shouldOverwriteSdk || shouldOverwritePlatformSdk java; then
|
||||
if shouldBuildSdk java $tarFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk java; then
|
||||
local baseUrl="https://github.com/AdoptOpenJDK/openjdk${majorVersion}-binaries/releases/download"
|
||||
if [ "$majorVersion" == "10" ] && [ "$JDK_BUILD_NUMBER" == "13" ]; then
|
||||
url="$baseUrl/jdk-10.0.2%2B13.1/OpenJDK10U-jdk_x64_linux_hotspot_10.0.2_13.tar.gz"
|
||||
|
|
|
@ -7,6 +7,7 @@ source $REPO_DIR/platforms/__common.sh
|
|||
mavenPlatformDir="$REPO_DIR/platforms/java/maven"
|
||||
hostMavenArtifactsDir="$volumeHostDir/maven"
|
||||
debianFlavor="$1"
|
||||
sdkStorageAccountUrl="$2"
|
||||
mkdir -p "$hostMavenArtifactsDir"
|
||||
|
||||
rm -rf /tmp/maven
|
||||
|
@ -34,7 +35,7 @@ downloadMavenBinary()
|
|||
sdkVersionMetadataName="$SDK_VERSION_METADATA_NAME"
|
||||
fi
|
||||
|
||||
if shouldBuildSdk maven $tarFileName || shouldOverwriteSdk || shouldOverwritePlatformSdk maven; then
|
||||
if shouldBuildSdk maven $tarFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk maven; then
|
||||
curl -L "$baseUrl/$version/binaries/apache-maven-$version-bin.tar.gz" -o $tarFileName
|
||||
rm -rf extracted
|
||||
mkdir -p extracted
|
||||
|
|
|
@ -13,6 +13,7 @@ source $REPO_DIR/platforms/__common.sh
|
|||
nodePlatformDir="$REPO_DIR/platforms/nodejs"
|
||||
hostNodeArtifactsDir="$volumeHostDir/nodejs"
|
||||
debianFlavor="$1"
|
||||
sdkStorageAccountUrl="$2"
|
||||
mkdir -p "$hostNodeArtifactsDir"
|
||||
|
||||
builtNodeImage=false
|
||||
|
@ -36,7 +37,7 @@ getNode() {
|
|||
sdkVersionMetadataName="$SDK_VERSION_METADATA_NAME"
|
||||
fi
|
||||
|
||||
if shouldBuildSdk nodejs $tarFileName || shouldOverwriteSdk || shouldOverwritePlatformSdk nodejs; then
|
||||
if shouldBuildSdk nodejs $tarFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk nodejs; then
|
||||
echo "Getting Node version '$version'..."
|
||||
echo
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && cd .. && pwd )
|
|||
source $REPO_DIR/platforms/__common.sh
|
||||
source $REPO_DIR/build/__phpVersions.sh
|
||||
debianFlavor=$1
|
||||
sdkStorageAccountUrl="$2"
|
||||
phpPlatformDir="$REPO_DIR/platforms/php"
|
||||
|
||||
builtPhpPrereqs=false
|
||||
|
@ -53,7 +54,7 @@ buildPhp() {
|
|||
|
||||
cp "$phpPlatformDir/versions/$debianFlavor/defaultVersion.txt" "$targetDir/defaultVersion.$debianFlavor.txt"
|
||||
|
||||
if shouldBuildSdk php $phpSdkFileName || shouldOverwriteSdk || shouldOverwritePlatformSdk php; then
|
||||
if shouldBuildSdk php $phpSdkFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk php; then
|
||||
if ! $builtPhpPrereqs; then
|
||||
buildPhpPrereqsImage
|
||||
fi
|
||||
|
@ -101,7 +102,7 @@ buildPhpComposer() {
|
|||
sdkVersionMetadataName="$SDK_VERSION_METADATA_NAME"
|
||||
fi
|
||||
|
||||
if shouldBuildSdk php-composer $composerSdkFileName || shouldOverwriteSdk || shouldOverwritePlatformSdk php-composer; then
|
||||
if shouldBuildSdk php-composer $composerSdkFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk php-composer; then
|
||||
if ! $builtPhpPrereqs; then
|
||||
buildPhpPrereqsImage
|
||||
fi
|
||||
|
|
|
@ -14,6 +14,7 @@ source $REPO_DIR/build/__pythonVersions.sh
|
|||
pythonPlatformDir="$REPO_DIR/platforms/python"
|
||||
targetDir="$volumeHostDir/python"
|
||||
debianFlavor=$1
|
||||
sdkStorageAccountUrl="$2"
|
||||
mkdir -p "$targetDir"
|
||||
|
||||
builtPythonPrereqs=false
|
||||
|
@ -74,7 +75,7 @@ buildPython() {
|
|||
sdkVersionMetadataName="$SDK_VERSION_METADATA_NAME"
|
||||
fi
|
||||
|
||||
if shouldBuildSdk python $pythonSdkFileName || shouldOverwriteSdk || shouldOverwritePlatformSdk python; then
|
||||
if shouldBuildSdk python $pythonSdkFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk python; then
|
||||
buildPythonPrereqsImage
|
||||
|
||||
echo "Building Python version '$version' in a docker image..."
|
||||
|
|
|
@ -14,6 +14,7 @@ source $REPO_DIR/build/__rubyVersions.sh
|
|||
rubyPlatformDir="$REPO_DIR/platforms/ruby"
|
||||
targetDir="$volumeHostDir/ruby"
|
||||
debianFlavor=$1
|
||||
sdkStorageAccountUrl="$2"
|
||||
mkdir -p "$targetDir"
|
||||
|
||||
builtRubyPrereqs=false
|
||||
|
@ -50,7 +51,7 @@ buildRuby() {
|
|||
sdkVersionMetadataName="$SDK_VERSION_METADATA_NAME"
|
||||
fi
|
||||
|
||||
if shouldBuildSdk ruby $rubySdkFileName || shouldOverwriteSdk || shouldOverwritePlatformSdk ruby; then
|
||||
if shouldBuildSdk ruby $rubySdkFileName $sdkStorageAccountUrl || shouldOverwriteSdk || shouldOverwritePlatformSdk ruby; then
|
||||
if ! $builtRubyPrereqs; then
|
||||
buildRubyPrereqsImage
|
||||
fi
|
||||
|
|
|
@ -15,5 +15,6 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Common
|
|||
public const string Bash = "/bin/bash";
|
||||
public const string Benv = "/opt/oryx/benv";
|
||||
public const string PreRunCommandEnvVarName = "PRE_RUN_COMMAND";
|
||||
public const string AppSvcFileName = "appsvc.yaml";
|
||||
}
|
||||
}
|
|
@ -6,6 +6,7 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Common
|
|||
{
|
||||
public const string EnableDynamicInstallKey = "ENABLE_DYNAMIC_INSTALL";
|
||||
public const string SdkStorageBaseUrlKeyName = "ORYX_SDK_STORAGE_BASE_URL";
|
||||
public const string TestingSdkStorageUrlKeyName = "ORYX_TEST_SDK_STORAGE_URL";
|
||||
public const string DevSdkStorageBaseUrl = "https://oryxsdksdev.blob.core.windows.net";
|
||||
public const string SandboxSdkStorageBaseUrl = "https://oryxsdkssandbox.blob.core.windows.net";
|
||||
public const string ProdSdkStorageBaseUrl = "https://oryxsdksprod.blob.core.windows.net";
|
||||
|
|
|
@ -158,11 +158,19 @@ namespace Microsoft.Oryx.BuildScriptGenerator.Common
|
|||
"exit 1; fi");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Append a command to the shell script that sets the ORYX_SDK_STORAGE_BASE_URL to the value
|
||||
/// of ORYX_TEST_SDK_STORAGE_URL if ORYX_TEST_SDK_STORAGE_URL exists in the environment that is executing this code.
|
||||
/// Otherwise, use the Oryx dev sdk storage account for testing.
|
||||
/// This allows us to change the storage account that tests use without regenerating any images.
|
||||
/// </summary>
|
||||
public ShellScriptBuilder AddDefaultTestEnvironmentVariables()
|
||||
{
|
||||
return this.SetEnvironmentVariable(
|
||||
SdkStorageConstants.SdkStorageBaseUrlKeyName,
|
||||
SdkStorageConstants.DevSdkStorageBaseUrl);
|
||||
var testStorageAccountUrl = Environment.GetEnvironmentVariable(SdkStorageConstants.TestingSdkStorageUrlKeyName);
|
||||
|
||||
return testStorageAccountUrl != null
|
||||
? this.SetEnvironmentVariable(SdkStorageConstants.SdkStorageBaseUrlKeyName, testStorageAccountUrl)
|
||||
: this.SetEnvironmentVariable(SdkStorageConstants.SdkStorageBaseUrlKeyName, SdkStorageConstants.DevSdkStorageBaseUrl);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
|
|
|
@ -4,6 +4,7 @@ package consts
|
|||
|
||||
const EnableDynamicInstallKey string = "ENABLE_DYNAMIC_INSTALL"
|
||||
const SdkStorageBaseUrlKeyName string = "ORYX_SDK_STORAGE_BASE_URL"
|
||||
const TestingSdkStorageUrlKeyName string = "ORYX_TEST_SDK_STORAGE_URL"
|
||||
const DevSdkStorageBaseUrl string = "https://oryxsdksdev.blob.core.windows.net"
|
||||
const SandboxSdkStorageBaseUrl string = "https://oryxsdkssandbox.blob.core.windows.net"
|
||||
const ProdSdkStorageBaseUrl string = "https://oryxsdksprod.blob.core.windows.net"
|
||||
|
|
|
@ -848,8 +848,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
var appDir = volume.ContainerDir;
|
||||
var appOutputDir = "/tmp/blazor-wasm-output";
|
||||
var script = new ShellScriptBuilder()
|
||||
.SetEnvironmentVariable(SdkStorageConstants.SdkStorageBaseUrlKeyName,
|
||||
SdkStorageConstants.DevSdkStorageBaseUrl)
|
||||
.AddDefaultTestEnvironmentVariables()
|
||||
.AddBuildCommand(
|
||||
$"{appDir}/MessageFunction -o {appOutputDir} --apptype functions --platform dotnet " +
|
||||
$"--platform-version {FinalStretchVersions.FinalStretchDotNetCoreApp31RunTimeVersion}")
|
||||
|
@ -1148,6 +1147,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
var appDir = volume.ContainerDir;
|
||||
var appOutputDir = "/tmp/isolatedapp-output";
|
||||
var script = new ShellScriptBuilder()
|
||||
.AddDefaultTestEnvironmentVariables()
|
||||
.AddBuildCommand($"{appDir} -o {appOutputDir}")
|
||||
.AddFileExistsCheck($"{appOutputDir}/{FilePaths.BuildManifestFileName}")
|
||||
.AddFileExistsCheck($"{appOutputDir}/{FilePaths.OsTypeFileName}")
|
||||
|
|
|
@ -30,9 +30,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
var appDir = volume.ContainerDir;
|
||||
var appOutputDir = "/tmp/app1-output";
|
||||
var script = new ShellScriptBuilder()
|
||||
.SetEnvironmentVariable(
|
||||
SdkStorageConstants.SdkStorageBaseUrlKeyName,
|
||||
SdkStorageConstants.DevSdkStorageBaseUrl)
|
||||
.AddDefaultTestEnvironmentVariables()
|
||||
.SetEnvironmentVariable(
|
||||
SettingsKeys.EnableNodeMonorepoBuild,
|
||||
true.ToString())
|
||||
|
@ -70,9 +68,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
var appOutputDir = "/tmp/app1-output";
|
||||
var commandListFile = $"{appOutputDir}/{FilePaths.BuildCommandsFileName}";
|
||||
var script = new ShellScriptBuilder()
|
||||
.SetEnvironmentVariable(
|
||||
SdkStorageConstants.SdkStorageBaseUrlKeyName,
|
||||
SdkStorageConstants.DevSdkStorageBaseUrl)
|
||||
.AddDefaultTestEnvironmentVariables()
|
||||
.SetEnvironmentVariable(
|
||||
SettingsKeys.EnableNodeMonorepoBuild,
|
||||
isMonoRepo.ToString())
|
||||
|
@ -110,9 +106,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
var appDir = volume.ContainerDir;
|
||||
var appOutputDir = "/tmp/app2-output";
|
||||
var script = new ShellScriptBuilder()
|
||||
.SetEnvironmentVariable(
|
||||
SdkStorageConstants.SdkStorageBaseUrlKeyName,
|
||||
SdkStorageConstants.DevSdkStorageBaseUrl)
|
||||
.AddDefaultTestEnvironmentVariables()
|
||||
.SetEnvironmentVariable(
|
||||
SettingsKeys.EnableNodeMonorepoBuild,
|
||||
true.ToString())
|
||||
|
|
|
@ -706,9 +706,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
Path.Combine(_hostSamplesDir, "nodejs", "node-nested-nodemodules"));
|
||||
var appDir = volume.ContainerDir;
|
||||
var script = new ShellScriptBuilder()
|
||||
.SetEnvironmentVariable(
|
||||
SdkStorageConstants.SdkStorageBaseUrlKeyName,
|
||||
SdkStorageConstants.DevSdkStorageBaseUrl)
|
||||
.AddDefaultTestEnvironmentVariables()
|
||||
.AddBuildCommand($"{appDir} --package -p {NodePlatform.PackageDirectoryPropertyKey}=another-directory")
|
||||
.AddFileExistsCheck($"{appDir}/another-directory/kudu-bug-0.0.0.tgz")
|
||||
.ToString();
|
||||
|
@ -739,9 +737,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
Path.Combine(_hostSamplesDir, "nodejs", "monorepo-lerna-yarn"));
|
||||
var appDir = volume.ContainerDir;
|
||||
var script = new ShellScriptBuilder()
|
||||
.SetEnvironmentVariable(
|
||||
SdkStorageConstants.SdkStorageBaseUrlKeyName,
|
||||
SdkStorageConstants.DevSdkStorageBaseUrl)
|
||||
.AddDefaultTestEnvironmentVariables()
|
||||
.SetEnvironmentVariable(
|
||||
SettingsKeys.EnableNodeMonorepoBuild,
|
||||
true.ToString())
|
||||
|
|
|
@ -239,9 +239,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
var appOutputDir = "/tmp/app1-output";
|
||||
var commandListFile = $"{appOutputDir}/{FilePaths.BuildCommandsFileName}";
|
||||
var script = new ShellScriptBuilder()
|
||||
.SetEnvironmentVariable(
|
||||
SdkStorageConstants.SdkStorageBaseUrlKeyName,
|
||||
SdkStorageConstants.DevSdkStorageBaseUrl)
|
||||
.AddDefaultTestEnvironmentVariables()
|
||||
.AddBuildCommand($"{appDir} -o {appOutputDir}")
|
||||
.AddFileExistsCheck($"{commandListFile}")
|
||||
.AddStringExistsInFileCheck("PlatformWithVersion=", $"{commandListFile}")
|
||||
|
|
|
@ -803,9 +803,7 @@ namespace Microsoft.Oryx.BuildImage.Tests
|
|||
var appOutputDir = "/tmp/app1-output";
|
||||
var commandListFile = $"{appOutputDir}/{buildCommandsFileName}";
|
||||
var script = new ShellScriptBuilder()
|
||||
.SetEnvironmentVariable(
|
||||
SdkStorageConstants.SdkStorageBaseUrlKeyName,
|
||||
SdkStorageConstants.DevSdkStorageBaseUrl)
|
||||
.AddDefaultTestEnvironmentVariables()
|
||||
.AddBuildCommand($"{appDir} -o {appOutputDir} --buildcommands-file {buildCommandsFileName}")
|
||||
.AddFileExistsCheck($"{commandListFile}")
|
||||
.AddStringExistsInFileCheck("PlatformWithVersion=", $"{commandListFile}")
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
using Microsoft.Oryx.BuildScriptGenerator.Common;
|
||||
using Microsoft.Oryx.Tests.Common;
|
||||
using System;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
|
||||
|
@ -17,7 +18,11 @@ namespace Oryx.Integration.Tests
|
|||
ITestOutputHelper output,
|
||||
TestTempDirTestFixture testTempDirTestFixture,
|
||||
RepoRootDirTestFixture repoRootDirTestFixture)
|
||||
: base(SdkStorageConstants.DevSdkStorageBaseUrl, output, testTempDirTestFixture, repoRootDirTestFixture)
|
||||
: base(
|
||||
Environment.GetEnvironmentVariable(SdkStorageConstants.TestingSdkStorageUrlKeyName) ?? SdkStorageConstants.DevSdkStorageBaseUrl,
|
||||
output,
|
||||
testTempDirTestFixture,
|
||||
repoRootDirTestFixture)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
variables:
|
||||
- group: Oryx
|
||||
|
||||
parameters:
|
||||
- name: destinationStorageAccountName
|
||||
displayName: Destination Storage Account Name
|
||||
type: string
|
||||
default: oryxsdksdev
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
|
@ -15,6 +21,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'dotnet'
|
||||
debianFlavor: 'bullseye'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: DotNetCore_Buster
|
||||
timeoutInMinutes: 250
|
||||
|
@ -27,6 +34,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'dotnet'
|
||||
debianFlavor: 'buster'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: DotNetCore_Stretch
|
||||
timeoutInMinutes: 250
|
||||
|
@ -39,6 +47,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'dotnet'
|
||||
debianFlavor: 'stretch'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: DotNetCore_Ubuntu
|
||||
timeoutInMinutes: 250
|
||||
|
@ -51,6 +60,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'dotnet'
|
||||
debianFlavor: 'focal-scm'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- stage: Release
|
||||
dependsOn: Build
|
||||
|
@ -64,6 +74,8 @@ stages:
|
|||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
steps:
|
||||
- template: ../templates/_platformBinariesReleaseTemplate.yml
|
||||
parameters:
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
variables:
|
||||
- group: Oryx
|
||||
|
||||
parameters:
|
||||
- name: destinationStorageAccountName
|
||||
displayName: Destination Storage Account Name
|
||||
type: string
|
||||
default: oryxsdksdev
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
|
@ -15,6 +21,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'golang'
|
||||
debianFlavor: 'bullseye'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Golang_Buster
|
||||
timeoutInMinutes: 250
|
||||
|
@ -27,6 +34,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'golang'
|
||||
debianFlavor: 'buster'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Golang_Stretch
|
||||
timeoutInMinutes: 250
|
||||
|
@ -39,6 +47,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'golang'
|
||||
debianFlavor: 'stretch'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Golang_Ubuntu
|
||||
timeoutInMinutes: 250
|
||||
|
@ -51,6 +60,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'golang'
|
||||
debianFlavor: 'focal-scm'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- stage: Release
|
||||
dependsOn: Build
|
||||
|
@ -64,6 +74,8 @@ stages:
|
|||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
steps:
|
||||
- template: ../templates/_platformBinariesReleaseTemplate.yml
|
||||
parameters:
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
variables:
|
||||
- group: Oryx
|
||||
|
||||
parameters:
|
||||
- name: destinationStorageAccountName
|
||||
displayName: Destination Storage Account Name
|
||||
type: string
|
||||
default: oryxsdksdev
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
|
@ -15,6 +21,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'java'
|
||||
debianFlavor: 'bullseye'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Java_Buster
|
||||
timeoutInMinutes: 250
|
||||
|
@ -27,6 +34,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'java'
|
||||
debianFlavor: 'buster'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Java_Stretch
|
||||
timeoutInMinutes: 250
|
||||
|
@ -39,6 +47,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'java'
|
||||
debianFlavor: 'stretch'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Java_Ubuntu
|
||||
timeoutInMinutes: 250
|
||||
|
@ -51,6 +60,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'java'
|
||||
debianFlavor: 'focal-scm'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Maven_Bullseye
|
||||
timeoutInMinutes: 250
|
||||
|
@ -63,6 +73,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'maven'
|
||||
debianFlavor: 'bullseye'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Maven_Buster
|
||||
timeoutInMinutes: 250
|
||||
|
@ -75,6 +86,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'maven'
|
||||
debianFlavor: 'buster'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Maven_Stretch
|
||||
timeoutInMinutes: 250
|
||||
|
@ -87,6 +99,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'maven'
|
||||
debianFlavor: 'stretch'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Maven_Ubuntu
|
||||
timeoutInMinutes: 250
|
||||
|
@ -99,6 +112,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'maven'
|
||||
debianFlavor: 'focal-scm'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- stage: Release
|
||||
dependsOn: Build
|
||||
|
@ -112,6 +126,8 @@ stages:
|
|||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
steps:
|
||||
- template: ../templates/_platformBinariesReleaseTemplate.yml
|
||||
parameters:
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
variables:
|
||||
- group: Oryx
|
||||
|
||||
parameters:
|
||||
- name: destinationStorageAccountName
|
||||
displayName: Destination Storage Account Name
|
||||
type: string
|
||||
default: oryxsdksdev
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
|
@ -15,6 +21,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'nodejs'
|
||||
debianFlavor: 'bullseye'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Node_Buster
|
||||
timeoutInMinutes: 250
|
||||
|
@ -27,6 +34,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'nodejs'
|
||||
debianFlavor: 'buster'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Node_Stretch
|
||||
timeoutInMinutes: 250
|
||||
|
@ -39,6 +47,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'nodejs'
|
||||
debianFlavor: 'stretch'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Node_Ubuntu
|
||||
timeoutInMinutes: 250
|
||||
|
@ -51,6 +60,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'nodejs'
|
||||
debianFlavor: 'focal-scm'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- stage: Release
|
||||
dependsOn: Build
|
||||
|
@ -64,6 +74,8 @@ stages:
|
|||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
steps:
|
||||
- template: ../templates/_platformBinariesReleaseTemplate.yml
|
||||
parameters:
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
variables:
|
||||
- group: Oryx
|
||||
|
||||
parameters:
|
||||
- name: destinationStorageAccountName
|
||||
displayName: Destination Storage Account Name
|
||||
type: string
|
||||
default: oryxsdksdev
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
|
@ -15,6 +21,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'php'
|
||||
debianFlavor: 'bullseye'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Php_Stretch_SDK
|
||||
timeoutInMinutes: 1440
|
||||
|
@ -27,6 +34,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'php'
|
||||
debianFlavor: 'stretch'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Php_Buster_SDK
|
||||
timeoutInMinutes: 1440
|
||||
|
@ -39,6 +47,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'php'
|
||||
debianFlavor: 'buster'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Php_Ubuntu_SDK
|
||||
timeoutInMinutes: 1440
|
||||
|
@ -51,6 +60,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'php'
|
||||
debianFlavor: 'focal-scm'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- stage: Release
|
||||
dependsOn: Build
|
||||
|
@ -64,6 +74,8 @@ stages:
|
|||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
steps:
|
||||
- template: ../templates/_platformBinariesReleaseTemplate.yml
|
||||
parameters:
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
variables:
|
||||
- group: Oryx
|
||||
|
||||
parameters:
|
||||
- name: destinationStorageAccountName
|
||||
displayName: Destination Storage Account Name
|
||||
type: string
|
||||
default: oryxsdksdev
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
|
@ -15,6 +21,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'python'
|
||||
debianFlavor: 'bullseye'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Python_Buster_SDK
|
||||
timeoutInMinutes: 250
|
||||
|
@ -27,6 +34,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'python'
|
||||
debianFlavor: 'buster'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Python_Stretch_SDK
|
||||
timeoutInMinutes: 250
|
||||
|
@ -39,6 +47,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'python'
|
||||
debianFlavor: 'stretch'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Python_Ubuntu_SDK
|
||||
timeoutInMinutes: 250
|
||||
|
@ -51,6 +60,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'python'
|
||||
debianFlavor: 'focal-scm'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- stage: Release
|
||||
dependsOn: Build
|
||||
|
@ -64,6 +74,8 @@ stages:
|
|||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
steps:
|
||||
- template: ../templates/_platformBinariesReleaseTemplate.yml
|
||||
parameters:
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
variables:
|
||||
- group: Oryx
|
||||
|
||||
parameters:
|
||||
- name: destinationStorageAccountName
|
||||
displayName: Destination Storage Account Name
|
||||
type: string
|
||||
default: oryxsdksdev
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
jobs:
|
||||
|
@ -15,6 +21,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'ruby'
|
||||
debianFlavor: 'bullseye'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Ruby_Buster
|
||||
timeoutInMinutes: 250
|
||||
|
@ -27,6 +34,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'ruby'
|
||||
debianFlavor: 'buster'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Ruby_Stretch
|
||||
timeoutInMinutes: 250
|
||||
|
@ -39,6 +47,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'ruby'
|
||||
debianFlavor: 'stretch'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- job: Ruby_Ubuntu
|
||||
timeoutInMinutes: 250
|
||||
|
@ -51,6 +60,7 @@ stages:
|
|||
parameters:
|
||||
platformName: 'ruby'
|
||||
debianFlavor: 'focal-scm'
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
- stage: Release
|
||||
dependsOn: Build
|
||||
|
@ -64,6 +74,8 @@ stages:
|
|||
- ImageOverride -equals AzurePipelinesUbuntu20.04compliant
|
||||
steps:
|
||||
- template: ../templates/_platformBinariesReleaseTemplate.yml
|
||||
parameters:
|
||||
destinationSdkStorageAccountName: '${{ parameters.destinationStorageAccountName }}'
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
parameters:
|
||||
- name: storageAccountUrl
|
||||
displayName: SDK storage account URL for production images and testing
|
||||
type: string
|
||||
default: https://oryx-cdn.microsoft.io
|
||||
values:
|
||||
- https://oryx-cdn.microsoft.io
|
||||
- name: buildImages
|
||||
type: object
|
||||
default:
|
||||
|
@ -134,6 +140,7 @@ stages:
|
|||
echo "##vso[task.setvariable variable=PushBuildImages;]true"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]true"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
|
||||
- template: templates/_setReleaseTag.yml
|
||||
|
@ -164,6 +171,7 @@ stages:
|
|||
echo "##vso[task.setvariable variable=PushRuntimeImages;]true"
|
||||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]true"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
|
||||
- template: templates/_setReleaseTag.yml
|
||||
|
@ -171,6 +179,8 @@ stages:
|
|||
- template: templates/_buildTemplate.yml
|
||||
|
||||
- template: templates/_integrationJobTemplate.yml
|
||||
parameters:
|
||||
storageAccountUrl: ${{ parameters.storageAccountUrl }}
|
||||
|
||||
- stage: Release
|
||||
displayName: Release Stage
|
||||
|
|
|
@ -2,13 +2,10 @@ variables:
|
|||
- group: Oryx
|
||||
|
||||
parameters:
|
||||
- name: destinationStorageAccount
|
||||
displayName: Destination Storage Account
|
||||
- name: destinationStorageAccountName
|
||||
displayName: Destination Storage Account Name
|
||||
type: string
|
||||
default: https://oryxsdkssandbox.blob.core.windows.net
|
||||
values:
|
||||
- https://oryxsdkssandbox.blob.core.windows.net
|
||||
- https://oryxsdksdev.blob.core.windows.net
|
||||
default: oryxsdksdev
|
||||
- name: dryRun
|
||||
displayName: Dry Run?
|
||||
type: boolean
|
||||
|
@ -42,13 +39,7 @@ jobs:
|
|||
PROD_STORAGE_SAS_TOKEN: $(PROD-STORAGE-SAS-TOKEN)
|
||||
inputs:
|
||||
scriptPath: ./vsts/scripts/copySdksFromProdToStorageAccount.sh
|
||||
args: ${{ parameters.destinationStorageAccount }} ${{ parameters.dryRun }}
|
||||
|
||||
- task: ShellScript@2
|
||||
displayName: 'Test Prod storage account'
|
||||
inputs:
|
||||
scriptPath: ./build/testIntegration.sh
|
||||
args: StorageAccountTests=Prod
|
||||
args: https://${{ parameters.destinationStorageAccountName }}.blob.core.windows.net ${{ parameters.dryRun }}
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
parameters:
|
||||
- name: storageAccountUrl
|
||||
displayName: SDK storage account URL for testing
|
||||
type: string
|
||||
default: https://oryxsdksdev.blob.core.windows.net
|
||||
- name: buildImages
|
||||
type: object
|
||||
default:
|
||||
|
@ -96,6 +100,7 @@ stages:
|
|||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]true"
|
||||
echo "##vso[task.setvariable variable=RELEASE_TAG_NAME;]$(Build.BuildNumber)"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: templates/_buildTemplate.yml
|
||||
parameters:
|
||||
|
@ -120,9 +125,12 @@ stages:
|
|||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]true"
|
||||
echo "##vso[task.setvariable variable=RELEASE_TAG_NAME;]$(Build.BuildNumber)"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: templates/_buildTemplate.yml
|
||||
|
||||
- template: templates/_integrationJobTemplate.yml
|
||||
parameters:
|
||||
storageAccountUrl: ${{ parameters.storageAccountUrl }}
|
||||
|
||||
trigger: none
|
|
@ -86,21 +86,21 @@ steps:
|
|||
displayName: 'Build build images'
|
||||
inputs:
|
||||
scriptPath: ./build/buildBuildImages.sh
|
||||
args: -t ${{ parameters.imageType }}
|
||||
args: -t ${{ parameters.imageType }} -s $(storageAccountUrl)
|
||||
condition: and(succeeded(), eq(variables['BuildBuildImages'], 'true'))
|
||||
|
||||
- task: ShellScript@2
|
||||
displayName: 'Build Buster runtime images'
|
||||
inputs:
|
||||
scriptPath: ./build/buildRunTimeImages.sh
|
||||
args: buster
|
||||
args: -s $(storageAccountUrl) buster
|
||||
condition: and(succeeded(), eq(variables['BuildRuntimeImages'], 'true'))
|
||||
|
||||
- task: ShellScript@2
|
||||
displayName: 'Build Bullseye runtime images'
|
||||
inputs:
|
||||
scriptPath: ./build/buildRunTimeImages.sh
|
||||
args: bullseye
|
||||
args: -s $(storageAccountUrl) bullseye
|
||||
condition: and(succeeded(), eq(variables['BuildRuntimeImages'], 'true'))
|
||||
|
||||
- script: |
|
||||
|
@ -121,6 +121,8 @@ steps:
|
|||
|
||||
- task: ShellScript@2
|
||||
displayName: 'Test build images'
|
||||
env:
|
||||
ORYX_TEST_SDK_STORAGE_URL: $(storageAccountUrl)
|
||||
inputs:
|
||||
scriptPath: ./build/testBuildImages.sh
|
||||
args: skipBuildingImages ${{ parameters.imageName }} $(Build.DefinitionName).$(RELEASE_TAG_NAME) ${{ parameters.imageType }}
|
||||
|
@ -128,6 +130,8 @@ steps:
|
|||
|
||||
- task: ShellScript@2
|
||||
displayName: 'Test runtime images'
|
||||
env:
|
||||
ORYX_TEST_SDK_STORAGE_URL: $(storageAccountUrl)
|
||||
inputs:
|
||||
scriptPath: ./build/testRunTimeImages.sh
|
||||
args: skipBuildingImages ${{ parameters.imageName }} $(Build.DefinitionName).$(RELEASE_TAG_NAME)
|
||||
|
@ -164,6 +168,7 @@ steps:
|
|||
SQLSERVER_DATABASE_NAME: $(SQLSERVER-DATABASE-NAME)
|
||||
SQLSERVER_DATABASE_USERNAME: $(SQLSERVER-DATABASE-USERNAME)
|
||||
SQLSERVER_DATABASE_PASSWORD: $(SQLSERVER-DATABASE-PASSWORD)
|
||||
ORYX_TEST_SDK_STORAGE_URL: $(storageAccountUrl)
|
||||
condition: and(succeeded(), eq(variables['TestIntegration'], 'true'))
|
||||
|
||||
- task: CopyFiles@2
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
parameters:
|
||||
- name: storageAccountUrl
|
||||
type: string
|
||||
default: https://oryxsdksdev.blob.core.windows.net
|
||||
- name: nodeVersions
|
||||
type: object
|
||||
default:
|
||||
|
@ -63,6 +66,7 @@ jobs:
|
|||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
|
@ -100,6 +104,7 @@ jobs:
|
|||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
|
@ -137,6 +142,7 @@ jobs:
|
|||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
|
@ -174,6 +180,7 @@ jobs:
|
|||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
|
@ -211,6 +218,7 @@ jobs:
|
|||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
|
@ -246,6 +254,7 @@ jobs:
|
|||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
|
@ -281,6 +290,7 @@ jobs:
|
|||
echo "##vso[task.setvariable variable=PushBuildImages;]false"
|
||||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]false"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: _setReleaseTag.yml
|
||||
- template: _buildTemplate.yml
|
||||
|
@ -300,6 +310,8 @@ jobs:
|
|||
version: 3.1.x
|
||||
- task: ShellScript@2
|
||||
displayName: 'Test Dev storage account'
|
||||
env:
|
||||
ORYX_TEST_SDK_STORAGE_URL: ${{ parameters.storageAccountUrl }}
|
||||
inputs:
|
||||
scriptPath: ./build/testIntegration.sh
|
||||
args: StorageAccountTests=Dev
|
|
@ -1,3 +1,6 @@
|
|||
parameters:
|
||||
destinationSdkStorageAccountName: 'oryxsdksdev'
|
||||
|
||||
steps:
|
||||
|
||||
- checkout: self
|
||||
|
@ -13,12 +16,14 @@ steps:
|
|||
inputs:
|
||||
ignoreDirectories: '$(Build.SourcesDirectory)/tests'
|
||||
|
||||
- task: AzureCLI@1
|
||||
- task: ShellScript@2
|
||||
displayName: Upload files to Azure Storage
|
||||
env:
|
||||
DEV_STORAGE_SAS_TOKEN: $(DEV-STORAGE-SAS-TOKEN)
|
||||
SANDBOX_STORAGE_SAS_TOKEN: $(SANDBOX-STORAGE-SAS-TOKEN)
|
||||
inputs:
|
||||
azureSubscription: oryxSP
|
||||
scriptPath: ./vsts/scripts/publishFilesToAzureStorage.sh
|
||||
arguments: oryxsdksdev
|
||||
args: ${{ parameters.destinationSdkStorageAccountName }}
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET Core SDK 3.1.x'
|
||||
|
@ -27,6 +32,8 @@ steps:
|
|||
|
||||
- task: ShellScript@2
|
||||
displayName: 'Test Dev storage account'
|
||||
env:
|
||||
ORYX_TEST_SDK_STORAGE_URL: https://${{ parameters.destinationSdkStorageAccountName }}.blob.core.windows.net
|
||||
inputs:
|
||||
scriptPath: ./build/testIntegration.sh
|
||||
args: StorageAccountTests=Dev
|
|
@ -1,6 +1,7 @@
|
|||
parameters:
|
||||
platformName: ''
|
||||
debianFlavor: ''
|
||||
destinationSdkStorageAccountName: ''
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
|
@ -20,7 +21,7 @@ steps:
|
|||
displayName: 'Building platform binaries'
|
||||
inputs:
|
||||
scriptPath: ./build/buildPlatformBinaries.sh
|
||||
args: ${{ parameters.platformName }} ${{ parameters.debianFlavor }}
|
||||
args: ${{ parameters.platformName }} ${{ parameters.debianFlavor }} https://${{ parameters.destinationSdkStorageAccountName }}.blob.core.windows.net
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy artifacts from source repo to agent artifacts folder'
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
parameters:
|
||||
- name: storageAccountUrl
|
||||
displayName: SDK storage account URL for testing
|
||||
type: string
|
||||
default: https://oryxsdksdev.blob.core.windows.net
|
||||
- name: buildImages
|
||||
type: object
|
||||
default:
|
||||
|
@ -63,6 +67,7 @@ jobs:
|
|||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]true"
|
||||
echo "##vso[task.setvariable variable=RELEASE_TAG_NAME;]$(Build.BuildNumber)"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: templates/_buildTemplate.yml
|
||||
parameters:
|
||||
|
@ -83,6 +88,7 @@ jobs:
|
|||
echo "##vso[task.setvariable variable=PushRuntimeImages;]false"
|
||||
echo "##vso[task.setvariable variable=EmbedBuildContextInImages;]true"
|
||||
echo "##vso[task.setvariable variable=RELEASE_TAG_NAME;]$(Build.BuildNumber)"
|
||||
echo "##vso[task.setvariable variable=storageAccountUrl;]${{ parameters.storageAccountUrl }}"
|
||||
displayName: 'Set variables'
|
||||
- template: templates/_buildTemplate.yml
|
||||
|
||||
|
|
|
@ -72,14 +72,12 @@ if [ ! -f "$azCopyDir/azcopy" ]; then
|
|||
$azCopyDir/azcopy --version
|
||||
fi
|
||||
|
||||
destinationSdk=""
|
||||
destinationSdk="$1"
|
||||
sasToken=""
|
||||
|
||||
if [ "$1" = $SANDBOX_SDK_STORAGE_BASE_URL ]; then
|
||||
destinationSdk=$SANDBOX_SDK_STORAGE_BASE_URL
|
||||
if [ "$1" == $SANDBOX_SDK_STORAGE_BASE_URL ]; then
|
||||
sasToken=$SANDBOX_STORAGE_SAS_TOKEN
|
||||
elif [ "$1" = $DEV_SDK_STORAGE_BASE_URL ]; then
|
||||
destinationSdk=$DEV_SDK_STORAGE_BASE_URL
|
||||
elif [ "$1" == $DEV_SDK_STORAGE_BASE_URL ]; then
|
||||
sasToken=$DEV_STORAGE_SAS_TOKEN
|
||||
else
|
||||
echo "Error: $1 is an invalid destination storage account url."
|
||||
|
|
|
@ -9,7 +9,7 @@ set -ex
|
|||
declare -r REPO_DIR=$( cd $( dirname "$0" ) && cd .. && cd .. && pwd )
|
||||
source $REPO_DIR/platforms/__common.sh
|
||||
commit=$(git rev-parse HEAD)
|
||||
storageAccount="$1"
|
||||
storageAccountName="$1"
|
||||
|
||||
uploadFiles() {
|
||||
local platform="$1"
|
||||
|
@ -46,7 +46,8 @@ uploadFiles() {
|
|||
--name $fileName \
|
||||
--file "$fileToUpload" \
|
||||
--container-name $platform \
|
||||
--account-name $storageAccount \
|
||||
--account-name $storageAccountName \
|
||||
--sas-token $sasToken \
|
||||
--metadata \
|
||||
Buildnumber="$BUILD_BUILDNUMBER" \
|
||||
Commit="$commit" \
|
||||
|
@ -59,7 +60,8 @@ uploadFiles() {
|
|||
--name $fileName \
|
||||
--file "$fileToUpload" \
|
||||
--container-name $platform \
|
||||
--account-name $storageAccount \
|
||||
--account-name $storageAccountName \
|
||||
--sas-token $sasToken \
|
||||
--metadata \
|
||||
Buildnumber="$BUILD_BUILDNUMBER" \
|
||||
Commit="$commit" \
|
||||
|
@ -70,6 +72,18 @@ uploadFiles() {
|
|||
done
|
||||
}
|
||||
|
||||
storageAccountUrl="https://$storageAccountName.blob.core.windows.net"
|
||||
sasToken=""
|
||||
|
||||
if [ "$storageAccountUrl" == $SANDBOX_SDK_STORAGE_BASE_URL ]; then
|
||||
sasToken=$SANDBOX_STORAGE_SAS_TOKEN
|
||||
elif [ "$storageAccountUrl" == $DEV_SDK_STORAGE_BASE_URL ]; then
|
||||
sasToken=$DEV_STORAGE_SAS_TOKEN
|
||||
else
|
||||
echo "Error: $1 is an invalid destination storage account."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
platforms=("nodejs" "python" "dotnet" "php" "php-composer" "ruby" "java" "maven" "golang")
|
||||
for platform in "${platforms[@]}"
|
||||
do
|
||||
|
|
Загрузка…
Ссылка в новой задаче