From 19a2a44d9550399c0b3f7ac1f7a53d45622a1187 Mon Sep 17 00:00:00 2001 From: Joseph Petersen Date: Tue, 27 Aug 2019 20:57:24 +0200 Subject: [PATCH 1/5] add configuration-as-code plugin to Bill of Material --- bom/pom.xml | 14 ++++++++++++ sample-plugin/pom.xml | 11 ++++++++++ .../bom/sample/ConfigurationAsCodeTest.java | 22 +++++++++++++++++++ .../bom/sample/configuration-as-code.yml | 2 ++ 4 files changed, 49 insertions(+) create mode 100644 sample-plugin/src/test/java/io/jenkins/tools/bom/sample/ConfigurationAsCodeTest.java create mode 100644 sample-plugin/src/test/resources/io/jenkins/tools/bom/sample/configuration-as-code.yml diff --git a/bom/pom.xml b/bom/pom.xml index 1e5df5621..a866d4039 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -10,6 +10,7 @@ pom 3.12.0 + 1.29 2.6.3 1.20 2.36 @@ -20,6 +21,19 @@ + + io.jenkins + configuration-as-code + ${configuration-as-code-plugin.version} + test + + + io.jenkins + configuration-as-code + ${configuration-as-code-plugin.version} + tests + test + org.jenkins-ci.plugins.workflow workflow-api diff --git a/sample-plugin/pom.xml b/sample-plugin/pom.xml index b6cc86eaa..026268ac5 100644 --- a/sample-plugin/pom.xml +++ b/sample-plugin/pom.xml @@ -41,6 +41,17 @@ + + io.jenkins + configuration-as-code + test + + + io.jenkins + configuration-as-code + tests + test + org.jenkins-ci.plugins.workflow workflow-step-api diff --git a/sample-plugin/src/test/java/io/jenkins/tools/bom/sample/ConfigurationAsCodeTest.java b/sample-plugin/src/test/java/io/jenkins/tools/bom/sample/ConfigurationAsCodeTest.java new file mode 100644 index 000000000..64e7f59d6 --- /dev/null +++ b/sample-plugin/src/test/java/io/jenkins/tools/bom/sample/ConfigurationAsCodeTest.java @@ -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")); + } +} diff --git a/sample-plugin/src/test/resources/io/jenkins/tools/bom/sample/configuration-as-code.yml b/sample-plugin/src/test/resources/io/jenkins/tools/bom/sample/configuration-as-code.yml new file mode 100644 index 000000000..eaec58af1 --- /dev/null +++ b/sample-plugin/src/test/resources/io/jenkins/tools/bom/sample/configuration-as-code.yml @@ -0,0 +1,2 @@ +jenkins: + systemMessage: "Hello World" From 4ed68ce1c11454f2dc78f7e4b71edfaded9a2801 Mon Sep 17 00:00:00 2001 From: Joseph Petersen Date: Wed, 28 Aug 2019 02:13:17 +0200 Subject: [PATCH 2/5] copy-pasta'd too hard Co-Authored-By: Jesse Glick --- bom/pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/bom/pom.xml b/bom/pom.xml index a866d4039..f393ce958 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -25,14 +25,12 @@ io.jenkins configuration-as-code ${configuration-as-code-plugin.version} - test io.jenkins configuration-as-code ${configuration-as-code-plugin.version} tests - test org.jenkins-ci.plugins.workflow From 180d23d52a092d5542dde6c227f5916452c31a26 Mon Sep 17 00:00:00 2001 From: Joseph Petersen Date: Mon, 9 Sep 2019 00:41:12 +0200 Subject: [PATCH 3/5] bump jcasc to v1.30 --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index f393ce958..a989469cb 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -9,8 +9,8 @@ bom pom + 1.30 3.12.0 - 1.29 2.6.3 1.20 2.36 From 6e805fe3beb5e86e4734dd2f15b1f09f632fbaa2 Mon Sep 17 00:00:00 2001 From: Joseph Petersen Date: Fri, 13 Sep 2019 01:50:40 +0200 Subject: [PATCH 4/5] add intellij items to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index eb5a316cb..d9e32598b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ target +.idea/ +*.iml From 13bae09b1e49a54da38948e61f08c3bd842882eb Mon Sep 17 00:00:00 2001 From: Joseph Petersen Date: Fri, 13 Sep 2019 07:26:23 +0200 Subject: [PATCH 5/5] test out git client 3.0.0-beta11 --- bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/pom.xml b/bom/pom.xml index b7c128389..8e4f01d45 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -160,7 +160,7 @@ org.jenkins-ci.plugins git-client - 2.8.4 + 3.0.0-beta11 org.jenkins-ci.plugins