- Cluster Quota
oc create clusterquota env-qa \
--project-label-selector environment=qa \
--hard pods=10,services=5
oc create clusterquota user-qa \
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
# --no-check-cerftificate was necessary for me to have wget not puke about https | |
curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
#!/usr/bin/env python | |
import SimpleHTTPServer | |
import SocketServer | |
# minimal web server. serves files relative to the | |
# current directory. | |
PORT = 8080 | |
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler |
#! /usr/bin/env bash | |
JENKINS_SERVER=${1} | |
shift | |
JOBS=$* | |
CHECK_INTERVAL=30 | |
NOTIFY_CMD= | |
# NOTIFY_CMD=/usr/bin/notify-send | |
command -v rsstail >/dev/null 2>&1 || { echo >&2 "This script requires rsstail to be installed. See http://www.vanheusden.com/rsstail"; exit 1; } |
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
#!/usr/bin/env python3 | |
# | |
# A script that runs the commands to perform Netflix's | |
# "Linux Performance Analysis in 60,000 Milliseconds" | |
# | |
# (http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html) | |
# | |
# First install Performance monitoring tools for Linux | |
# `apt install sysstat` | |
# |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481 | |
abcs = ['a', 'b', 'c'] | |
node('master') { | |
stage('Test 1: loop of echo statements') { | |
echo_all(abcs) | |
} | |
stage('Test 2: loop of sh commands') { |
Jenkins script console allows one to run groovy scripts/code to automate jenkins setup e.g installing plugins, setting configuration parameters. These groovy scripts can be run either through the web ui, or event loaded as scripts using curl from command line. With these groovy scripts, jenkins configurations can be completely automated.
Lets explore this script console and learn how to write/load simple scripts.
From the jenkins UI, choose Jenkins => Manage Jenkins => Script Console . You should see script console installed, in which run the following,
Some Jenkinsfile examples |