profile
viewpoint
Jesse Glick jglick @cloudbees Chapel Hill NC

jenkins-infra/pipeline-library 210

Collection of custom steps and variables for our Jenkins instance(s)

jenkinsci/acceptance-test-harness 111

Acceptance tests cases for Jenkins and its plug-ins based on selenium and docker.

jenkinsci/build-pipeline-plugin 111

Build Pipeline Plugin

jenkinsci/cobertura-plugin 107

Jenkins cobertura plugin

jenkinsci/credentials-plugin 96

Provides Jenkins with extension points to securely store, manage, and bind credentials data to other Jenkins plugins, builds, pipelines, etc.

cloudbees/groovy-cps 89

Groovy execution in the continuation passing style

jenkinsci/active-choices-plugin 82

This plugin provides new scripted, dynamic parameters for freestyle jobs that can be rendered as combo-boxes, check-boxes, radio-buttons or rich HTML UI widgets.

jenkinsci/copyartifact-plugin 57

Jenkins copyartifact plugin

jenkinsci/active-directory-plugin 48

Jenkins active-directory plugin

pull request commentjenkins-infra/repository-permissions-updater

Enable CD for `external-monitor-job`

Now I can see https://github.com/jenkinsci/external-monitor-job-plugin/settings/secrets/actions and it is empty. Is the RPU job not running?

jglick

comment created time in 2 days

PullRequestReviewEvent

pull request commentjenkins-infra/repository-permissions-updater

Enable CD for `external-monitor-job`

Have no admin rights to the plugin repo so cannot tell if this worked.

jglick

comment created time in 2 days

PR closed jenkinsci/external-monitor-job-plugin

Add junit test for set-external-build-result CLI command tests

Bump parent pom version to 1.511. We need even higher to get CLICommandInvoker class for granted. However, since parent pom 1.512 version both legacy and new unit test frameworks are broken: TopLevelItemDescriptor can not be retrieved any more. As a work around copy temporary CLICommandInvoker in our test and remove it once the problem with unit test framework is ssolved.

+202 -1

7 comments

2 changed files

davido

pr closed time in 2 days

pull request commentjenkinsci/external-monitor-job-plugin

Add junit test for set-external-build-result CLI command

Test does not pass and has a variety of issues blocking it from working. Not going to spend time fixing up the current PR.

davido

comment created time in 2 days

push eventjglick/external-monitor-job-plugin

Jesse Glick

commit sha 985048ec49ea7ad24b93699de8c35071149f639d

Minimizing diff

view details

push time in 2 days

create barnchjglick/external-monitor-job-plugin

branch : jlehtnie/master

created branch time in 2 days

Pull request review commentjenkinsci/external-monitor-job-plugin

Add support for parsing build result from string

 private void setCharset(String c) { // JENKINS-14107         charset = c;     } +    private Result parseResult(String text) {+        Result result;+        Scanner sc = new Scanner(text);+        if (sc.hasNextInt()) {

Probably better to use Integer.parseInt + catch (NumberFormatException but OK.

jlehtnie

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventjenkinsci/external-monitor-job-plugin

Zbynek Konecny

commit sha 3f601df7898dfbaa48c9322d64bde190bb57a71f

Copy Readme from the Wiki

view details

Zbynek Konecny

commit sha 4ed243958cbac2e91bbd0017b7b5dae71176077c

Copy Changelog from the Wiki

view details

Zbynek Konecny

commit sha a4d35ebf0c542be8420bdbd8ff7a8a3a6025b2d1

Link Changelog from Readme

view details

Zbynek Konecny

commit sha 4a7bf5f9966e8a46a12eeedd8269db94ef4319be

Use GitHub as the source of documentation

view details

Jesse Glick

commit sha 94da8c68fa47efb571cb5777dfa12240dad313ef

Merge pull request #19 from zbynek/master Use GitHub as the source of documentation

view details

push time in 2 days

PR merged jenkinsci/external-monitor-job-plugin

Use GitHub as the source of documentation documentation

See https://issues.jenkins-ci.org/browse/WEBSITE-637

+186 -1

0 comment

3 changed files

zbynek

pr closed time in 2 days

delete branch jglick/repository-permissions-updater

delete branch : patch-2

delete time in 2 days

PullRequestReviewEvent

pull request commentjenkinsci/pipeline-github-lib-plugin

Enable CD

Hmm, https://github.com/jenkinsci/pipeline-github-lib-plugin/settings/secrets/actions not populated yet for some reason.

jglick

comment created time in 2 days

PR opened jenkins-infra/jenkins.io

Update `releasing-cd.adoc`

@agentgonzo

+82 -34

0 comment

1 changed file

pr created time in 2 days

push eventjglick/jenkins.io

Jesse Glick

commit sha 8d47a520a79d63ee5f6fb215cf590ddc19b9764a

Update releasing-cd.adoc

view details

push time in 2 days

create barnchjglick/pipeline-github-lib-plugin

branch : cd

created branch time in 2 days

PR opened jenkinsci/pipeline-github-lib-plugin

Enable CD

https://github.com/jenkins-infra/repository-permissions-updater/pull/2329 https://github.com/jenkinsci/pipeline-github-lib-plugin/pull/6#issuecomment-1018722398

+87 -5

0 comment

6 changed files

pr created time in 2 days

delete branch jglick/repository-permissions-updater

delete branch : patch-1

delete time in 2 days

PullRequestReviewEvent

Pull request review commentjenkinsci/jenkins-test-harness

Adding JenkinsRule json methods for GET, POST and PUT that allows authentication via WebClient parameter.

 public Page search(String q) throws Exception {     }      /**-     * Get JSON from A Jenkins endpoint.-     * @param path The endpoint URL.-     * @return The JSON.+     * Get JSON from a Jenkins relative endpoint. Create a new default webclient. If you want to configure the+     * webclient, for example to set a token for authentication, or accept other HTTP responses than 200, you can use+     * {@link JenkinsRule#getJSON(String, WebClient)} .+     * @param path relative path, should not start with '/'+     * @return The JSON response from server.      */     public JSONWebResponse getJSON(@NonNull String path) throws IOException {-        assert !path.startsWith("/");          JenkinsRule.WebClient webClient = createWebClient();-        Page runsPage = null;-        try {-            runsPage = webClient.goTo(path, "application/json");-        } catch (SAXException e) {-            // goTo shouldn't be throwing a SAXException for JSON.-            throw new IllegalStateException("Unexpected SAXException.", e);-        }-        WebResponse webResponse = runsPage.getWebResponse();+        return getJSON(path, webClient);+    }++    /**+     * Get JSON from a Jenkins relative endpoint.+     * You can preconfigure webClient for example to set a token for authentication, or accept error HTTP status.+     * @param path relative path, should not start with '/'+     * @param webClient a pre-configured web client.

Indicates that these should be instance methods on WebClient.

aHenryJard

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentjenkinsci/jenkins-test-harness

Adding JenkinsRule json methods for GET, POST and PUT that allows authentication via WebClient parameter.

 public Page search(String q) throws Exception {     }      /**-     * Get JSON from A Jenkins endpoint.-     * @param path The endpoint URL.-     * @return The JSON.+     * Get JSON from a Jenkins relative endpoint. Create a new default webclient. If you want to configure the+     * webclient, for example to set a token for authentication, or accept other HTTP responses than 200, you can use+     * {@link JenkinsRule#getJSON(String, WebClient)} .+     * @param path relative path, should not start with '/'+     * @return The JSON response from server.      */     public JSONWebResponse getJSON(@NonNull String path) throws IOException {-        assert !path.startsWith("/");          JenkinsRule.WebClient webClient = createWebClient();-        Page runsPage = null;-        try {-            runsPage = webClient.goTo(path, "application/json");-        } catch (SAXException e) {-            // goTo shouldn't be throwing a SAXException for JSON.-            throw new IllegalStateException("Unexpected SAXException.", e);-        }-        WebResponse webResponse = runsPage.getWebResponse();+        return getJSON(path, webClient);+    }++    /**+     * Get JSON from a Jenkins relative endpoint.+     * You can preconfigure webClient for example to set a token for authentication, or accept error HTTP status.+     * @param path relative path, should not start with '/'+     * @param webClient a pre-configured web client.+     * @return The JSON response from server.+     * @throws IOException+     */+    public JSONWebResponse getJSON(@NonNull String path, @NonNull JenkinsRule.WebClient webClient) throws IOException {+        assert !path.startsWith("/");++        URL URLtoCall = new URL(getURL(), path);+        WebRequest getRequest = new WebRequest(URLtoCall, HttpMethod.GET);+        getRequest.setAdditionalHeader("Content-Type","application/json");+        getRequest.setAdditionalHeader("Accept", "application/json");+        getRequest.setAdditionalHeader("Accept-Encoding", "*");++        return new JSONWebResponse(webClient.loadWebResponse(getRequest));+    }++    /**+     * Send JSON content to a Jenkins relative endpoint.+     * You can preconfigure webClient for example to set a token for authentication, or accept error HTTP status.+     * @param path relative path, should not start with '/'+     * @param json the json payload to send+     * @param webClient a pre-configured web client.+     * @return The JSON response from server.+     * @throws IOException+     */+    public JSONWebResponse putJSON(@NonNull String path, @NonNull JSON json, @NonNull JenkinsRule.WebClient webClient) throws IOException {+        assert !path.startsWith("/");++        URL URLtoCall = new URL(getURL(),path);+        WebRequest putRequest = new WebRequest(URLtoCall, HttpMethod.PUT);+        putRequest.setRequestBody(json.toString());+        putRequest.setAdditionalHeader("Content-Type","application/json");+        putRequest.setAdditionalHeader("Accept", "application/json");+        putRequest.setAdditionalHeader("Accept-Encoding", "*");++        return new JSONWebResponse(webClient.loadWebResponse(putRequest));+    }++    /**+     * POST JSON content to a Jenkins relative endpoint using the user token for authentication.+     * You can preconfigure webClient for example to accept error HTTP status.+     *+     * @param path relative path, should not start with '/'+     * @param json the json payload to send+     * @param webClient a pre-configured web client either with crumb or token.+     * @param user user to use for authentication+     * @return The JSON response from server.+     * @throws IOException+     */+    public JSONWebResponse postJSON(@NonNull String path, @NonNull JSON json, @NonNull WebClient webClient,+                                    @NonNull User user) throws IOException {

Now I see your point about a crumb being demanded in the case of an anonymous request, unless of course there is a CrumbExclusion. Still, clearer to have the test call one of the withBasicApiToken overloads.

aHenryJard

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentjenkinsci/jenkins-test-harness

Adding JenkinsRule json methods for GET, POST and PUT that allows authentication via WebClient parameter.

 public Page search(String q) throws Exception {     }      /**-     * Get JSON from A Jenkins endpoint.-     * @param path The endpoint URL.-     * @return The JSON.+     * Get JSON from a Jenkins relative endpoint. Create a new default webclient. If you want to configure the+     * webclient, for example to set a token for authentication, or accept other HTTP responses than 200, you can use+     * {@link JenkinsRule#getJSON(String, WebClient)} .+     * @param path relative path, should not start with '/'+     * @return The JSON response from server.      */     public JSONWebResponse getJSON(@NonNull String path) throws IOException {-        assert !path.startsWith("/");          JenkinsRule.WebClient webClient = createWebClient();-        Page runsPage = null;-        try {-            runsPage = webClient.goTo(path, "application/json");-        } catch (SAXException e) {-            // goTo shouldn't be throwing a SAXException for JSON.-            throw new IllegalStateException("Unexpected SAXException.", e);-        }-        WebResponse webResponse = runsPage.getWebResponse();+        return getJSON(path, webClient);+    }++    /**+     * Get JSON from a Jenkins relative endpoint.+     * You can preconfigure webClient for example to set a token for authentication, or accept error HTTP status.+     * @param path relative path, should not start with '/'+     * @param webClient a pre-configured web client.+     * @return The JSON response from server.+     * @throws IOException+     */+    public JSONWebResponse getJSON(@NonNull String path, @NonNull JenkinsRule.WebClient webClient) throws IOException {+        assert !path.startsWith("/");++        URL URLtoCall = new URL(getURL(), path);+        WebRequest getRequest = new WebRequest(URLtoCall, HttpMethod.GET);+        getRequest.setAdditionalHeader("Content-Type","application/json");+        getRequest.setAdditionalHeader("Accept", "application/json");+        getRequest.setAdditionalHeader("Accept-Encoding", "*");++        return new JSONWebResponse(webClient.loadWebResponse(getRequest));+    }++    /**+     * Send JSON content to a Jenkins relative endpoint.+     * You can preconfigure webClient for example to set a token for authentication, or accept error HTTP status.+     * @param path relative path, should not start with '/'+     * @param json the json payload to send+     * @param webClient a pre-configured web client.+     * @return The JSON response from server.+     * @throws IOException+     */+    public JSONWebResponse putJSON(@NonNull String path, @NonNull JSON json, @NonNull JenkinsRule.WebClient webClient) throws IOException {+        assert !path.startsWith("/");++        URL URLtoCall = new URL(getURL(),path);+        WebRequest putRequest = new WebRequest(URLtoCall, HttpMethod.PUT);+        putRequest.setRequestBody(json.toString());+        putRequest.setAdditionalHeader("Content-Type","application/json");+        putRequest.setAdditionalHeader("Accept", "application/json");+        putRequest.setAdditionalHeader("Accept-Encoding", "*");++        return new JSONWebResponse(webClient.loadWebResponse(putRequest));+    }++    /**+     * POST JSON content to a Jenkins relative endpoint using the user token for authentication.+     * You can preconfigure webClient for example to accept error HTTP status.+     *+     * @param path relative path, should not start with '/'+     * @param json the json payload to send+     * @param webClient a pre-configured web client either with crumb or token.+     * @param user user to use for authentication+     * @return The JSON response from server.+     * @throws IOException+     */+    public JSONWebResponse postJSON(@NonNull String path, @NonNull JSON json, @NonNull WebClient webClient,+                                    @NonNull User user) throws IOException {

having a User is mandatory

In a realistic installation perhaps, but plenty of functional tests do not bother setting up authentication & authorization, and just want to verify behavior of an endpoint unrelated to permission checks.

aHenryJard

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent
more