| |
@@ -11,31 +11,27 @@
|
| |
TEMPLATE=jenkins-ephemeral
|
| |
else
|
| |
TEMPLATE=jenkins-persistent
|
| |
- CUSTOM_PARAMS="-p VOLUME_CAPACITY=2Gi"
|
| |
+ CUSTOM_PARAMS="-p VOLUME_CAPACITY=20Gi"
|
| |
fi
|
| |
|
| |
# get template and set cpu to 2
|
| |
oc get templates --export -n openshift $TEMPLATE -o json | jq '.objects[.objects | map(.kind == "DeploymentConfig") | index(true)].spec.template.spec.containers[0].resources.limits += {"cpu": 2}' > jenkins-template.yml
|
| |
|
| |
- oc import-image jenkins:2 --confirm --scheduled=true \
|
| |
- --from=registry.access.redhat.com/openshift3/jenkins-2-rhel7:v3.11
|
| |
+ oc import-image jenkins:latest --confirm --scheduled=true \
|
| |
+ --from=registry.redhat.io/openshift4/ose-jenkins:latest
|
| |
|
| |
# get jenkins plugins
|
| |
PLUGINS=$(curl https://raw.githubusercontent.com/openshift/jenkins/master/2/contrib/openshift/base-plugins.txt | grep -v "#" |grep -v '^$' | sed 's/:.*/:latest/')
|
| |
PLUGINS=$(echo -e "$PLUGINS\n$(cat jenkins-plugins.txt)" | sort -u | tr '\n' ',')
|
| |
|
| |
- # replace problematic plugins
|
| |
- PLUGINS=$(echo $PLUGINS | sed 's/docker-commons:latest/docker-commons:1.16/')
|
| |
- PLUGINS=$(echo $PLUGINS | sed 's/kubernetes:latest/kubernetes:1.19.3/')
|
| |
- PLUGINS=$(echo $PLUGINS | sed 's/antisamy-markup-formatter:latest/antisamy-markup-formatter:1.6/')
|
| |
-
|
| |
-
|
| |
+ oc delete configmap openshift-jenkins-login-plugin-config
|
| |
oc create configmap openshift-jenkins-login-plugin-config --from-literal Overall-Administer=view
|
| |
|
| |
oc new-app --file=jenkins-template.yml \
|
| |
-p MEMORY_LIMIT=2Gi \
|
| |
${CUSTOM_PARAMS} \
|
| |
- -p NAMESPACE=$(oc project -q) \
|
| |
-e INSTALL_PLUGINS=$PLUGINS \
|
| |
+ -p JENKINS_IMAGE_STREAM_TAG=jenkins:latest\
|
| |
+ -p NAMESPACE=$(oc project -q) \
|
| |
-e JENKINS_JAVA_OVERRIDES="-Dpermissive-script-security.enabled=no_security" \
|
| |
${JCASC:+--env CASC_JENKINS_CONFIG=$JCASC}
|
| |