This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: nonrootbuilder-sa | |
namespace: jenkins-sandbox | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: nonrootbuilder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: security.openshift.io/v1 | |
metadata: | |
name: nonrootbuilder | |
allowHostDirVolumePlugin: false | |
allowHostIPC: false | |
allowHostNetwork: false | |
allowHostPID: false | |
allowHostPorts: false | |
allowPrivilegeEscalation: true | |
allowPrivilegedContainer: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM registry.redhat.io/rhel8/podman:8.6 | |
USER root | |
RUN chown -Rfv podman:podman /home/podman/.config | |
RUN chown -Rfv podman:podman /home/podman/.local | |
# 1001 | |
USER podman |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline{ | |
agent { | |
kubernetes { | |
yaml ''' | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
labels: | |
label: jenkins-build | |
spec: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM registry.access.redhat.com/ubi8/nodejs-14:1 | |
USER root | |
# Setup to download updates from RH | |
COPY ./rhsm-entitlement /etc/pki/entitlement | |
RUN rm /etc/rhsm-host | |
# Install Chrome | |
RUN dnf upgrade --refresh rpm glibc && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SOURCE_BRANCH="helmcharts-source" | |
STAGING_BRANCH="helmcharts-staging" | |
echo | |
echo "Fetch new changes from helmcharts" | |
echo ----------------------------------------- | |
git fetch helmcharts master | |
HELMCHARTS_LATEST_COMMIT=`git ls-remote helmcharts | grep "refs/heads/master" | awk '{ print $1}'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# A probe to check current CPU and RAM capacity before scheduling jobs | |
# | |
CURRENT_CPU=$(uptime | awk -F'load average:' '{ print $2 }' | awk -F',' '{print $2}' | tr -d " \t") | |
THRESHOLD_CPU=12.0 | |
THRESHOLD_RAM=4096 | |
CURRENT_AVAILABLE_RAM=$(free -m | grep "Mem:" | awk '{print $7}') | |
if [ "$(echo "$CURRENT_CPU > $THRESHOLD_CPU" | bc -l)" -eq 1 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: CronJob | |
apiVersion: batch/v1 | |
metadata: | |
name: cjoc-backup | |
namespace: cloudbees-ci | |
spec: | |
schedule: 0 2 * * * | |
startingDeadlineSeconds: 120 | |
concurrencyPolicy: Forbid | |
suspend: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
containers: | |
- name: jenkins-backup | |
image: 'maorfr/kube-tasks:0.2.0' | |
env: | |
... | |
command: ["/bin/sh","-c"] | |
args: | |
- kube-tasks simple-backup -n $MY_POD_NAMESPACE --selector app.kubernetes.io/name=cloudbees-core --container jenkins --path /var/jenkins_home/ --dst k8s://$MY_POD_NAMESPACE/$MY_POD_NAME/jenkins-backup/backup; | |
echo; | |
echo Backups; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {0..60} | |
do | |
sleep 5 | |
done |
NewerOlder