Skip to content

Make this test compatible with Jenkins 2.307+ #167

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

Merged
merged 1 commit into from
Sep 11, 2021

Conversation

daniel-beck
Copy link
Member

" echo \"My name on master is ${env.NODE_NAME} using labels ${env.NODE_LABELS}\"\n" +
"}\n",
true));
r.assertLogContains("My name on master is master using labels master", r.assertBuildStatusSuccess(p.scheduleBuild2(0)));
r.assertLogContains("My name on master is master using labels " + builtInNodeLabel, r.assertBuildStatusSuccess(p.scheduleBuild2(0)));
Copy link
Member Author

Choose a reason for hiding this comment

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

This is awkward; I missed NODE_NAME being defined in

so Freestyle and Pipeline are out of sync now.

Copy link
Member Author

Choose a reason for hiding this comment

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

WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "workflow-test");

p.setDefinition(new CpsFlowDefinition(
"node('master') {\n" +
"node('" + builtInNodeLabel + "') {\n" +
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"node('" + builtInNodeLabel + "') {\n" +
"node('built-in || master') {\n" +

would also work right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.

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

Successfully merging this pull request may close these issues.

3 participants