Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing environment variables in AzureContainerAppsV0 task #17595

Conversation

Basssiiie
Copy link

Task name: AzureContainerAppsV0

Description: add the possibility to pass environment variables to the deployed container app, as supported by the CLI.

Documentation changes required: Y, any documentation outside this repository listing the available arguments for this task should be updated.

Added unit tests: N, there were no tests for similar arguments either so was not sure how to unit test it. If it is still preferred, please let me know with some pointers on how the test is preferred.

Attached related issue: Y, #17493, Azure/container-apps-deploy-pipelines-task#4

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

@Basssiiie
Copy link
Author

@microsoft-github-policy-service agree

@Basssiiie Basssiiie force-pushed the container-apps-add-environment-variables branch from 53e8d41 to dc336f1 Compare January 11, 2023 18:09
@cormacpayne
Copy link
Contributor

@Basssiiie Thanks for making this change! This looks good to me, and I'll make sure to port it over to our RC task and GitHub Action so folks are able to have compatible functionality there.

Copy link
Contributor

@cormacpayne cormacpayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@Basssiiie
Copy link
Author

Thanks! 😃

@cormacpayne
Copy link
Contributor

@Basssiiie it appears the pipelines are failing due to the package-lock.json generated while building the task is different from what we currently have checked in with the task -- I'm assuming the pipelines try to create a fresh lock file to make sure dependencies are up-to-date?

If you're able to, would you mind regenerating the package-lock.json for the task by doing the following:

  • Delete the package-lock.json folder in the Tasks/AzureContainerAppsV0 folder
    • If it exists, go ahead and delete the node_modules folder here as well
  • From the root of the azure-pipelines-tasks repo, run the following:
    • node make.js build --task AzureContainerAppsV0

This should update a few dependencies in our lock file and hopefully the pipelines will pass so we can get this PR merged. Let me know if you have any issues with this and need me to take care of it. Thanks!

@Basssiiie
Copy link
Author

Basssiiie commented Jan 19, 2023

@cormacpayne package-lock.json has been updated. Hope it helps. :)

@cormacpayne
Copy link
Contributor

@Basssiiie Hmm for some reason, the pipelines aren't picking up the changes, no matter how many times I rebase against master.

I have a PR that I'm going to open in our RC task repository that will include this change (along with a few other things), so when I bring those changes back into this stable task repository, I'll include these changes (if the PR hasn't been merged) and make sure that you get the development credit there if that's OK with you.

@Basssiiie
Copy link
Author

@cormacpayne ah too bad it's not working out. But yes it's okay with me to merge it via the RC task. :)

A side note is that I originally made the PR here per recommendation by the readme.md on the RC task's repo.

[...] however, we advise that any changes made to the AzureContainerAppsRC task be made instead to the AzureContainerApps task

Maybe it's an idea to update that if this flow is having issues?

@cormacpayne
Copy link
Contributor

@Basssiiie That's a good callout -- I'm hoping this is just a one-off issue for users looking to make changes to the task in this repository, but if it occurs again with another user, I'll update the documentation accordingly and port any changes made by customers in the RC task over to this task when it's released out-of-the-box with Azure Pipelines.

@cormacpayne
Copy link
Contributor

I'm going to close this pull request since these changes were integrated into the AzureContainerApps@1 task as a part of this pull request. Please feel free to let me know if you have any additional questions or comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants