Hi,
Not sure if anyone else is having the same issue. We have a pipeline that uploads maven artifacts into our JFrog artifactory using JFrogDev/artifactory-maven:0.3.3 pipe. Today all of our pipeline builds failed due to an error:
docker: Error response from daemon: Get https://jfrog-int-docker-open-docker.bintray.io/v2/artifactory-maven/manifests/0.3.3: unauthorized: Unauthorized.
Even the pipeline runs that were successful before fail now if I manually trigger them again.
The pipeline config is simple:
image: maven:3.3.9
clone:
enabled: true
depth: full
pipelines:
default:
- step:
caches:
- maven
script:
- pipe: JfrogDev/artifactory-maven:0.3.3
variables:
ARTIFACTORY_URL: 'xxxxxx'
ARTIFACTORY_USER: 'xxxxxx'
ARTIFACTORY_PASSWORD: 'xxxxxx'
MAVEN_SNAPSHOT_REPO: 'libs-snapshot'
MAVEN_RELEASE_REPO: 'libs-release'
MAVEN_COMMAND: 'clean test install'
Not sure if it is a problem of bitbucket or jfrog, but all the builds (and hence releases) are blocked at the moment, so any help would be very much appreciated.
Thanks
Xinchao
Hey there , We had a similar issue and were able to solve it by adding
services:
- docker
to our build steps in our bitbucket-pipeline.yml
for you it could be somethign like
image: maven:3.3.9
clone:
enabled: true
depth: full
pipelines:
default:
- step:
caches:
- maven
script:
- pipe: JfrogDev/artifactory-maven:0.3.3
variables:
ARTIFACTORY_URL: 'xxxxxx'
ARTIFACTORY_USER: 'xxxxxx'
ARTIFACTORY_PASSWORD: 'xxxxxx'
MAVEN_SNAPSHOT_REPO: 'libs-snapshot'
MAVEN_RELEASE_REPO: 'libs-release'
MAVEN_COMMAND: 'clean test install'
services:
- docker
I hope this helps :)
Thanks! I've tried it and it indeed works.
BTW after that I have kicked off a few previously failed pipeline runs again (against the original commits) just to double check if it is the adding of the docker service that made the difference. The weird thing is that now all of them are running fine.
Yesterday I've indeed raised a ticket for JFrog too after talking to the Bitbucket support. So JFrog might have fixed something from their side as well, but they haven't replied my email so I cant be sure.
Do you know why adding the docker service fixes the issue? I am leaving the change in my config as it looks promising. But still good know the rationale behind it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes that is correct. the reason is the docker image is then cached and never has to go out again and therefore a docker login is not required.
EDIT : Rethinking this the reason is there is a docker login that is logged in with that token. So you wouldn't require another docker login. So all subsequent builds are logged in. This is an assumption and it's based on how they do a pull for the image and at what level i,e which docker image it is actually pulled in
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.