Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions host/4/publish-appservice-stage-dotnet-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
trigger: none
# Publish pipelines are triggered via HTTP method in release pipeline. See [App Service] v4 stage release
pool:
vmImage: 'Ubuntu-latest'

steps:
- bash: |
set -e
echo $pswd | docker login -u $(dockerUsername) --password-stdin azurefunctions.azurecr.io
displayName: login
continueOnError: false
env:
pswd: $(dockerPassword)

- bash: |
set -e
SOURCE_REGISTRY=azurefunctions.azurecr.io/azure-functions/4
TARGET_REGISTRY=azurefunctions.azurecr.io/public/azure-functions

if [ -z "$(TargetVersion)" ]; then
echo "ERROR: TargetVersion is required"
exit 1
fi

if [ -z "$(PrivateVersion)" ]; then
echo "ERROR: PrivateVersion is required"
exit 1
fi

if [ -z "$(StageNumber)" ]; then
echo "ERROR: StageNumber is required"
exit 1
fi

echo "##vso[task.setvariable variable=SOURCE_REGISTRY]$SOURCE_REGISTRY"
echo "##vso[task.setvariable variable=TARGET_REGISTRY]$TARGET_REGISTRY"
displayName: set env
continueOnError: false

- bash: |
set -e
docker pull $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated8.0-appservice

docker tag $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated8.0-appservice $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0-appservice-stage$(StageNumber)

docker push $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0-appservice-stage$(StageNumber)

docker system prune -a -f
displayName: tag and push dotnet-isolated8 images
continueOnError: false
66 changes: 66 additions & 0 deletions host/4/publish-dotnet-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
trigger: none
# Publish pipelines are triggered via HTTP method in release pipeline. See v4 publish
schedules:
- cron: "0 3 * * *"
displayName: 3 AM Nightly Publish
branches:
include:
- nightly-build
always: true
pool:
vmImage: 'Ubuntu-latest'

steps:
- bash: |
echo $pswd | docker login -u $(dockerUsername) --password-stdin azurefunctions.azurecr.io
displayName: login
continueOnError: false
env:
pswd: $(dockerPassword)

- bash: |
echo "##vso[task.setvariable variable=PrivateVersion;]nightly-build"
echo "##vso[task.setvariable variable=TargetVersion;]4-nightly"
displayName: Set Nightly Build Variables
continueOnError: false
condition: eq(variables['Build.Reason'], 'Schedule')

- bash: |
set -e
SOURCE_REGISTRY=azurefunctions.azurecr.io/azure-functions/4
TARGET_REGISTRY=azurefunctions.azurecr.io/public/azure-functions

if [ -z "$(TargetVersion)" ]; then
echo "ERROR: TargetVersion is required"
exit 1
fi

if [ -z "$(PrivateVersion)" ]; then
echo "ERROR: PrivateVersion is required"
exit 1
fi

echo "##vso[task.setvariable variable=SOURCE_REGISTRY]$SOURCE_REGISTRY"
echo "##vso[task.setvariable variable=TARGET_REGISTRY]$TARGET_REGISTRY"
displayName: set env
continueOnError: false

- bash: |
set -e
docker pull $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated8.0
docker pull $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated8.0-slim
docker pull $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated8.0-appservice

docker tag $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated8.0 $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0
docker tag $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated8.0-slim $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0-slim
docker tag $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated8.0-appservice $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0-appservice
docker tag $SOURCE_REGISTRY/dotnet-isolated:$(PrivateVersion)-dotnet-isolated8.0-appservice $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0-appservice-quickstart

docker push $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0
docker push $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0-slim
docker push $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0-appservice
docker push $TARGET_REGISTRY/dotnet-isolated:$(TargetVersion)-dotnet-isolated8.0-appservice-quickstart

docker system prune -a -f
displayName: tag and push dotnet8-isolated images
continueOnError: false