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-55920: add CasC support to GitHubPluginConfig w/Tests #210

Closed
wants to merge 6 commits into from

Conversation

er1c
Copy link
Contributor

@er1c er1c commented Mar 2, 2019

This is based upon both #205 and #209

I can rebase the PR once #209 is addressed to make the PR cleaner.


This change is Reviewable

pom.xml Outdated
<dependency>
<groupId>io.jenkins</groupId>
<artifactId>configuration-as-code</artifactId>
<version>1.0</version>
Copy link
Member

Choose a reason for hiding this comment

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

use the latest released version please (1.7) https://github.com/jenkinsci/configuration-as-code-plugin/releases

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

Could you point the base branch to be your java 8 PR so the differences can be seen?

@jetersen
Copy link
Member

jetersen commented Mar 3, 2019

@er1c would be great if you could rebase:
This diff is no good: dgarzon/github-plugin@HOTFIX-add-casc-support...er1c:HOTFIX-add-casc-support

@er1c
Copy link
Contributor Author

er1c commented Mar 3, 2019

@Casz er1c#1

Copy link
Member

@jetersen jetersen left a comment

Choose a reason for hiding this comment

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

Please see the updated https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/PLUGINS.md#how-to-test

I suggest you add an export test as well 😄

pom.xml Outdated Show resolved Hide resolved
@er1c
Copy link
Contributor Author

er1c commented Apr 21, 2019

This has been rebased, and the outstanding review comments addressed.

@KostyaSha KostyaSha requested a review from jglick April 21, 2019 21:09
@Test
@ConfiguredWithCode("configuration-as-code.yml")
public void export_configuration() throws Exception {
/* TODO (From JCASC): Need to provide some YAML assertion library so that the resulting exported yaml
Copy link
Member

Choose a reason for hiding this comment

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

We need to update the plugin docs but it is being tested in this way in a few plugins and in the configuration-as-code repo:
https://github.com/jenkinsci/azure-keyvault-plugin/blob/master/src/test/java/org/jenkinsci/plugins/azurekeyvaultplugin/ConfigAsCodeTest.java#L33

Copy link
Member

Choose a reason for hiding this comment

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

@@ -0,0 +1,17 @@
unclassified:

githubpluginconfig:
Copy link
Member

Choose a reason for hiding this comment

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

maybe another more minimal test which shows what you need if you set manage hooks false and no hook url?

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Removing my request for review as I work on neither this plugin nor configuration-as-code.

@startnow65
Copy link

@er1c Thanks for the good work!
Any idea when this would be merged ? I need this so I can set my hook url with JCasC.

Thanks

@oleg-nenashev oleg-nenashev self-requested a review June 14, 2019 11:17
public void export_configuration() throws Exception {
/* TODO (From JCASC): Need to provide some YAML assertion library so that the resulting exported yaml
stream can be checked for expected content. */
ConfigurationAsCode.get().export(System.out);
Copy link
Member

@KostyaSha KostyaSha Jun 16, 2019

Choose a reason for hiding this comment

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

never user System.out, use loggers if you want to print something.

@m-barthelemy
Copy link

Hi, we're having this issue where hookUrl is ignored in configuration as code.
This PR seems to fix it. Will it get merged?

@oleg-nenashev
Copy link
Member

I'd guess https://github.com/jenkinsci/github-plugin/pull/210/files#r277181851 is still a blocker, no?

@thirstydeveloper
Copy link

Any movement on this? My team is blocked by not being able to set the overrideHookUrl property.

@MaesterZ
Copy link

MaesterZ commented Aug 9, 2019

Basically the only thing to set manually at startup or after a Jenkins upgrade. I would be happy to help with this issue, I can do some testing but I am no Java/Groovy dev.

@thefirstofthe300
Copy link

Based on @er1c's Github contribution history, it looks like he probably doesn't have bandwidth to work on this anymore. Does anyone here have the Java experience to take over this PR?

I am also hitting this particular issue.

@er1c
Copy link
Contributor Author

er1c commented Sep 3, 2019

Based on @er1c's Github contribution history, it looks like he probably doesn't have bandwidth to work on this anymore. Does anyone here have the Java experience to take over this PR?

I am also hitting this particular issue.

I'm currently slammed and don't have time for this. For anyone who is blocked, you can work around it via: https://gist.github.com/er1c/c057640d43c0dce149b0a0c23d1ce153#file-jenkins-github-yaml-L80

I think the remaining "todos" are straightforward, it mostly just needs someone to steward the PR. You probably don't need much java experience :)

@KostyaSha KostyaSha mentioned this pull request Oct 7, 2019
@KostyaSha KostyaSha closed this Oct 7, 2019
@jetersen
Copy link
Member

jetersen commented Oct 8, 2019

Thanks @er1c for picking this up 👍

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