profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/carlossg/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Carlos Sanchez carlossg Adobe Spain http://csanchez.org twitter.com/csanchez

carlossg/continuous-delivery 49

Continuous deployment examples using Puppet, Jenkins, Maven, Tomcat,...

carlossg/croc-hunter-jenkinsx-serverless 22

MOVED TO https://github.com/carlossg/croc-hunter-jenkinsx

carlossg/croc-hunter-jenkinsx 19

Croc Hunter demo, deployed with Jenkins X

carlossg/croc-hunter-java 6

Croc Hunter demo using Quarkus and GraalVM, deployed with Jenkins X

carlossg/appfuse-selenium 5

Selenium test environment for Appfuse

carlossg/ansible-maven-repo 1

Access artifacts in maven repo with ansible

carlossg/augeas 1

A configuration editing tool and API

carlossg/acceptance-test-harness 0

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

carlossg/amazon-ecs-plugin 0

Amazon EC2 Container Service Plugin for Jenkins

carlossg/app 0

World Health Organization App

issue closedjenkinsci/docker-inbound-agent

[Question] what is JENKINS_SECRET for?

Hi : Could someone help me what is JENKINS_SECRET for?how can it be generated and used?I planned to setup several agents in differrent platforms,such as k8s ,docker.

closed time in 10 hours

zffocussss

issue commentjenkinsci/docker-inbound-agent

[Question] what is JENKINS_SECRET for?

The issue tracker for the docker inbound agent is used to track issues with the inbound agent. Your request seems to be a request for help, not a report of an issue or improvement.

Please use the mailing lists and the chat channels for questions. Many more people see questions there and that increasing the chance that you'll receive an answer.

zffocussss

comment created time in 10 hours

issue openedjenkinsci/docker-inbound-agent

what is JENKINS_SECRET for?

<!-- SECURITY ISSUES: Never report security issues on GitHub or other public channels (Gitter/Twitter/etc.) Follow these instruction to report security issues: https://www.jenkins.io/security/#reporting-vulnerabilities -->

Version report

Jenkins and plugins versions report:

<!-- paste below the version report from https://www.jenkins.io/doc/book/system-administration/diagnosing-errors/#how-to-report-a-bug -->

Copy/paste here....
  • What Operating System are you using (both controller, and any agents involved in the problem)?
Paste here

Reproduction steps

<!--

  • Write bullet-point reproduction steps.

  • Be explicit about any relevant configuration, jobs, build history, user accounts, etc., redacting confidential information as needed.

  • The best reproduction steps start with a clean Jenkins install, perhaps a docker run command if possible.

  • Use screenshots where appropriate, copy textual output otherwise. When in doubt, do both.

  • Include relevant logs, debug if needed - https://www.jenkins.io/doc/book/system-administration/viewing-logs/ -->

  • Step 1...

  • Step 2...

Results

Expected result:

<!-- What was your expected result? -->

Actual result:

<!-- What was the actual result? -->

created time in 14 hours

issue commentjenkinsci/docker-inbound-agent

Jnlp failing to connect to jenkins. user password expired ??

what is JENKINS_SECRET? how is it generated?

alsenydiallo

comment created time in 14 hours

created repositorymitchellh/tree-sitter-hcl

created time in a day

issue openedcarlossg/docker-maven

Maven isn't installed correctly on arm/v7 maven:adoptopenjdk

Trying to run mvn -v results in java.lang.ClassNotFoundException: org.apache.maven.cli.MavenCli

Unable to find image 'maven:adoptopenjdk' locally
adoptopenjdk: Pulling from library/maven
Digest: sha256:d12319a2437e4caa219e876d7d6ec4927199c8206bd0e7432dce2c6d7e5ddbf1
Status: Downloaded newer image for maven:adoptopenjdk
root@ef1c77fc0537:/# mvn -v
java.lang.ClassNotFoundException: org.apache.maven.cli.MavenCli
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
        at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:140)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:259)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

Doing the same on arm64 works:

 ➜ docker run -it --platform linux/arm64 maven:adoptopenjdk bash 
Unable to find image 'maven:adoptopenjdk' locally
adoptopenjdk: Pulling from library/maven
Digest: sha256:d12319a2437e4caa219e876d7d6ec4927199c8206bd0e7432dce2c6d7e5ddbf1
Status: Downloaded newer image for maven:adoptopenjdk
root@41007ac099af:/# mvn -v
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /usr/share/maven
Java version: 15.0.2, vendor: AdoptOpenJDK, runtime: /opt/java/openjdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.25-linuxkit", arch: "aarch64", family: "unix"```

created time in a day

startedcarlossg/jenkinsfile-runner-google-cloud-run

started time in 2 days

pull request commentjenkinsci/kubernetes-plugin

Fix pod template ID inconsistency over master reboots

Some discussion in JENKINS-42422 also.

fredcooke

comment created time in 5 days

issue openedjenkinsci/docker-inbound-agent

Bad PATH

<!-- SECURITY ISSUES: Never report security issues on GitHub or other public channels (Gitter/Twitter/etc.) Follow these instruction to report security issues: https://www.jenkins.io/security/#reporting-vulnerabilities -->

Hi, I am trying to declare a pod template image from the inbound agent image. I am simply installing Ruby so that I can use this in my jobs. I would have done this via the OS package manager, but that unfortunately pins the Ruby version in a cumbersome way, that does not allow for newer or older versions to be managed. It's basically the default OS edition of Ruby, or no edition. I would have done this via RVM, but RVM depends on a lot of bash/zsh configurations that do not play well with non-interactive Docker automated contexts, such as found in Jenkinsfiles commands.

I am installing Ruby from source, which uses /usr/local/bin as the default destination for the Ruby executables. As we will see, this too does not play well with non-interactive Docker automated contexts.

The Debian variant of the inbound agent Docker images fail to properly include the /usr/local/bin directory in PATH. When I try to run commands like sh 'bundle version' in my Jenkinsfile, then the worker container reports that it is unable to find this tool. Performing command -v bundle in the pod template image reveals that bundle is located in /usr/local/bin.

There is some silly bash configuration that almost helps. But, of course, most Docker interactions do not actually use bash. That is a flakey dependency. Especially given that Jenkins sh... steps do not use bash: They default to the POSIX /bin/sh interpreter.

Note that POSIX sh does not traditionally offer many ways to configure non-interactive PATH. Ordinarily, I would use /etc/login.conf and cap_mkdb to correct these gaps, as I often do in Virtual Machines (VMs). However, we are talking about Docker. cap_mkdb is unavailable here. The entire image lineage should ensure that the conventional /usr/local/bin directory is properly added to PATH. Not just for interactive or login bash sessions. But for all shell contexts.

Specifically, adding a Dockerfile directive to an image upstream, would completely solve this problem. The higher upstream this is added, the more images will be able to easily use Ruby and other common Linux software applications.

ENV PATH=/usr/local/bin:$PATH

created time in 5 days

PR opened jenkinsci/kubernetes-plugin

JENKINS 65908
  • Merge pull request #880 from Vlatombe/fix-template-removal
  • [maven-release-plugin] prepare release kubernetes-1.27.5
  • [maven-release-plugin] prepare for next development iteration
  • [JENKINS-63925] Fix migration from 1.27.1 by generating always the same id
  • [maven-release-plugin] prepare release kubernetes-1.27.6
  • [maven-release-plugin] prepare for next development iteration
  • Merge pull request #902 from jglick/KubernetesCloud.provision
  • [maven-release-plugin] prepare release kubernetes-1.27.7
  • [maven-release-plugin] prepare for next development iteration
  • [JENKINS-65908] Backport kubernetes-client-api 5.x compatibility
+341 -61

0 comment

19 changed files

pr created time in 6 days

startedcarlossg/jenkinsfile-runner-google-cloud-run

started time in 7 days

push eventjenkinsci/kubernetes-plugin

Vincent Latombe

commit sha 932a7b68f90d3d851131e18528ed227a007d5daf

Round of review on the documentation

view details

Vincent Latombe

commit sha 374b2ab748c24ce415bc7854f5ed7405e3d6bf26

Document system properties

view details

Vincent Latombe

commit sha c27a57838a24ce00dba8af657e71c19c7597e579

Rework structure

view details

Vincent Latombe

commit sha 08a125ebd6ef2bf6c06becddaa17b5eda383d0fc

Rework structure

view details

Vincent Latombe

commit sha 4934183a9f3a8b82a649e8b7706429b08d66a6cd

Rework structure

view details

Vincent Latombe

commit sha 9c0471cb6af542eedc92b51922e2cdd896190078

Review

view details

Vincent Latombe

commit sha 0e56f47a808497ca77ef575a07154f1b9a61d294

Rework

view details

Vincent Latombe

commit sha b36d5d050a6cc0c46d1e1a348db19ca30d2e27ea

Rework

view details

Vincent Latombe

commit sha 6da15203a570b33fe569e89de932314abc580261

Replace table with list

view details

Vincent Latombe

commit sha 7d2ddf6902ebce97c8aa5c2a21ed89b1e8fac24e

Fix terraform build

view details

Vincent Latombe

commit sha 193097146a7e5470678f9b98ab9061618fea4b9d

Update example

view details

Vincent Latombe

commit sha 55c3c2e3f661fa6cdf82e10d56ecfdc092adfa30

Merge branch 'master' into review-docs

view details

Vincent Latombe

commit sha fe10607fe44d45b8677429336459d453489e3a82

Add a note about running containers using the same uid

view details

Vincent Latombe

commit sha c32c86e82b54d2151512cbf1ed4854c4d2a1f408

Apply suggestions from code review Co-authored-by: Jesse Glick <jglick@cloudbees.com>

view details

Vincent Latombe

commit sha 0bebdef30410d1b4f8137e078219b715f17b9f2b

Remove stripIndent from examples

view details

Vincent Latombe

commit sha 115be01fc623a04a32bfd8de290efdefd3301cf0

Apply suggestions from code review Co-authored-by: Jesse Glick <jglick@cloudbees.com>

view details

Vincent Latombe

commit sha 16ce5564879c46cff7e8cb79e89832cf68b5760b

Mention yamlFile and link to an example

view details

Vincent Latombe

commit sha 3b3c1ec72abf79097a1bcba10ef9e97e6b7abea6

Merge pull request #1003 from Vlatombe/review-docs

view details

push time in 7 days

PR merged jenkinsci/kubernetes-plugin

Round of review on the documentation documentation
  • Updates examples with updated agent, maven and golang images.
  • List system properties and their description
  • Reorganize outline so that it is a bit better to read and understand how to use the plugin

Look at https://github.com/Vlatombe/kubernetes-plugin/tree/review-docs for the rendering and navigation.

  • [X] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • [X] Ensure that the pull request title represents the desired changelog entry
  • [X] Please describe what you did
  • [ ] Link to relevant issues in GitHub or Jira
  • [ ] Link to relevant pull requests, esp. upstream and downstream changes
  • [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue

<!-- Put an x into the [ ] to show you have filled the information. The template comes from https://github.com/jenkinsci/.github/blob/master/.github/pull_request_template.md You can override it by creating .github/pull_request_template.md in your own repository -->

+617 -474

0 comment

14 changed files

Vlatombe

pr closed time in 7 days

startedcarlossg/jenkinsfile-runner-google-cloud-run

started time in 7 days

startedcarlossg/jenkinsfile-runner-example

started time in 7 days

startedcarlossg/jenkinsfile-runner-google-cloud-run

started time in 7 days

startedcarlossg/jenkinsfile-runner-google-cloud-run

started time in 7 days

startedcarlossg/jenkinsfile-runner-google-cloud-run

started time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 docker.sock does not need to be mounted as in dood.groovy. May or may not work depending on cluster policy: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ */ podTemplate(yaml: '''-apiVersion: v1-kind: Pod-spec:-  volumes:-  - name: docker-socket-    emptyDir: {}-  containers:-  - name: docker-    image: docker:19.03.1-    command:-    - sleep-    args:-    - 99d-    volumeMounts:-    - name: docker-socket-      mountPath: /var/run-  - name: docker-daemon-    image: docker:19.03.1-dind-    securityContext:-      privileged: true-    volumeMounts:-    - name: docker-socket-      mountPath: /var/run-''') {-    node(POD_LABEL) {-        writeFile file: 'Dockerfile', text: 'FROM scratch'-        container('docker') {-            sh 'docker version && DOCKER_BUILDKIT=1 docker build --progress plain -t testing .'-        }+              apiVersion: v1

cf. https://github.com/jenkinsci/kubernetes-plugin/pull/942 . I don't have a strong opinion about this.

Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 podTemplate(yaml: """\       - name: busybox         image: busybox         command:-        - cat-        tty: true-    """.stripIndent()) {+        - sleep+        args:+        - 99d

I think there were some differences wrt handling sleep infinity but I couldn't find any non-working example with 99d

Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 podTemplate(containers: [ } ``` +or++```groovy+podTemplate(yaml:'''\+    apiVersion: v1+    kind: Pod+    spec:+      containers:+      - name: maven+        image: maven:3.8.1-jdk-8+        command:+        - sleep+        args:+        - 99d+      - name: golang+        image: golang:1.16.5+        command:+        - sleep+        args:+        - 99d+'''.stripIndent()) {

Seems to work indeed.

Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 Find more examples in the [examples dir](examples). The default jnlp agent image used can be customized by adding it to the template  ```groovy-containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:4.3-4-alpine', args: '${computer.jnlpmac} ${computer.name}'),+containerTemplate(name: 'jnlp', image: 'jenkins/inbound-agent:4.7-1', args: '${computer.jnlpmac} ${computer.name}'), ```  or with the yaml syntax -```+```yaml apiVersion: v1 kind: Pod spec:   containers:   - name: jnlp-    image: 'jenkins/inbound-agent:4.3-4-alpine'+    image: 'jenkins/inbound-agent:4.7-1'     args: ['\$(JENKINS_SECRET)', '\$(JENKINS_NAME)'] ``` -### Container Group Support+### Multiple containers support -Multiple containers can be defined for the agent pod, with shared resources, like mounts. Ports in each container can be accessed as in any Kubernetes pod, by using `localhost`.+Multiple containers can be defined for the agent pod, with shared resources, like mounts. Ports in each container can+be accessed as in any Kubernetes pod, by using `localhost`. -The `container` statement allows to execute commands directly into each container.+The `container` step allows executing commands into each container.++---+**Note**+Due to implementation constraints, there can be issues when executing commands in different containers if they run using different uids.+It is recommended to use the same uid across the different containers part of the same pod to avoid any issue.+---  ```groovy podTemplate(containers: [-    containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, command: 'cat'),-    containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: true, command: 'cat')+    containerTemplate(name: 'maven', image: 'maven:3.8.1-jdk-8', command: 'sleep', args: '99d'),+    containerTemplate(name: 'golang', image: 'golang:1.16.5', command: 'sleep', args: '99d')

Looks good on busybox-based distros (like Alpine) so I would say we're good with that.

Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 podTemplate(yaml: """\       - name: busybox         image: busybox         command:-        - cat-        tty: true-    """.stripIndent()) {+        - sleep+        args:+        - 99d+    '''.stripIndent()) {

ditto

Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 Jenkins plugin to run dynamic agents in a Kubernetes cluster. Based on the [Scaling Docker with Kubernetes](http://www.infoq.com/articles/scaling-docker-with-kubernetes) article, automates the scaling of Jenkins agents running in Kubernetes. -The plugin creates a Kubernetes Pod for each agent started,-defined by the Docker image to run, and stops it after each build.+The plugin creates a Kubernetes Pod for each agent started, and stops it after each build. -Agents are launched using JNLP, so it is expected that the image connects automatically to the Jenkins controller.+Agents are launched as inbound agents, so it is expected that the container connects automatically to the Jenkins controller. For that some environment variables are automatically injected: -* `JENKINS_URL`: Jenkins web interface url-* `JENKINS_SECRET`: the secret key for authentication-* `JENKINS_AGENT_NAME`: the name of the Jenkins agent-* `JENKINS_NAME`: the name of the Jenkins agent (Deprecated. Only here for backwards compatibility)+* `JENKINS_URL` : Jenkins web interface url+* `JENKINS_SECRET` : the secret key for authentication+* `JENKINS_AGENT_NAME` : the name of the Jenkins agent+* `JENKINS_NAME` : the name of the Jenkins agent (Deprecated. Only here for backwards compatibility)  Tested with [`jenkins/inbound-agent`](https://hub.docker.com/r/jenkins/inbound-agent), see the [Docker image source code](https://github.com/jenkinsci/docker-inbound-agent). -It is not required to run the Jenkins controller inside Kubernetes. +It is not required to run the Jenkins controller inside Kubernetes.+ # Generic Setup-### Prerequisites+## Prerequisites * A running Kubernetes cluster 1.14 or later. For OpenShift users, this means OpenShift Container Platform 4.x. * A Jenkins instance installed * The Jenkins Kubernetes plugin installed -It should be noted that the main reason to use the global pod template definition is to migrate a huge corpus of -existing projects (incl. freestyle) to run on Kubernetes without changing job definitions. New users setting up new -Kubernetes builds should use the podTemplate step as shown in the example snippets [here](https://github.com/jenkinsci/kubernetes-plugin/pull/707)+## Configuration -Fill in the Kubernetes plugin configuration. In order to do that, you will open the Jenkins UI and navigate to -**Manage Jenkins -> Configure System -> Cloud -> Kubernetes** and enter in the *Kubernetes URL* and *Jenkins URL*-appropriately, this is unless Jenkins is running in Kubernetes in which case the defaults work.+Fill in the Kubernetes plugin configuration.+In order to do that, you will open the Jenkins UI and navigate to +**Manage Jenkins -> Manage Nodes and Clouds -> Configure Clouds -> Add a new cloud -> Kubernetes** and enter+the *Kubernetes URL* and *Jenkins URL* appropriately, this is unless Jenkins is running in Kubernetes in which case
the *Kubernetes URL* and *Jenkins URL* appropriately, unless Jenkins is running in Kubernetes in which case
Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 docker.sock does not need to be mounted as in dood.groovy. May or may not work depending on cluster policy: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ */ podTemplate(yaml: '''-apiVersion: v1-kind: Pod-spec:-  volumes:-  - name: docker-socket-    emptyDir: {}-  containers:-  - name: docker-    image: docker:19.03.1-    command:-    - sleep-    args:-    - 99d-    volumeMounts:-    - name: docker-socket-      mountPath: /var/run-  - name: docker-daemon-    image: docker:19.03.1-dind-    securityContext:-      privileged: true-    volumeMounts:-    - name: docker-socket-      mountPath: /var/run-''') {-    node(POD_LABEL) {-        writeFile file: 'Dockerfile', text: 'FROM scratch'-        container('docker') {-            sh 'docker version && DOCKER_BUILDKIT=1 docker build --progress plain -t testing .'-        }+              apiVersion: v1

I do not find this helpful. Easier to copy & paste actual YAML from another editor if it is unindented.

Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 The `containerTemplate` is a template of container that will be added to the pod  #### Specifying a different default agent connection timeout -By default, the agent connection timeout is set to 100 seconds. In some case, you would like to set a different value, if so you can set the system property `org.csanchez.jenkins.plugins.kubernetes.PodTemplate.connectionTimeout` to a different value. Please read [Features controlled by system properties](https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties) page to know how to setup system properties within Jenkins.-+By default, the agent connection timeout is set to 1000 seconds. It can be customized using a system property. Please refer to the section below.  #### Using yaml to Define Pod Templates  In order to support any possible value in Kubernetes `Pod` object, we can pass a yaml snippet that will be used as a base-for the template. If any other properties are set outside of the yaml they will take precedence.+for the template. If any other properties are set outside the yaml, they will take precedence.
for the template. If any other properties are set outside the YAML, they will take precedence.
Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 To enable this, in your cloud's advanced configuration check the `Restrict pipeline support to authorized folders` box. For a job to then use this cloud configuration you will need to add it in the jobs folder's configuration. -# Pipeline support+# Usage+## Overview -Nodes can be defined in a pipeline and then used, however, default execution always goes to the jnlp container.  You will need to specify the container you want to execute your task in.+The Kubernetes plugin allocates Jenkins agents in Kubernetes pods. Within these pods, there is always one special+container `jnlp` that is running the Jenkins agent. Other containers can run arbitrary processes of your choosing,+and it is possible to run commands dynamically in any container in the agent pod.  -*Please note the `POD_LABEL` is a new feature to automatically label the generated pod in versions `1.17.0` or higher, older versions of the Kubernetes Plugin will need to manually label the podTemplate*+## Using a label++Pod templates defined using the user interface declare a label. When a freestyle job or a pipeline job using+`node(label)` uses a label declared by a pod template, the Kubernetes Cloud allocates a new pod to run the+Jenkins agent.++It should be noted that the main reason to use the global pod template definition is to migrate a huge corpus of+existing projects (incl. freestyle) to run on Kubernetes without changing job definitions.+New users setting up new Kubernetes builds should use the `podTemplate` step as shown in the example snippets+[here](https://github.com/jenkinsci/kubernetes-plugin/pull/707).++## Using the pipeline step++The `podTemplate` step defines an ephemeral pod template. It is created while the pipeline execution is within the+`podTemplate` block. It is immediately deleted afterwards. Such pod templates are not intended to be shared with other+builds or projects in the Jenkins instance.++The following idiom creates a pod template with a generated unique label (available as `POD_LABEL`) and runs commands inside it. -This will run in jnlp container ```groovy podTemplate {     node(POD_LABEL) {-        stage('Run shell') {-            sh 'echo hello world'-        }+        // pipeline steps...     } } ``` -This will be container specific.-Note the variable `POD_CONTAINER` contains the name of the container in the current context. It is defined only within a `container` block.+Commands will be executed by default in the `jnlp` container, where the Jenkins agent is running. +This will run in jnlp container
This will run in the `jnlp` container:
Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 podTemplate(yaml: """\       - name: busybox         image: busybox         command:-        - cat-        tty: true-    """.stripIndent()) {+        - sleep+        args:+        - 99d+    '''.stripIndent()) {     node(POD_LABEL) {       container('busybox') {         echo POD_CONTAINER // displays 'busybox'-        sh "hostname"+        sh 'hostname'       }     } } ``` -You can use [`readFile`](https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#code-readfile-code-read-file-from-workspace) or [`readTrusted`](https://jenkins.io/doc/pipeline/steps/coding-webhook/#readtrusted-read-trusted-file-from-scm) steps to load the yaml from a file.  It is also accessible from this plugin's configuration panel in the Jenkins console.+You can use [`readFile`](https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#readfile-read-file-from-workspace) or [`readTrusted`](https://jenkins.io/doc/pipeline/steps/coding-webhook/#readtrusted-read-trusted-file-from-scm) steps to load the yaml from a file.  It is also accessible from this plugin's configuration panel in the Jenkins console.
You can use [`readFile`](https://www.jenkins.io/doc/pipeline/steps/workflow-basic-steps/#readfile-read-file-from-workspace) or [`readTrusted`](https://jenkins.io/doc/pipeline/steps/coding-webhook/#readtrusted-read-trusted-file-from-scm) steps to load the yaml from a file.

No idea what that referred to.

Would be a good place to mention the yamlFile Declarative syntax.

Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 podTemplate(yaml: """\       - name: busybox         image: busybox         command:-        - cat-        tty: true-    """.stripIndent()) {+        - sleep+        args:+        - 99d

Ditto, though it seems

docker run --rm busybox sleep 99d

does work in this case. (I had thought Busybox was one of the cases where it did not. Not sure any more.)

Vlatombe

comment created time in 7 days

Pull request review commentjenkinsci/kubernetes-plugin

Round of review on the documentation

 To enable this, in your cloud's advanced configuration check the `Restrict pipeline support to authorized folders` box. For a job to then use this cloud configuration you will need to add it in the jobs folder's configuration. -# Pipeline support+# Usage+## Overview -Nodes can be defined in a pipeline and then used, however, default execution always goes to the jnlp container.  You will need to specify the container you want to execute your task in.+The Kubernetes plugin allocates Jenkins agents in Kubernetes pods. Within these pods, there is always one special+container `jnlp` that is running the Jenkins agent. Other containers can run arbitrary processes of your choosing,+and it is possible to run commands dynamically in any container in the agent pod.  -*Please note the `POD_LABEL` is a new feature to automatically label the generated pod in versions `1.17.0` or higher, older versions of the Kubernetes Plugin will need to manually label the podTemplate*+## Using a label++Pod templates defined using the user interface declare a label. When a freestyle job or a pipeline job using+`node(label)` uses a label declared by a pod template, the Kubernetes Cloud allocates a new pod to run the+Jenkins agent.++It should be noted that the main reason to use the global pod template definition is to migrate a huge corpus of+existing projects (incl. freestyle) to run on Kubernetes without changing job definitions.+New users setting up new Kubernetes builds should use the `podTemplate` step as shown in the example snippets+[here](https://github.com/jenkinsci/kubernetes-plugin/pull/707).

Better to link to the current sources of them.

Vlatombe

comment created time in 7 days