Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`); | |
export const wsObserver = ws | |
.pipe( | |
retryWhen(errors => | |
errors.pipe( | |
delay(1000) | |
) | |
) | |
); |
from anytree import Node, RenderTree | |
import json | |
parent_node = Node('/') | |
print ("$ <Starting your application....>") | |
def get_input(input_cmd = input("$")): | |
#find length of input command. if length is 1 -> ls, pwd; if length = 2 cd </home/user>, makdir qwerty | |
length = len(input_cmd.split()) |
# Default.toml | |
port = 8090 | |
important_message = 'RUN NOW!!' |
## Install Jenkins | |
$ sudo yum update | |
$ sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | |
$ sudo rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key | |
$ sudo yum install jenkins | |
$ sudo service jenkins start | |
$ sudo chkconfig jenkins on | |
## Install Docker (Amazon EC2 Container Service) |
wget https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v1.3.0/kubernetes.tar.gz | |
tar xvf kubernetes | |
cd kubernetes/cluster/ubuntu | |
./download-release.sh | |
# The above steps will install binaries under the ubuntu directory | |
# You can check it under binaries directory | |
vim config-default.sh | |
#Please change the following entries |
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) { | |
// path/to/whatever does not exist | |
} | |
if _, err := os.Stat("/path/to/whatever"); err == nil { | |
// path/to/whatever exists | |
} |
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
# Ensure Installation of kubectl first | |
# Visit for http://kubernetes.io/docs/getting-started-guides/binary_release/ | |
# For downloading any prerequisites | |
# Visit https://github.com/kubernetes/minikube/blob/master/DRIVERS.md | |
# Download & install Minikube | |
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.7.1/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ |
# Installation steps for using aci | |
# Download the tar file | |
wget https://github.com/appc/acbuild/releases/download/v0.3.1/acbuild-v0.3.1.tar.gz | |
# Untar the file | |
tar xvf acbuild-v0.3.1.tar.gz | |
alias acbuild="sudo '${PWD}/acbuild-v0.3.1/acbuild'" |
# Steps to build an apache aci image using acbuild utility | |
# Based on alpine | |
acbuild --debug dep add quay.io/coreos/alpine-sh | |
# Install apache | |
acbuild --debug run -- apk update | |
acbuild --debug run -- apk add apache2 | |
acbuild --debug run -- /bin/sh -c "echo 'ServerName localhost' >> /etc/apache2/httpd.conf" |