Automation: how to use docker image from private project's package repository?

Hi,

Perhaps, I missed something, but I didn't found any example or guide how to use an image from Jetbrains package repository in an automation script.

Here is an example:
https://www.jetbrains.com/help/space/build-and-run-tests-in-gradle-project.html#build-the-project-and-run-tests-in-a-custom-container-image

also there are two env varaibles:

https://www.jetbrains.com/help/space/automation-environment-variables.html#authentication

But it's not clear how these vars should be assigned/used.

Do space automation job creates those credentials automatically ?
Should I login into project's package repository manually inside job ?

Finally it doesn't work for me:

job("Build and run tests") {
container("mycompanynamehere.registry.jetbrains.space/p/xxx/xxx-containers/automation:1.0") {
mountDir = "/mnt/space"
workDir = "/mnt/space/work"

kotlinScript { api ->
api.gradlew("build --init-script $mountDir/system/gradle/init.gradle")
}
}
}


failed due to:

Container(s) failed to start: main: CannotPullContainerError: Error response from daemon: pull access denied for mycompanynamehere.registry.jetbrains.space/p/xxx/xxx-containers/automation, repository does not exist or may require 'docker login': denied: access to repository p/xxx


1
6 comments

Hi Sergei, my colleague has just added a comment in the issue you created. Could you please check it?

0

Hi Pavel, sure. Already answered.

0

Hi
I am having the same issue with a manually pushed docker image within the same project. Did you manage to find a solution?

0

Hi Ignat,

I have no issue with manual pushing (yet), I cannot push images from automation jobs only. I filled the ticket (link above) - not yet resolved.

0

Hi Sergei

I found a way to get the image to pull from a space registry

Go to System Settings > Pacakge Repositories and attach the repo to your project. 

You will get a project registry link with the containers in it which automation can be used.

0

Please sign in to leave a comment.