https://github.com/andrebriggs/monorepo-example
https://github.com/andrebriggs/monorepo-example
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/andrebriggs/monorepo-example
- Owner: andrebriggs
- Created: 2019-08-28T20:04:19.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-29T04:11:16.000Z (over 6 years ago)
- Last Synced: 2025-03-04T21:42:14.689Z (over 1 year ago)
- Language: Dockerfile
- Size: 88.9 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Monorepo Example
Welcome to the Monorepo. Changes at the top level won't trigger any builds.
Each "service" builds an image and pushes to an ACR instance with the image format of `servicename:branch-buildid`

You can see the associated Azure Dev Ops Pipelines here: https://dev.azure.com/abrig/bedrock_gitops_v2/_build
## Creating ACR
$ az group create --name my-resourcegroup --location eastus
$ az acr create --resource-group my-resourcegroup --name replaceme --sku Basic
## Setting up ACR permissions
#!/bin/bash
# Modify for your environment.
# ACR_NAME: The name of your Azure Container Registry
# SERVICE_PRINCIPAL_NAME: Must be unique within your AD tenant
ACR_NAME=replaceme
SERVICE_PRINCIPAL_NAME=myspname
# Obtain the full registry ID for subsequent command args
ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query id --output tsv)
# Create the service principal with rights scoped to the registry.
# Default permissions are for docker pull access. Modify the '--role'
# argument value as desired:
# acrpull: pull only
# acrpush: push and pull
# owner: push, pull, and assign roles
SP_PASSWD=$(az ad sp create-for-rbac --name http://$SERVICE_PRINCIPAL_NAME --scopes $ACR_REGISTRY_ID --role owner --query password --output tsv)
SP_APP_ID=$(az ad sp show --id http://$SERVICE_PRINCIPAL_NAME --query appId --output tsv)
# Output the service principal's credentials; use these in your services and
# applications to authenticate to the container registry.
echo "Service principal ID: $SP_APP_ID"
echo "Service principal password: $SP_PASSWD"