How to build in specify container in freestyle job when using Kubernetes plugin?

22 views
Skip to first unread message

徐志远

unread,
Oct 29, 2018, 8:56:25 AM10/29/18
to Jenkins Users

I set up a Container Template as follows, and want to execute shell in it


Untitled picture.png



but when I use label "pyenv" in freestyle job and use python, I got error message:

+ whoami

jenkins

+ python -V

python: command not found

+ pip install python-jenkins

line 17: pip: command not found

 

it seems the script run in "jnlp container", instead of "python container".

 

I searched a lot and found "container" argument could be defined in "pipeline", but how can I specify to build in certain container in freestyle job?

Carlos Sanchez

unread,
Oct 29, 2018, 9:04:03 AM10/29/18
to jenkins...@googlegroups.com
you can't, you can only do it with pipeline jobs

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/253c79b2-bc5a-4b9d-ae51-f079d9fb0d37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages