简体   繁体   中英

Trigger jenkins job by a specific dockerhub repository tag

I want to trigger jenkins job when a new Docker-image is builds in DockerHub in a specific tag.

The setup works fine with a default tag that is lastest.

Jenkins config:

Specified repositories will trigger this job:

mydockerhub/appname

However it doesn't work when I specify a tag like:

mydockerhub/appname:tags/testing

Can anyone let me know how I can fix this?

The correct syntax for tagging a docker image is:

docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

You cannot use a slash inside your tag. Use underscore or a dot instead.

Reference: https://docs.docker.com/engine/reference/commandline/tag/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM