Jenkins Operations: Difference between revisions
Line 49: | Line 49: | ||
For a specific type of executor: https://jenkins.example.com/cloud/label/<yourlabelhere>/load-statistics | For a specific type of executor: https://jenkins.example.com/cloud/label/<yourlabelhere>/load-statistics | ||
=Download a Build's Console Output= | =Download Logs= | ||
==Download a Build's Console Output== | |||
Using UI, navigate to the build's console output: Build → Build History → Specific build → View as plain text → get the URL. | Using UI, navigate to the build's console output: Build → Build History → Specific build → View as plain text → get the URL. | ||
Line 55: | Line 56: | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
curl -H "Authorization: Basic c[...]4" https://jenkins.example.com/cloud/job/example/job/somejob/33/consoleText > ./build-33.txt | curl -H "Authorization: Basic c[...]4" https://jenkins.example.com/cloud/job/example/job/somejob/33/consoleText > ./build-33.txt | ||
</syntaxhighlight> | |||
==Download a Node Log== | |||
<syntaxhighlight lang='bash'> | |||
curl -H "Authorization: Basic c[...]4" https://jenkins.example.com/cloud/blue/rest/organizations/jenkins/pipelines/example/branches/sombranch/runs/${build_number}/nodes/${node_number}/log/?start=0 > ./node.txt | |||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 16:53, 10 April 2020
Internal
Overview
Jenkins Version
Manage Jenkins → About Jenkins
Best Practices
Running Jenkins as a Docker Container
Procedures
Writing a Jenkins Pipeline
Manage Worker Nodes
Bring up a New Worker Node
Jenkins → Manage Jenkins → Manage Nodes
To bring up a new type of worker node, navigate to the bottom and use the "Provision with node-type" dropdown box.
Configure a New Worker Node Type
Jenkins → Manage Jenkins → Configure System
A node type is known as a "Cloud", so the configuration lives in the "Cloud" section.
The name of the worker type is technically the "name of the Jenkins could of agents".
We want an "Amazon EC2" type of cloud. The "Amazon EC2" could is capable launching multiple types of workers, based on different AMIs..
Load Statistics
Manage Jenkins → Load Statistics
For a specific type of executor: https://jenkins.example.com/cloud/label/<yourlabelhere>/load-statistics
Download Logs
Download a Build's Console Output
Using UI, navigate to the build's console output: Build → Build History → Specific build → View as plain text → get the URL.
curl -H "Authorization: Basic c[...]4" https://jenkins.example.com/cloud/job/example/job/somejob/33/consoleText > ./build-33.txt
Download a Node Log
curl -H "Authorization: Basic c[...]4" https://jenkins.example.com/cloud/blue/rest/organizations/jenkins/pipelines/example/branches/sombranch/runs/${build_number}/nodes/${node_number}/log/?start=0 > ./node.txt