-
-
Notifications
You must be signed in to change notification settings - Fork 470
fixes #339 by adding appropriate getters #346
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
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
63c231c
fixes #339 by adding appropriate getters
bb36917
fixes #339 by updating to J8, adding artifacts and adjusting getJobXm…
72d4a8f
fixes #339 by adding computer.setClient() and some missing setJenkins…
b1b6a24
fixes #339 by adding forgotten part of the commit
36aafd4
#339: enhance the test
b64581a
#339: now finally fixing the issue with artifact.getBuildWithDetails()
46ba9b2
#339 (tempoarirly) ignoring getJobXmlShouldReturnTheExpectedConfigXml…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
jenkins-client-it-docker/jobs/test/builds/1/archive/artifact1.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this is artifact1 |
1 change: 1 addition & 0 deletions
1
jenkins-client-it-docker/jobs/test/builds/1/archive/sub folder/artifact2.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this is artifact2 in the "sub folder" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...docker/src/test/java/com/offbytwo/jenkins/integration/NoExecutorStartedGetArtifactIT.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.offbytwo.jenkins.integration; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.io.IOException; | ||
|
||
import org.testng.annotations.BeforeMethod; | ||
import org.testng.annotations.Test; | ||
|
||
import com.offbytwo.jenkins.model.Artifact; | ||
import com.offbytwo.jenkins.model.BaseModel; | ||
import com.offbytwo.jenkins.model.Build; | ||
|
||
@Test(groups = { Groups.NO_EXECUTOR_GROUP }) | ||
public class NoExecutorStartedGetArtifactIT extends AbstractJenkinsIntegrationCase { | ||
|
||
private Build build; | ||
|
||
@BeforeMethod | ||
public void beforeMethod() throws IOException { | ||
build = jenkinsServer.getJob("test").getBuildByNumber(1); | ||
} | ||
|
||
@Test | ||
public void getBuildShouldContainTwoArtifacts() throws IOException { | ||
assertThat(build.details().getArtifacts()).hasSize(2); | ||
} | ||
|
||
@Test | ||
public void traverseFromArtifactToJenkinsServerShouldNotFail() throws IOException { | ||
build.details().getArtifacts().forEach(a -> assertArtifact(a)); | ||
} | ||
|
||
private void assertArtifact(Artifact artifact) { | ||
assertBaseModel(artifact); | ||
assertBaseModel(artifact.getBuildWithDetails()); | ||
assertBaseModel(artifact.getBuildWithDetails().getBuild()); | ||
assertBaseModel(artifact.getBuildWithDetails().getBuild().getJobWithDetails()); | ||
assertBaseModel(artifact.getBuildWithDetails().getBuild().getJobWithDetails().getJob()); | ||
assertThat(artifact.getBuildWithDetails().getBuild().getJobWithDetails().getJenkinsServer()).isNotNull(); | ||
assertThat(artifact.getBuildWithDetails().getBuild().getJobWithDetails().getJob().getJenkinsServer()).isNotNull(); | ||
} | ||
|
||
private void assertBaseModel(BaseModel baseModel) { | ||
assertThat(baseModel).isNotNull(); | ||
// TODO: this will work once #337 is fixed: assertThat(baseModel.getClient()).isNotNull(); | ||
} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a separate PR for upgrading Java version? This needs also to be made clear in ReleaseNotes ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to maven-compiler-plugin should be part of the PR...
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created #358 and a PR for this topic.
Could we maybe have a chat/call to discuss a more general topic?