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

[JENKINS-33358] Test against 2.73.x since that includes Groovy 2.4.11 #41

Merged
merged 3 commits into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
buildPlugin(jenkinsVersions: [null, '2.32.3', '2.47'])
buildPlugin(jenkinsVersions: [null, '2.60.3', '2.73.1'])
Copy link
Member Author

Choose a reason for hiding this comment

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

2.7.x–2.47 uses one version of Groovy, 2.48–2.60.x another, 2.61+ yet another. At least we are dropping 1.x!

8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.31</version>
<version>2.33</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down Expand Up @@ -62,8 +62,8 @@
</pluginRepository>
</pluginRepositories>
<properties>
<jenkins.version>1.642.3</jenkins.version>
<workflow-cps-plugin.version>2.30</workflow-cps-plugin.version>
<jenkins.version>2.7.3</jenkins.version>
<workflow-cps-plugin.version>2.39</workflow-cps-plugin.version>
Copy link
Member Author

Choose a reason for hiding this comment

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

last security advisory

<git-plugin.version>3.1.0</git-plugin.version>
<scm-api-plugin.version>2.1.1</scm-api-plugin.version>
<workflow-scm-step-plugin.version>2.4</workflow-scm-step-plugin.version>
Expand Down Expand Up @@ -108,7 +108,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.27</version>
<version>1.33</version>
Copy link
Member Author

Choose a reason for hiding this comment

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

ditto, plus some follow-up fixes likely to affect testing of Groovy-heavy code like this

Copy link
Member

Choose a reason for hiding this comment

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

We could theoretically go straight to 1.34, but 1.33 is good enough, yeah.

</dependency>
<dependency>
<groupId>org.apache.ivy</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void setLibraries(List<LibraryConfiguration> libraries) {
@Override public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
if (Jenkins.getActiveInstance().hasPermission(Jenkins.RUN_SCRIPTS)) {
setLibraries(Collections.<LibraryConfiguration>emptyList()); // allow last library to be deleted
// TODO https://github.com/jenkinsci/jenkins/pull/2509 super.configure(req, json)
// TODO 2.19+ super.configure(req, json)
req.bindJSON(this, json);
return true;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static void doRetrieve(String name, boolean changelog, @Nonnull SCM scm, FilePat
}
}

// TODO 1.652 has tempDir API but there is no API to make other variants
// TODO there is WorkspaceList.tempDir but no API to make other variants
private static String getFilePathSuffix() {
return System.getProperty(WorkspaceList.class.getName(), "@");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ public class GrapeTest {

// TODO test transitive dependencies; need to find something in Central which has a dependency not in this plugin’s test classpath and which could be used easily from a script

@Ignore("TODO ClassNodeResolver.tryAsLoaderClassOrScript swallows the CompilationFailedException and throws a generic GroovyBugError; fixed in Jenkins 2 / Groovy 2")
Copy link
Member Author

Choose a reason for hiding this comment

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

Can finally have automated tests cover Jenkins 2 behaviors.

@Test public void nonexistentLibrary() throws Exception {
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
Expand All @@ -108,7 +107,6 @@ public class GrapeTest {
});
}

@Ignore("TODO ditto")
@Test public void nonexistentImport() throws Exception {
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
Expand Down Expand Up @@ -144,7 +142,7 @@ public class GrapeTest {
});
}

@Ignore("TODO works in Jenkins 2 / Groovy 2; in 1, fails with (concealed): unable to resolve class org.jenkinsci.plugins.docker.workflow.Docker")
@Ignore("TODO fails on CI and inside a Docker container, though for different reasons: `download failed` vs. `/var/maven/.groovy/grapes/resolved-caller-all-caller-working61.xml (No such file or directory)`; and a test-scoped dep on docker-workflow:1.7 does not help")
@Test public void useSource() throws Exception {
story.addStep(new Statement() {
@Override public void evaluate() throws Throwable {
Expand Down