<span>I recently updated a docker image used by an existing pipeline. But the pipeline continues to use a older (cached?) image.<br><br>Old image sha: af561898ba<br>New image sha: 4d1f87d6c1<br><br>I've tried deleting the cache (not positive I did this correctly, we don't have any caching defined) and manually pulling the latest image in the pipeline yaml:<br><br>- docker pull company/project:latest<br><br>Which succeeds:</span>
<span><br>Digest: sha256:4d1f87d6c1f8cec1e816558d176c2202feb3cb3c7a2f79321462e8b1b7f8275e</span>Status: Downloaded newer image for $DOCKERHUB_USERNAME/<span>project</span>:latest<br><a href="http://aa" rel="noopener nofollow noreferrer" target="_blank">docker.io/$DOCKERHUB_USERNAME/<span>project</span>:latest</a>
<span><br>Digest: sha256:4d1f87d6c1f8cec1e816558d176c2202feb3cb3c7a2f79321462e8b1b7f8275e</span>
Status: Downloaded newer image for $DOCKERHUB_USERNAME/<span>project</span>:latest<br>
<a href="http://aa" rel="noopener nofollow noreferrer" target="_blank">docker.io/$DOCKERHUB_USERNAME/<span>project</span>:latest</a>
<span>But the later steps of the yaml still continue to use the older image:</span>
<code>From the 'Build Setup':<br>
<span>Images used:<br></span>build : <a href="http://aa" rel="noopener nofollow noreferrer" target="_blank">docker.io/$DOCKERHUB_USERNAME/project@sha256:af561898bae54681f84551a1d4d4bc5aeeaa528e1d4097221dd671d553af6e5d</a>
<span>Images used:<br></span>
build : <a href="http://aa" rel="noopener nofollow noreferrer" target="_blank">docker.io/$DOCKERHUB_USERNAME/project@sha256:af561898bae54681f84551a1d4d4bc5aeeaa528e1d4097221dd671d553af6e5d</a>
<br>The new image is available and 100% working, I was able to manually pull it and test it locally outside of the pipe. I also deleted all previous images on docker, so this must be a cached version via bitbucket some how.<br><br>I think I need help a) clearing the docker image cache on bitbucket, or b) forcing pipe to use a specific docker image. I've already tried:<br><br>image:<br>name: <span>company/project:latest</span><br>username: $DOCKERHUB_USERNAME<br>password: $DOCKERHUB_PASSWORD<br>email: $DOCKER_IMAGE_REGISTRY_EMAIL<br><br>for b) but it has no affect.
I remember we ran into this a few years ago. Our solution is that we update the Docker image only from the Pipeline with a custom build, which somehow flushes the previously cached Docker image.
It roughly looks like this (with parts removed):
pipelines: default: ... removed tags: 'docker-wdio-*': - step: image: atlassian/default-image:3 name: Update Pipeline Docker image caches: - docker services: - docker script: - cd test/synthetic - docker build -t midoriglobal/carchc-wdio:latest . - docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD - docker push midoriglobal/carchc-wdio:latest custom: wdio-tests: - step: image: midoriglobal/carchc-wdio:latest name: Browser tests caches: - node script: .... removed
As you see, you have to run the build "docker-wdio-*" to update the image, which will be used in all future "wdio-tests" builds.
I hope this helps.
Hi Stephen,
I would suggest creating a ticket with the support team about this issue. If we have an open support ticket, the engineer working on it will be able to access additional logs and investigate.
You can create a ticket via https://support.atlassian.com/contact/#/, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. Please make sure to provide the build URL in the ticket description, so we can check the build logs and additional logs.
Kind regards,Theodora
Appreciate the information, but unfortunately I wasn't able to get this to work either.
It looks like you're new here. Sign in or register to get started.