Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use label as pod name when not set #375

Merged
merged 14 commits into from
Jan 1, 2019
Merged

Use label as pod name when not set #375

merged 14 commits into from
Jan 1, 2019

Conversation

carlossg
Copy link
Contributor

Use better labels in tests to identify runaway pods

Use better labels in tests to identify runaway pods
@@ -69,8 +69,8 @@ public void runInPod() throws Exception {
List<PodTemplate> templates = cloud.getAllTemplates();

PodTemplate template = null;
while ((template = podTemplateWithLabel("mypod", templates)) == null) {
LOGGER.log(Level.INFO, "Waiting for mypod template to be created");
while ((template = podTemplateWithLabel("runInPod", templates)) == null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use a TestName rule to make it generic

@yrsurya
Copy link

yrsurya commented Nov 8, 2018

Hi @carlossg , I am trying to use a custom image with amazonlinux as base image, can you please let me know if that possible.

The default jnlp agent image used can be customized by adding it to the template

containerTemplate(name: 'jnlp', image: 'jenkins/jnlp-slave:3.10-1-alpine', args: '${computer.jnlpmac} ${computer.name}'),

I find this on documentation but stil it using alpine image.

much appreciated

@carlossg
Copy link
Contributor Author

carlossg commented Nov 9, 2018

@yrsurya you should use jenkins-user mailing list for questions

@carlossg carlossg merged commit 0a87618 into master Jan 1, 2019
@carlossg carlossg deleted the pod-name branch January 1, 2019 12:01
@HerrmannHinz
Copy link

this means instead of jenkins-slave-xxxx the pods now will be called like label-name-xxxx?
yay? yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants