File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,14 @@ echo "6. Running CPA verification (cpa verify)..."
8888docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v " $( pwd) " :/data mcr.microsoft.com/container-package-app:latest cpa verify --directory /data
8989echo " CPA verification complete."
9090
91- # 7. Run CPA buildbundle within the container
92- echo " 7. Building the CPA bundle (cpa buildbundle)..."
91+ # 7. Login to ACR and build CPA bundle
92+ echo " 7a. Logging into Azure Container Registry..."
93+ echo " ${AZURE_ACR_PASSWORD} " | docker login " ${AZURE_ACR_REGISTRY} " --username " ${AZURE_ACR_USERNAME} " --password-stdin
94+
95+ echo " 7b. Building the CPA bundle (cpa buildbundle)..."
9396# This creates the .cnab directory and the bundle file (e.g., sonarqube.cnab)
9497# in the current directory (mounted as /data in container).
95- docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v " $( pwd) " :/data mcr.microsoft.com/container-package-app:latest sh -c " echo " ${AZURE_ACR_PASSWORD} " | docker login " ${AZURE_ACR_REGISTRY} " --username " ${AZURE_ACR_USERNAME} " --password-stdin && cd /data && cpa buildbundle --force"
98+ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v " $( pwd) " :/data mcr.microsoft.com/container-package-app:latest cpa buildbundle --force
9699echo " CPA bundle built successfully."
97100echo " CPA bundle pushed to ACR successfully!"
98101
You can’t perform that action at this time.
0 commit comments