-
Notifications
You must be signed in to change notification settings - Fork 79
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
Added script to initialize ACR and related service principals #36
Conversation
… seconds to allow the service principal to propagate through AAD.
@rickrain I did encounter one issue when running this from cloud shell. The script seems to hang on line 96 when running
If I comment out that line, the script did execute. Once it executed, I was able to verify it creates ACR instance along with SPN's in intended roles & scopes Should we exclude az login from the script? What if someone wants to run it as a SPN, MSI, or from cloud shell as I did? cc @xtophs |
@charleszipp We can certainly remove |
@rickrain this may provide a third option, check if they are already logged in and then run az login if they are not logged in already |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test request changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
location doesn't work with locations in the list:
Reordering script commands for the array declaration before the location substitution surfaces this error:
Which yields that error is likely related to the default bash on MacOS being 3.2.57, which doesn't have associative arrays. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add instructions to run the setup to README.
See comment on MacOS compatibility.
Could you clarify that bash4 affects all Mac users running the default bash setup and document how to remedy? we want to make it easy for people that use this. |
@xtophs I added a note in the setup that points to instructions for updating bash. @rickrain is working on reviewing the other two PR's from last sprint so Im trying to help out with docs on this. Let me know if this is sufficient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
# This is the 1st commit message: Adding docker test base image # This is the commit message #2: Adding test files # This is the commit message #3: testing # This is the commit message #4: Added folder # This is the commit message #5: Added folder # This is the commit message #6: Azure Devops CI Build Pipeline (#67) * Adding azure devops build pipeline * Adding README * Adding azure build badge # This is the commit message #7: saving latest tests # This is the commit message #8: Adding docker test base image (#68) # This is the commit message #9: EOD checkin # This is the commit message #10: posting latest # This is the commit message #11: eod commits # This is the commit message #12: eod commit # This is the commit message #13: refactored test directory structure # This is the commit message #14: Refactored build # This is the commit message #15: Adding hello world azure simple app # This is the commit message #16: Adding hello world azure simple app # This is the commit message #17: refactoring test harness # This is the commit message #18: refactoring test harness # This is the commit message #19: checking latest # This is the commit message #20: committing latest # This is the commit message #21: checking in latest changes # This is the commit message #22: Checking in latest progress # This is the commit message #23: applying final touches before PR submission # This is the commit message #24: updating azure keyvault secret names # This is the commit message #25: Checking in latest progress # This is the commit message #26: pushing latest pipeline definition # This is the commit message #27: updating build pipeline variable format # This is the commit message #28: updating build pipeline variable format # This is the commit message #29: cleaning up build variables # This is the commit message #30: adding minor changes to azure build pipeline # This is the commit message #31: updating azure keyvault secret names # This is the commit message #32: updating azure keyvault secret names # This is the commit message #33: fixing docker login azdo step # This is the commit message #34: fixing docker login azdo step # This is the commit message #35: fixing docker login azdo step # This is the commit message #36: fixing docker login azdo step # This is the commit message #37: updating build pipeline variables # This is the commit message #38: updating build pipeline variables # This is the commit message #39: updating build pipeline variables # This is the commit message #40: updating build pipeline variables # This is the commit message #41: updating build pipeline variables # This is the commit message #42: updating build pipeline variables # This is the commit message #43: applying fix to git diff script # This is the commit message #44: applying fix to git diff script # This is the commit message #45: applying fix to git diff script # This is the commit message #46: applying fix to git diff script # This is the commit message #47: applying fix to git diff script # This is the commit message #48: resolving pipeline bug # This is the commit message #49: fixing build error # This is the commit message #50: fixing build error # This is the commit message #51: fixing build error # This is the commit message #52: fixing build error # This is the commit message #53: fixing build error # This is the commit message #54: fixing build error # This is the commit message #55: fixing build error # This is the commit message #56: fixing build error # This is the commit message #57: fixing build error # This is the commit message #58: fixing build error # This is the commit message #59: fixing build error # This is the commit message #60: fixing build error # This is the commit message #61: fixing build error # This is the commit message #62: fixing build error # This is the commit message #63: fixing build error # This is the commit message #64: fixing build error # This is the commit message #65: fixing build error # This is the commit message #66: fixing build error # This is the commit message #67: fixing build error # This is the commit message #68: fixing build error # This is the commit message #69: fixing build error # This is the commit message #70: fixing build error # This is the commit message #71: fixing build error # This is the commit message #72: fixing build error # This is the commit message #73: trying acr fix # This is the commit message #74: latest changes # This is the commit message #75: removing docker dependency on azure devops pipeline # This is the commit message #76: removing docker dependency on azure devops pipeline # This is the commit message #77: removing docker dependency on azure devops pipeline # This is the commit message #78: removing docker dependency on azure devops pipeline # This is the commit message #79: removing docker dependency on azure devops pipeline # This is the commit message #80: removing docker dependency on azure devops pipeline # This is the commit message #81: removing docker dependency on azure devops pipeline # This is the commit message #82: removing docker dependency on azure devops pipeline # This is the commit message #83: removing docker dependency on azure devops pipeline # This is the commit message #84: removing docker dependency on azure devops pipeline # This is the commit message #85: removing docker dependency on azure devops pipeline # This is the commit message #86: removing docker dependency on azure devops pipeline # This is the commit message #87: removing docker dependency on azure devops pipeline # This is the commit message #88: removing docker dependency on azure devops pipeline # This is the commit message #89: removing docker dependency on azure devops pipeline # This is the commit message #90: removing docker dependency on azure devops pipeline # This is the commit message #91: removing docker dependency on azure devops pipeline # This is the commit message #92: removing docker dependency on azure devops pipeline # This is the commit message #93: removing docker dependency on azure devops pipeline # This is the commit message #94: removing docker dependency on azure devops pipeline # This is the commit message #95: removing docker dependency on azure devops pipeline # This is the commit message #96: removing docker dependency on azure devops pipeline # This is the commit message #97: removing docker dependency on azure devops pipeline # This is the commit message #98: final commit including resource name randomization # This is the commit message #99: Add provider to configure az infra for Terraform
* # This is a combination of 99 commits. # This is the 1st commit message: Adding docker test base image # This is the commit message #2: Adding test files # This is the commit message #3: testing # This is the commit message #4: Added folder # This is the commit message #5: Added folder # This is the commit message #6: Azure Devops CI Build Pipeline (#67) * Adding azure devops build pipeline * Adding README * Adding azure build badge # This is the commit message #7: saving latest tests # This is the commit message #8: Adding docker test base image (#68) # This is the commit message #9: EOD checkin # This is the commit message #10: posting latest # This is the commit message #11: eod commits # This is the commit message #12: eod commit # This is the commit message #13: refactored test directory structure # This is the commit message #14: Refactored build # This is the commit message #15: Adding hello world azure simple app # This is the commit message #16: Adding hello world azure simple app # This is the commit message #17: refactoring test harness # This is the commit message #18: refactoring test harness # This is the commit message #19: checking latest # This is the commit message #20: committing latest # This is the commit message #21: checking in latest changes # This is the commit message #22: Checking in latest progress # This is the commit message #23: applying final touches before PR submission # This is the commit message #24: updating azure keyvault secret names # This is the commit message #25: Checking in latest progress # This is the commit message #26: pushing latest pipeline definition # This is the commit message #27: updating build pipeline variable format # This is the commit message #28: updating build pipeline variable format # This is the commit message #29: cleaning up build variables # This is the commit message #30: adding minor changes to azure build pipeline # This is the commit message #31: updating azure keyvault secret names # This is the commit message #32: updating azure keyvault secret names # This is the commit message #33: fixing docker login azdo step # This is the commit message #34: fixing docker login azdo step # This is the commit message #35: fixing docker login azdo step # This is the commit message #36: fixing docker login azdo step # This is the commit message #37: updating build pipeline variables # This is the commit message #38: updating build pipeline variables # This is the commit message #39: updating build pipeline variables # This is the commit message #40: updating build pipeline variables # This is the commit message #41: updating build pipeline variables # This is the commit message #42: updating build pipeline variables # This is the commit message #43: applying fix to git diff script # This is the commit message #44: applying fix to git diff script # This is the commit message #45: applying fix to git diff script # This is the commit message #46: applying fix to git diff script # This is the commit message #47: applying fix to git diff script # This is the commit message #48: resolving pipeline bug # This is the commit message #49: fixing build error # This is the commit message #50: fixing build error # This is the commit message #51: fixing build error # This is the commit message #52: fixing build error # This is the commit message #53: fixing build error # This is the commit message #54: fixing build error # This is the commit message #55: fixing build error # This is the commit message #56: fixing build error # This is the commit message #57: fixing build error # This is the commit message #58: fixing build error # This is the commit message #59: fixing build error # This is the commit message #60: fixing build error # This is the commit message #61: fixing build error # This is the commit message #62: fixing build error # This is the commit message #63: fixing build error # This is the commit message #64: fixing build error # This is the commit message #65: fixing build error # This is the commit message #66: fixing build error # This is the commit message #67: fixing build error # This is the commit message #68: fixing build error # This is the commit message #69: fixing build error # This is the commit message #70: fixing build error # This is the commit message #71: fixing build error # This is the commit message #72: fixing build error # This is the commit message #73: trying acr fix # This is the commit message #74: latest changes # This is the commit message #75: removing docker dependency on azure devops pipeline # This is the commit message #76: removing docker dependency on azure devops pipeline # This is the commit message #77: removing docker dependency on azure devops pipeline # This is the commit message #78: removing docker dependency on azure devops pipeline # This is the commit message #79: removing docker dependency on azure devops pipeline # This is the commit message #80: removing docker dependency on azure devops pipeline # This is the commit message #81: removing docker dependency on azure devops pipeline # This is the commit message #82: removing docker dependency on azure devops pipeline # This is the commit message #83: removing docker dependency on azure devops pipeline # This is the commit message #84: removing docker dependency on azure devops pipeline # This is the commit message #85: removing docker dependency on azure devops pipeline # This is the commit message #86: removing docker dependency on azure devops pipeline # This is the commit message #87: removing docker dependency on azure devops pipeline # This is the commit message #88: removing docker dependency on azure devops pipeline # This is the commit message #89: removing docker dependency on azure devops pipeline # This is the commit message #90: removing docker dependency on azure devops pipeline # This is the commit message #91: removing docker dependency on azure devops pipeline # This is the commit message #92: removing docker dependency on azure devops pipeline # This is the commit message #93: removing docker dependency on azure devops pipeline # This is the commit message #94: removing docker dependency on azure devops pipeline # This is the commit message #95: removing docker dependency on azure devops pipeline # This is the commit message #96: removing docker dependency on azure devops pipeline # This is the commit message #97: removing docker dependency on azure devops pipeline # This is the commit message #98: final commit including resource name randomization # This is the commit message #99: Add provider to configure az infra for Terraform * resolving merge conflicts for squash Updated documentation based on review comments Integrate review comments for documentation. Add usage example for each of the providers Adding environment template descriptions removing go version var from azdo pipeline as it's unused removing unused setup folder adding more verbose logging for azure devops failure fixing pull request branch name resolution bug fixing pull request branch name resolution bug addressing nick's pr comments documenting script and docker images cleaning up required env var check fixing base branch bug Added service plan terraform templates to Azure Adding tags for resources Integrate review comments to add random id to name Add tags, capacity and reserved for service plan Minor Fixes for documentation Integrate review comments related to resource naming Remove Optional and Required in variables.tf Update variables.tf Update Service Plan Tier to Isolated squaching commits applied base image suggestions from nick * squashing commits and slimming down the build image * removing go* path from azure devops pipeline as we removed go mods * refactoring our azure devops pipeline so it's aligned with the local test runner * fixing azure devops pipeline bug * fixing base image build variable reference bug * Addressing nick's PR comments
* # This is a combination of 99 commits. # This is the 1st commit message: Adding docker test base image # This is the commit message #2: Adding test files # This is the commit message #3: testing # This is the commit message #4: Added folder # This is the commit message #5: Added folder # This is the commit message #6: Azure Devops CI Build Pipeline (#67) * Adding azure devops build pipeline * Adding README * Adding azure build badge # This is the commit message #7: saving latest tests # This is the commit message #8: Adding docker test base image (#68) # This is the commit message #9: EOD checkin # This is the commit message #10: posting latest # This is the commit message #11: eod commits # This is the commit message #12: eod commit # This is the commit message #13: refactored test directory structure # This is the commit message #14: Refactored build # This is the commit message #15: Adding hello world azure simple app # This is the commit message #16: Adding hello world azure simple app # This is the commit message #17: refactoring test harness # This is the commit message #18: refactoring test harness # This is the commit message #19: checking latest # This is the commit message #20: committing latest # This is the commit message #21: checking in latest changes # This is the commit message #22: Checking in latest progress # This is the commit message #23: applying final touches before PR submission # This is the commit message #24: updating azure keyvault secret names # This is the commit message #25: Checking in latest progress # This is the commit message #26: pushing latest pipeline definition # This is the commit message #27: updating build pipeline variable format # This is the commit message #28: updating build pipeline variable format # This is the commit message #29: cleaning up build variables # This is the commit message #30: adding minor changes to azure build pipeline # This is the commit message #31: updating azure keyvault secret names # This is the commit message #32: updating azure keyvault secret names # This is the commit message #33: fixing docker login azdo step # This is the commit message #34: fixing docker login azdo step # This is the commit message #35: fixing docker login azdo step # This is the commit message #36: fixing docker login azdo step # This is the commit message #37: updating build pipeline variables # This is the commit message #38: updating build pipeline variables # This is the commit message #39: updating build pipeline variables # This is the commit message #40: updating build pipeline variables # This is the commit message #41: updating build pipeline variables # This is the commit message #42: updating build pipeline variables # This is the commit message #43: applying fix to git diff script # This is the commit message #44: applying fix to git diff script # This is the commit message #45: applying fix to git diff script # This is the commit message #46: applying fix to git diff script # This is the commit message #47: applying fix to git diff script # This is the commit message #48: resolving pipeline bug # This is the commit message #49: fixing build error # This is the commit message #50: fixing build error # This is the commit message #51: fixing build error # This is the commit message #52: fixing build error # This is the commit message #53: fixing build error # This is the commit message #54: fixing build error # This is the commit message #55: fixing build error # This is the commit message #56: fixing build error # This is the commit message #57: fixing build error # This is the commit message #58: fixing build error # This is the commit message #59: fixing build error # This is the commit message #60: fixing build error # This is the commit message #61: fixing build error # This is the commit message #62: fixing build error # This is the commit message #63: fixing build error # This is the commit message #64: fixing build error # This is the commit message #65: fixing build error # This is the commit message #66: fixing build error # This is the commit message #67: fixing build error # This is the commit message #68: fixing build error # This is the commit message #69: fixing build error # This is the commit message #70: fixing build error # This is the commit message #71: fixing build error # This is the commit message #72: fixing build error # This is the commit message #73: trying acr fix # This is the commit message #74: latest changes # This is the commit message #75: removing docker dependency on azure devops pipeline # This is the commit message #76: removing docker dependency on azure devops pipeline # This is the commit message #77: removing docker dependency on azure devops pipeline # This is the commit message #78: removing docker dependency on azure devops pipeline # This is the commit message #79: removing docker dependency on azure devops pipeline # This is the commit message #80: removing docker dependency on azure devops pipeline # This is the commit message #81: removing docker dependency on azure devops pipeline # This is the commit message #82: removing docker dependency on azure devops pipeline # This is the commit message #83: removing docker dependency on azure devops pipeline # This is the commit message #84: removing docker dependency on azure devops pipeline # This is the commit message #85: removing docker dependency on azure devops pipeline # This is the commit message #86: removing docker dependency on azure devops pipeline # This is the commit message #87: removing docker dependency on azure devops pipeline # This is the commit message #88: removing docker dependency on azure devops pipeline # This is the commit message #89: removing docker dependency on azure devops pipeline # This is the commit message #90: removing docker dependency on azure devops pipeline # This is the commit message #91: removing docker dependency on azure devops pipeline # This is the commit message #92: removing docker dependency on azure devops pipeline # This is the commit message #93: removing docker dependency on azure devops pipeline # This is the commit message #94: removing docker dependency on azure devops pipeline # This is the commit message #95: removing docker dependency on azure devops pipeline # This is the commit message #96: removing docker dependency on azure devops pipeline # This is the commit message #97: removing docker dependency on azure devops pipeline # This is the commit message #98: final commit including resource name randomization # This is the commit message #99: Add provider to configure az infra for Terraform * resolving merge conflicts for squash Updated documentation based on review comments Integrate review comments for documentation. Add usage example for each of the providers Adding environment template descriptions removing go version var from azdo pipeline as it's unused removing unused setup folder adding more verbose logging for azure devops failure fixing pull request branch name resolution bug fixing pull request branch name resolution bug addressing nick's pr comments documenting script and docker images cleaning up required env var check fixing base branch bug Added service plan terraform templates to Azure Adding tags for resources Integrate review comments to add random id to name Add tags, capacity and reserved for service plan Minor Fixes for documentation Integrate review comments related to resource naming Remove Optional and Required in variables.tf Update variables.tf Update Service Plan Tier to Isolated squaching commits applied base image suggestions from nick * squashing commits and slimming down the build image * removing go* path from azure devops pipeline as we removed go mods * refactoring our azure devops pipeline so it's aligned with the local test runner * fixing azure devops pipeline bug * fixing base image build variable reference bug * Addressing nick's PR comments * resolving issue with failed builds after completing branches merges * addressing a bug where test harness directory changes were not getting picked up by the harness * removing local echo statement * Adding directory exists check and app service container command variable * addressing nick's PR comments * adding git diff extension whitelist filter
* # This is a combination of 99 commits. # This is the 1st commit message: Adding docker test base image # This is the commit message #2: Adding test files # This is the commit message #3: testing # This is the commit message #4: Added folder # This is the commit message #5: Added folder # This is the commit message #6: Azure Devops CI Build Pipeline (#67) * Adding azure devops build pipeline * Adding README * Adding azure build badge # This is the commit message #7: saving latest tests # This is the commit message #8: Adding docker test base image (#68) # This is the commit message #9: EOD checkin # This is the commit message #10: posting latest # This is the commit message #11: eod commits # This is the commit message #12: eod commit # This is the commit message #13: refactored test directory structure # This is the commit message #14: Refactored build # This is the commit message #15: Adding hello world azure simple app # This is the commit message #16: Adding hello world azure simple app # This is the commit message #17: refactoring test harness # This is the commit message #18: refactoring test harness # This is the commit message #19: checking latest # This is the commit message #20: committing latest # This is the commit message #21: checking in latest changes # This is the commit message #22: Checking in latest progress # This is the commit message #23: applying final touches before PR submission # This is the commit message #24: updating azure keyvault secret names # This is the commit message #25: Checking in latest progress # This is the commit message #26: pushing latest pipeline definition # This is the commit message #27: updating build pipeline variable format # This is the commit message #28: updating build pipeline variable format # This is the commit message #29: cleaning up build variables # This is the commit message #30: adding minor changes to azure build pipeline # This is the commit message #31: updating azure keyvault secret names # This is the commit message #32: updating azure keyvault secret names # This is the commit message #33: fixing docker login azdo step # This is the commit message #34: fixing docker login azdo step # This is the commit message #35: fixing docker login azdo step # This is the commit message #36: fixing docker login azdo step # This is the commit message #37: updating build pipeline variables # This is the commit message #38: updating build pipeline variables # This is the commit message #39: updating build pipeline variables # This is the commit message #40: updating build pipeline variables # This is the commit message #41: updating build pipeline variables # This is the commit message #42: updating build pipeline variables # This is the commit message #43: applying fix to git diff script # This is the commit message #44: applying fix to git diff script # This is the commit message #45: applying fix to git diff script # This is the commit message #46: applying fix to git diff script # This is the commit message #47: applying fix to git diff script # This is the commit message #48: resolving pipeline bug # This is the commit message #49: fixing build error # This is the commit message #50: fixing build error # This is the commit message #51: fixing build error # This is the commit message #52: fixing build error # This is the commit message #53: fixing build error # This is the commit message #54: fixing build error # This is the commit message #55: fixing build error # This is the commit message #56: fixing build error # This is the commit message #57: fixing build error # This is the commit message #58: fixing build error # This is the commit message #59: fixing build error # This is the commit message #60: fixing build error # This is the commit message #61: fixing build error # This is the commit message #62: fixing build error # This is the commit message #63: fixing build error # This is the commit message #64: fixing build error # This is the commit message #65: fixing build error # This is the commit message #66: fixing build error # This is the commit message #67: fixing build error # This is the commit message #68: fixing build error # This is the commit message #69: fixing build error # This is the commit message #70: fixing build error # This is the commit message #71: fixing build error # This is the commit message #72: fixing build error # This is the commit message #73: trying acr fix # This is the commit message #74: latest changes # This is the commit message #75: removing docker dependency on azure devops pipeline # This is the commit message #76: removing docker dependency on azure devops pipeline # This is the commit message #77: removing docker dependency on azure devops pipeline # This is the commit message #78: removing docker dependency on azure devops pipeline # This is the commit message #79: removing docker dependency on azure devops pipeline # This is the commit message #80: removing docker dependency on azure devops pipeline # This is the commit message #81: removing docker dependency on azure devops pipeline # This is the commit message #82: removing docker dependency on azure devops pipeline # This is the commit message #83: removing docker dependency on azure devops pipeline # This is the commit message #84: removing docker dependency on azure devops pipeline # This is the commit message #85: removing docker dependency on azure devops pipeline # This is the commit message #86: removing docker dependency on azure devops pipeline # This is the commit message #87: removing docker dependency on azure devops pipeline # This is the commit message #88: removing docker dependency on azure devops pipeline # This is the commit message #89: removing docker dependency on azure devops pipeline # This is the commit message #90: removing docker dependency on azure devops pipeline # This is the commit message #91: removing docker dependency on azure devops pipeline # This is the commit message #92: removing docker dependency on azure devops pipeline # This is the commit message #93: removing docker dependency on azure devops pipeline # This is the commit message #94: removing docker dependency on azure devops pipeline # This is the commit message #95: removing docker dependency on azure devops pipeline # This is the commit message #96: removing docker dependency on azure devops pipeline # This is the commit message #97: removing docker dependency on azure devops pipeline # This is the commit message #98: final commit including resource name randomization # This is the commit message #99: Add provider to configure az infra for Terraform * resolving merge conflicts for squash Updated documentation based on review comments Integrate review comments for documentation. Add usage example for each of the providers Adding environment template descriptions removing go version var from azdo pipeline as it's unused removing unused setup folder adding more verbose logging for azure devops failure fixing pull request branch name resolution bug fixing pull request branch name resolution bug addressing nick's pr comments documenting script and docker images cleaning up required env var check fixing base branch bug Added service plan terraform templates to Azure Adding tags for resources Integrate review comments to add random id to name Add tags, capacity and reserved for service plan Minor Fixes for documentation Integrate review comments related to resource naming Remove Optional and Required in variables.tf Update variables.tf Update Service Plan Tier to Isolated squaching commits applied base image suggestions from nick * squashing commits and slimming down the build image * removing go* path from azure devops pipeline as we removed go mods * refactoring our azure devops pipeline so it's aligned with the local test runner * fixing azure devops pipeline bug * fixing base image build variable reference bug * Addressing nick's PR comments * resolving issue with failed builds after completing branches merges * addressing a bug where test harness directory changes were not getting picked up by the harness * removing local echo statement * Adding directory exists check and app service container command variable * addressing nick's PR comments * adding git diff extension whitelist filter * Overhauling main project readme * Adding james to the readme * Update README.md * Updating readme from the test-harness directory
Steps to test
Change into the
./setup
folder.Run the script
./acr-sp-init.sh
with necessary parameter values. For example:./acr-sp-init.sh -c contoso -l eastus
After the script completes successfully, test the results using the following commands:
#31