-
Notifications
You must be signed in to change notification settings - Fork 52
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
add configuration-as-code plugin to Bill of Material #78
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
19a2a44
add configuration-as-code plugin to Bill of Material
jetersen 4ed68ce
copy-pasta'd too hard
jetersen 180d23d
bump jcasc to v1.30
jetersen e74cf6c
Merge branch 'master' into feat/addJCasC
jetersen 6e805fe
add intellij items to gitignore
jetersen 13bae09
test out git client 3.0.0-beta11
jetersen 415436f
Merge branch 'master' into feat/addJCasC
jetersen 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 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 |
---|---|---|
@@ -1 +1,3 @@ | ||
target | ||
.idea/ | ||
*.iml |
This file contains 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 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
22 changes: 22 additions & 0 deletions
22
sample-plugin/src/test/java/io/jenkins/tools/bom/sample/ConfigurationAsCodeTest.java
This file contains 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,22 @@ | ||
package io.jenkins.tools.bom.sample; | ||
|
||
import io.jenkins.plugins.casc.misc.ConfiguredWithCode; | ||
import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithCodeRule; | ||
import jenkins.model.Jenkins; | ||
import org.junit.ClassRule; | ||
import org.junit.Test; | ||
|
||
import static org.hamcrest.MatcherAssert.assertThat; | ||
import static org.hamcrest.core.Is.is; | ||
|
||
public class ConfigurationAsCodeTest { | ||
|
||
@ClassRule | ||
@ConfiguredWithCode("configuration-as-code.yml") | ||
public static JenkinsConfiguredWithCodeRule j = new JenkinsConfiguredWithCodeRule(); | ||
|
||
@Test | ||
public void smokes() { | ||
assertThat(Jenkins.get().getSystemMessage(), is("Hello World")); | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
sample-plugin/src/test/resources/io/jenkins/tools/bom/sample/configuration-as-code.yml
This file contains 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,2 @@ | ||
jenkins: | ||
systemMessage: "Hello World" |
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.
A bit more interesting to configure some object defined in this plugin, but good enough for now I guess.
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.
There is nothing really interesting to configure in JCasC 😆
Though we could use it to smoke test all other plugins 😆
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 mean, currently this plugin does not define any global settings, but it could. Whether that would make test coverage any more meaningful for BOM updates is another question.
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.
91d7c3e hmm
@MarkEWaite 😅
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.
Just wanna state BOM and PCT is pretty awesome! Kudos 😍
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.
Should I remove the test?
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.
It is fine.