Describe the bug
Command Name
az acr task create
Errors:
Operation returned an invalid status 'Conflict'
Full message:
{"error":{"code":"ProviderCall","message":"Failed to create webhook for repository: 'https://github.com/user_name/demo_repo.git#main'. For more information on how to create source triggers see the tutorial https://aka.ms/acr/tasks/tutorial-git-trigger.. InnerErrors: Request:","target":"GitHub","details":[{"code":"Forbidden","message":null,"target":null}]}}
Note: My token has all the permissions.
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- Create an internal repo in the GitHub enterprise account
- Build a base image using
az acr build --registry myregistry --image base_image:0.1 --file base.Dockerfile .
base.Dockerfile:
FROM python:3.9-slim-buster
- Use base image in
demo.Dockerfile
demo.Dockerfile:
FROM myregistry.azurecr.io/base_image:0.1
RUN echo "dummy output"
-
az acr task create
--registry myregistry \
--name demo_task \
--image demo_image:tag \
--file demo.Dockerfile
--context https://github.com/user_name/demo_repo.git#main \
--git-access-token my_token
--debug
Repo structure (main branch)
demo_repo
|-- base.Dockerfile
|-- demo.Dockerfile
Expected Behavior
- When base image is updated and pushed
acr, demo image should get updated
- When dockerfile is updated/pushed to repo
Environment Summary
Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.31, Ubuntu 20.04.4 LTS
Python 3.10.5
Installer: DEB
azure-cli 2.39.0
I have tried to use local path for --context (like --context /home/user/demo_repo/), it throws the below error:
azure.core.exceptions.HttpResponseError: (ContextUndefined) Cannot determine the build context for the step of the task 'demo_task'. Either the context should be a well formed absolute URI or there should be only one source trigger for the task.
Code: ContextUndefined
Message: Cannot determine the build context for the step of the task 'demo_task'. Either the context should be a well formed absolute URI or there should be only one source trigger for the task.
Target: request
Describe the bug
Command Name
az acr task createErrors:
Full message:
Note: My token has all the permissions.
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az acr build --registry myregistry --image base_image:0.1 --file base.Dockerfile .base.Dockerfile:
demo.Dockerfiledemo.Dockerfile:
Repo structure (main branch)
Expected Behavior
acr, demo image should get updatedEnvironment Summary
I have tried to use local path for --context (like --context /home/user/demo_repo/), it throws the below error: