MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.25k stars 21.42k forks source link

Incorrect variable ENVIRONMENT_NAME, expected ENV_NAME #95489

Closed clarenceb closed 1 year ago

clarenceb commented 2 years ago

In section: https://docs.microsoft.com/en-us/azure/azure-arc/kubernetes/tutorial-gitops-flux2-ci-cd#create-github-environment-secrets

ENVIRONMENT_NAME for the Dev and Stage environments should be changed to ENV_NAME otherwise the Deploy step fails in the script https://github.com/Azure/arc-cicd-demo-src/blob/master/utils/create-pr.sh#L72

The script expects a variable to called ENV_NAME.

The GitHub actions files need to be updated to pass this secret:

https://github.com/Azure/arc-cicd-demo-src/blob/master/.github/workflows/az-vote-cd.yml#L83

${{ github.workspace }}/utils/create-pr.sh -s ${{ github.workspace }}/gen_manifests -d ${{ secrets.MANIFESTS_FOLDER }} -r ${{ secrets.MANIFESTS_REPO }} -b $(echo $release_prefix)${{ secrets.MANIFESTS_BRANCH }} -i $GITHUB_RUN_ID -t ${{ secrets.PAT }} -e ${{ secrets.ENV_NAME }}

https://github.com/Azure/arc-cicd-demo-src/blob/master/.github/workflows/az-vote-cicd.yml#L119

${{ github.workspace }}/utils/create-pr.sh -s ${{ github.workspace }}/gen_manifests -d ${{ secrets.MANIFESTS_FOLDER }} -r ${{ secrets.MANIFESTS_REPO }} -b $(echo $release_prefix)${{ secrets.MANIFESTS_BRANCH }} -i $GITHUB_RUN_ID -t ${{ secrets.PAT }} -e ${{ secrets.ENV_NAME }}        

The environment name also needs to be changed as it's incorrect.

Change at: https://github.com/Azure/arc-cicd-demo-src/blob/master/.github/workflows/az-vote-cicd.yml#L78

From:

environment: az-vote-app-dev

to:

environment: dev

and change at: https://github.com/Azure/arc-cicd-demo-src/blob/master/.github/workflows/az-vote-cd.yml#L12

From:

environment: az-vote-app-dev

to:

environment: dev

and lastly, change at: https://github.com/Azure/arc-cicd-demo-src/blob/master/.github/workflows/az-vote-cd.yml#L32

From:

environment: az-vote-app-stage

to:

environment: stage


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

VikasPullagura-MSFT commented 2 years ago

@clarenceb Thanks for the feedback! I have assigned the issue to content author to check and update the document as appropriate.

VikasPullagura-MSFT commented 2 years ago

@eedorenko Can you please check and add your comments on this doc update request as applicable.

rayoef commented 1 year ago

reassign:JnHs

eedorenko commented 1 year ago

Checked. None of the suggestions should be done.

JnHs commented 1 year ago

Thanks for reviewing @eedorenko! @clarenceb - thank you for taking the time to share this feedback, and I apologize for the very long time to respond. We've reviewed your suggestions and it doesn't seem that any of these changes are needed at this time (the article may have been updated since you left the feedback). I'll close this issue now, but please let us know if you have additional questions.

please-close