Skip to content

Commit

Permalink
Fix script (#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthchr authored Feb 9, 2021
1 parent c838a55 commit 86561c3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
3 changes: 2 additions & 1 deletion devops/release/scripts/step1_releasepackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ echo "##vso[task.setvariable variable=azureserviceoperator_image_version]$azures

mkdir release/config -p
cp -r _Azure.azure-service-operator/drop/setup.yaml ./release/config
cp -r _Azure.azure-service-operator/drop/*.tgz ./release/config
# Not currently including Helm charts as part of release so skip this
# cp -r _Azure.azure-service-operator/drop/*.tgz ./release/config
IMG=${azureserviceoperator_image_public/"public/"/"mcr.microsoft.com/"}
echo "updating the manager image "
echo $IMG
Expand Down
22 changes: 11 additions & 11 deletions devops/release/scripts/step2_pushdockerimage.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
ACR_NAME='asorelease'

echo "ACR_NAME", $ACR_NAME
echo "azureserviceoperator_image", $(azureserviceoperator_image)
echo "azureserviceoperator_image_base", $(azureserviceoperator_image_base)
echo "azureserviceoperator_image_latest", $(azureserviceoperator_image_latest)
echo "azureserviceoperator_image_public", $(azureserviceoperator_image_public)
echo "azureserviceoperator_image_version", $(azureserviceoperator_image_version)
echo "ACR_NAME: $ACR_NAME"
echo "azureserviceoperator_image: $azureserviceoperator_image"
echo "azureserviceoperator_image_base: $azureserviceoperator_image_base"
echo "azureserviceoperator_image_latest: $azureserviceoperator_image_latest"
echo "azureserviceoperator_image_public: $azureserviceoperator_image_public"
echo "azureserviceoperator_image_version: $azureserviceoperator_image_version"


az acr login --name $ACR_NAME
docker pull $ACR_NAME.azurecr.io/$(azureserviceoperator_image)
docker tag $ACR_NAME.azurecr.io/$(azureserviceoperator_image) $ACR_NAME.azurecr.io/$(azureserviceoperator_image_latest)
docker tag $ACR_NAME.azurecr.io/$(azureserviceoperator_image) $ACR_NAME.azurecr.io/$(azureserviceoperator_image_public)
docker pull $ACR_NAME.azurecr.io/$azureserviceoperator_image
docker tag $ACR_NAME.azurecr.io/$azureserviceoperator_image $ACR_NAME.azurecr.io/$azureserviceoperator_image_latest
docker tag $ACR_NAME.azurecr.io/$azureserviceoperator_image $ACR_NAME.azurecr.io/$azureserviceoperator_image_public
docker image ls
docker push $ACR_NAME.azurecr.io/$(azureserviceoperator_image_public)
docker push $ACR_NAME.azurecr.io/$(azureserviceoperator_image_latest)
docker push $ACR_NAME.azurecr.io/$azureserviceoperator_image_public
docker push $ACR_NAME.azurecr.io/$azureserviceoperator_image_latest
20 changes: 10 additions & 10 deletions devops/release/scripts/step3_pushhelmchart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ export HELM_EXPERIMENTAL_OCI=1
ACR_NAME='asorelease'

echo "ACR_NAME", $ACR_NAME
echo "azureserviceoperator_image", $(azureserviceoperator_image)
echo "azureserviceoperator_image_base", $(azureserviceoperator_image_base)
echo "azureserviceoperator_image_latest", $(azureserviceoperator_image_latest)
echo "azureserviceoperator_image_public", $(azureserviceoperator_image_public)
echo "azureserviceoperator_image_version", $(azureserviceoperator_image_version)
echo "azureserviceoperator_image: $azureserviceoperator_image"
echo "azureserviceoperator_image_base $azureserviceoperator_image_base"
echo "azureserviceoperator_image_latest: $azureserviceoperator_image_latest"
echo "azureserviceoperator_image_public: $azureserviceoperator_image_public"
echo "azureserviceoperator_image_version: $azureserviceoperator_image_version"

echo $(AZURE_CLIENT_SECRET) | helm registry login $ACR_NAME.azurecr.io --username $(AZURE_CLIENT_ID) --password-stdin
echo $AZURE_CLIENT_SECRET | helm registry login $ACR_NAME.azurecr.io --username $AZURE_CLIENT_ID --password-stdin

helm chart pull $ACR_NAME.azurecr.io/candidate/k8s/asohelmchart:$(azureserviceoperator_image_version)
helm chart export $ACR_NAME.azurecr.io/candidate/k8s/asohelmchart:$(azureserviceoperator_image_version) --destination .
helm chart pull $ACR_NAME.azurecr.io/candidate/k8s/asohelmchart:$azureserviceoperator_image_version
helm chart export $ACR_NAME.azurecr.io/candidate/k8s/asohelmchart:$azureserviceoperator_image_version --destination .
cd azure-service-operator
helm chart save . $ACR_NAME.azurecr.io/public/k8s/asohelmchart:$(azureserviceoperator_image_version)
helm chart save . $ACR_NAME.azurecr.io/public/k8s/asohelmchart:$azureserviceoperator_image_version
helm chart save . $ACR_NAME.azurecr.io/public/k8s/asohelmchart:latest
helm chart push $ACR_NAME.azurecr.io/public/k8s/asohelmchart:$(azureserviceoperator_image_version)
helm chart push $ACR_NAME.azurecr.io/public/k8s/asohelmchart:$azureserviceoperator_image_version
helm chart push $ACR_NAME.azurecr.io/public/k8s/asohelmchart:latest

0 comments on commit 86561c3

Please sign in to comment.