UNCLASSIFIED

Verified Commit 980942a8 authored by Jesse Glick's avatar Jesse Glick
Browse files

2.222.4.3

parent a8b43d18
Pipeline #19548 passed with stage
ARG BASE_REGISTRY=nexus-docker-secure.levelup-dev.io ARG BASE_REGISTRY=nexus-docker-secure.levelup-dev.io
ARG BASE_IMAGE=redhat/ubi8/ubi ARG BASE_IMAGE=redhat/openjdk/openjdk8-devel
ARG BASE_TAG=8.2 ARG BASE_TAG=latest
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
ENV LANG C.UTF-8
ENV JENKINS_HOME /var/jenkins_home ENV JENKINS_HOME /var/jenkins_home
ENV JENKINS_SLAVE_AGENT_PORT 50000 ENV JENKINS_SLAVE_AGENT_PORT 50000
# All reference configuration we want to set on a fresh new installation. # All reference configuration we want to set on a fresh new installation.
...@@ -19,7 +18,6 @@ ARG gid=1000 ...@@ -19,7 +18,6 @@ ARG gid=1000
RUN dnf update -y --nodocs && \ RUN dnf update -y --nodocs && \
dnf install -y --nodocs \ dnf install -y --nodocs \
java-1.8.0-openjdk-devel \
git `# needed for some on-master operations` \ git `# needed for some on-master operations` \
openssh-clients `# used for SSH agents` \ openssh-clients `# used for SSH agents` \
iproute iputils net-tools `# general diagnostics` && \ iproute iputils net-tools `# general diagnostics` && \
...@@ -42,8 +40,8 @@ HEALTHCHECK --interval=5m --timeout=3s \ ...@@ -42,8 +40,8 @@ HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -fsL ${JENKINS_URL}/login || exit 1 CMD curl -fsL ${JENKINS_URL}/login || exit 1
LABEL securitytxt="https://www.cloudbees.com/.well-known/security.txt" LABEL securitytxt="https://www.cloudbees.com/.well-known/security.txt"
LABEL release=1321bd13f4669c169f532a8048045c8f060ac3b1 LABEL release=5a533c774ae77dd775097dec6ba8679b2e6c641e
LABEL version=2.222.2.1 LABEL version=2.222.4.3
ARG TARBALL=files.tar ARG TARBALL=files.tar
COPY ${TARBALL} /tmp COPY ${TARBALL} /tmp
......
@Library('DCCSCR@master') _ @Library('DCCSCR@master') _
dccscrPipeline(version: '2.222.2.1') dccscrPipeline(version: '2.222.4.3')
...@@ -9,7 +9,7 @@ CloudBees Core consists of three Docker images installed via Helm chart: ...@@ -9,7 +9,7 @@ CloudBees Core consists of three Docker images installed via Helm chart:
For each image, all files other than UBI and native packages For each image, all files other than UBI and native packages
are included in a `files.tar` marked with a SHA-256 checksum. are included in a `files.tar` marked with a SHA-256 checksum.
A version of Core is given in the format `2.222.2.1` A version of Core is given in the format `2.222.4.3`
where the first three components are aligned with a Jenkins LTS. where the first three components are aligned with a Jenkins LTS.
The Helm chart is coversioned with `core-oc`. The Helm chart is coversioned with `core-oc`.
The `core-mm` image typically shares the same version, The `core-mm` image typically shares the same version,
...@@ -22,13 +22,13 @@ plus whatever other customizations are desired: ...@@ -22,13 +22,13 @@ plus whatever other customizations are desired:
```yaml ```yaml
OperationsCenter: OperationsCenter:
Image: Image:
dockerImage: your-registry/core-oc:2.222.2.1 dockerImage: your-registry/core-oc:2.222.4.3
Master: Master:
Image: Image:
dockerImage: your-registry/core-mm:2.222.2.1 dockerImage: your-registry/core-mm:2.222.4.3
Agents: Agents:
Image: Image:
dockerImage: your-registry/agent:2.222.2.1 dockerImage: your-registry/agent:2.222.4.3
``` ```
and [install via Helm 3](https://docs.cloudbees.com/docs/cloudbees-core/latest/kubernetes-install-guide/installing-kubernetes-using-helm) using the local copy of the chart: and [install via Helm 3](https://docs.cloudbees.com/docs/cloudbees-core/latest/kubernetes-install-guide/installing-kubernetes-using-helm) using the local copy of the chart:
......
{ {
"resources": [ "resources": [
{ {
"url": "https://dsop.s3.amazonaws.com/core-oc-files-d2dc20c79dfe72a64b47b8d66bf0669c5e5ff365756f7321a1f8219f360d910a.tar", "url": "https://dsop.s3.amazonaws.com/core-oc-files-0f4577ed2e1113fc47b6805b3e99794dbe962691fcdd1713d8c3899bee189970.tar",
"filename": "files.tar", "filename": "files.tar",
"validation": { "validation": {
"type": "sha256", "type": "sha256",
"value": "d2dc20c79dfe72a64b47b8d66bf0669c5e5ff365756f7321a1f8219f360d910a" "value": "0f4577ed2e1113fc47b6805b3e99794dbe962691fcdd1713d8c3899bee189970"
} }
} }
] ]
......
apiVersion: v1 apiVersion: v1
appVersion: 2.222.2.1 appVersion: 2.222.4.3
description: The Continuous Delivery Solution for Enterprises description: The Continuous Delivery Solution for Enterprises
home: https://www.cloudbees.com/products/cloudbees-core home: https://www.cloudbees.com/products/cloudbees-core
icon: https://images.ctfassets.net/vtn4rfaw6n2j/7xprMMXARXDBuVxW4y8XfV/349fff91035050e3f2a8ff37bc0615b5/cloudbees-core-logo_header.svg icon: https://images.ctfassets.net/vtn4rfaw6n2j/7xprMMXARXDBuVxW4y8XfV/349fff91035050e3f2a8ff37bc0615b5/cloudbees-core-logo_header.svg
...@@ -7,4 +7,4 @@ keywords: ...@@ -7,4 +7,4 @@ keywords:
- cloudbees - cloudbees
- jenkins - jenkins
name: cloudbees-core name: cloudbees-core
version: 3.13.0-DEVELOPMENT version: 3.14.0-DEVELOPMENT
...@@ -163,11 +163,11 @@ spec: ...@@ -163,11 +163,11 @@ spec:
{{- end }} {{- end }}
resources: resources:
limits: limits:
cpu: "{{ .Values.OperationsCenter.Cpu }}" cpu: "{{ default .Values.OperationsCenter.Resources.Limits.Cpu .Values.OperationsCenter.Cpu }}"
memory: "{{ .Values.OperationsCenter.Memory }}" memory: "{{ default .Values.OperationsCenter.Resources.Limits.Memory .Values.OperationsCenter.Memory }}"
requests: requests:
cpu: "1" cpu: "{{ .Values.OperationsCenter.Resources.Requests.Cpu }}"
memory: "2G" memory: "{{ .Values.OperationsCenter.Resources.Requests.Memory }}"
volumeMounts: volumeMounts:
{{- if .Values.Persistence.mounts }} {{- if .Values.Persistence.mounts }}
{{ toYaml .Values.Persistence.mounts | indent 12 }} {{ toYaml .Values.Persistence.mounts | indent 12 }}
......
...@@ -33,7 +33,7 @@ OperationsCenter: ...@@ -33,7 +33,7 @@ OperationsCenter:
# Operations Center docker image # Operations Center docker image
Image: Image:
dockerImage: dcar/core-oc:2.222.2.1 dockerImage: dcar/core-oc:2.222.4.3
dockerPullPolicy: IfNotPresent dockerPullPolicy: IfNotPresent
# Platform enables specific settings, option defaults standard # Platform enables specific settings, option defaults standard
...@@ -51,13 +51,18 @@ OperationsCenter: ...@@ -51,13 +51,18 @@ OperationsCenter:
Protocol: http Protocol: http
# Protocol: https # Protocol: https
# CPU limit to run Operations Center # https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-requests-and-limits-of-pod-and-container
# https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu Resources:
Cpu: '1' Limits:
# CPU limit to run Operations Center
# Memory limit to run Operations Center # https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu
# https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory Cpu: 1
Memory: 2G # Memory limit to run Operations Center
# https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory
Memory: 2G
Requests:
Cpu: 1
Memory: 2G
# Environment variables that get added to the container (useful for e.g. http_proxy) # Environment variables that get added to the container (useful for e.g. http_proxy)
# ContainerEnv: # ContainerEnv:
...@@ -203,7 +208,7 @@ Master: ...@@ -203,7 +208,7 @@ Master:
# Docker image inserted in Operations Center automatically # Docker image inserted in Operations Center automatically
Image: Image:
dockerImage: dcar/core-mm:2.222.2.1 dockerImage: dcar/core-mm:2.222.4.3
dockerPullPolicy: IfNotPresent dockerPullPolicy: IfNotPresent
# Additional Java options to pass to managed masters. For example, setting up a JMX port # Additional Java options to pass to managed masters. For example, setting up a JMX port
JavaOpts: null JavaOpts: null
...@@ -221,7 +226,7 @@ Agents: ...@@ -221,7 +226,7 @@ Agents:
Create: false Create: false
Image: Image:
# Used to override the default docker image used for agents # Used to override the default docker image used for agents
dockerImage: dcar/agent:2.222.2.1 dockerImage: dcar/agent:2.222.4.3
Persistence: Persistence:
## Persistent Volume Storage Class for Jenkins Home ## Persistent Volume Storage Class for Jenkins Home
......
...@@ -52,7 +52,7 @@ find /usr/share/jenkins/ref/ -type f -exec bash -c "copy_reference_file '{}'" \; ...@@ -52,7 +52,7 @@ find /usr/share/jenkins/ref/ -type f -exec bash -c "copy_reference_file '{}'" \;
# if `docker run` first argument start with `--` the user is passing jenkins launcher arguments # if `docker run` first argument start with `--` the user is passing jenkins launcher arguments
if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then
eval "exec java ${JAVA_OPTS:-} -jar -Dcb.distributable.name=\"Docker Common CJE\" -Dcb.distributable.commit_sha=1321bd13f4669c169f532a8048045c8f060ac3b1 /usr/share/jenkins/jenkins.war $JENKINS_OPTS \"\$@\"" eval "exec java ${JAVA_OPTS:-} -jar -Dcb.distributable.name=\"Docker Common CJE\" -Dcb.distributable.commit_sha=5a533c774ae77dd775097dec6ba8679b2e6c641e /usr/share/jenkins/jenkins.war $JENKINS_OPTS \"\$@\""
fi fi
# As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image # As argument is not jenkins, assume user want to run his own process, for sample a `bash` shell to explore this image
......
#!/bin/bash -eu #!/bin/bash -eu
. /usr/local/bin/support.sh
. /usr/local/bin/cje-support.sh core-launch "$@"
configure-logging() {
# Configure logging if log file present
local log_config=${MESOS_SANDBOX:-/etc/jenkins}/log.properties
if [ -e $log_config ]; then
JAVA_OPTS="${JAVA_OPTS:-} -Djava.util.logging.config.file=$log_config"
fi
}
if [ -z "${ENVIRONMENT:-}" ] || [ "$ENVIRONMENT" == "MESOS" ]; then
if [ -z "${JENKINS_URL:-}" ]; then
echo JENKINS_URL environment variable is required
exit 1
fi
fi
generate-passwd-file
maybe-talk-to-castle
configure-logging
set-java-options
set-jenkins-options
jenkins-cleanup
deploy-groovy-scripts
exec /usr/local/bin/jenkins.sh "$@"
#!/bin/sh -eu
# Trigger a backup of the Jenkins home dir
# This is asynchronous so the completion time depends on the backend
# For instance for Amazon EC2 EBS volumes a EBS snapshot is triggered and its state can be checked from the AWS console
CONTAINER_ID=$(cat /proc/self/cgroup | grep "docker" | sed s/\\//\\n/g | tail -1)
curl -fsSL -ivN -H "Content-type: application/json" \
-X POST \
--data \
"{\
\"containerId\" : \"${CONTAINER_ID}\", \
\"account\" : \"${TENANT}\", \
\"signature\" : \"${SIGNATURE}\", \
\"disk\" : ${DISK:-2} \
}" \
$VOLUME_SERVICE/backup
#!/bin/bash -eu #!/bin/bash -eu
# Request provisioning from Castle
maybe-talk-to-castle() {
if [ -z "${ENVIRONMENT:-}" ] || [ "$ENVIRONMENT" == "MESOS" ]; then
talk-to-castle
fi
}
talk-to-castle() {
CONTAINER_ID=$(grep "docker" /proc/self/cgroup | sed s/\\//\\n/g | tail -1)
# TODO not always works, use basename "$(cat /proc/1/cpuset)"
export CONTAINER_ID
set +e
local begin_time=$(date +%s)
local curr_time=$(date +%s)
local exitCode=""
#
# Will attempt at volume provisioning indefinitely.
# It will be up to Marathon/Kubernetes to stop the container
#
>&2 echo "$(date +'%Y-%m-%dT%H:%M:%SZ') Castle about to provision storage..."
while true; do
>&2 echo "$(date +'%Y-%m-%dT%H:%M:%SZ') Castle provisioning storage... ($(($curr_time - $begin_time)) secs elapsed)"
curl -fsSL -ivN -H "Content-type: application/json" \
-X POST \
--data \
"{\
\"containerId\" : \"${CONTAINER_ID}\", \
\"account\" : \"${TENANT}\", \
\"signature\" : \"${SIGNATURE}\", \
\"mountOptions\" : \"${MOUNT_OPTIONS:-}\", \
\"disk\" : ${DISK:-2} \
}" \
"$VOLUME_SERVICE/provision"
exitCode=$?
curr_time=$(date +%s)
if [ $exitCode -eq 0 ]; then break; fi
sleep 5
done
set -e
>&2 echo "$(date +'%Y-%m-%dT%H:%M:%SZ') Castle provisioned storage in $(($curr_time - $begin_time)) seconds"
}
set-java-options() { set-java-options() {
export JAVA_OPTS="-Duser.home=$JENKINS_HOME ${JAVA_OPTS:-}" export JAVA_OPTS="-Duser.home=$JENKINS_HOME ${JAVA_OPTS:-}"
# CPLT2-6044: http/2 is causing issues with Openshift 4.x users # CPLT2-6044: http/2 is causing issues with Openshift 4.x users
#export JAVA_OPTS="-Xbootclasspath/p:/usr/share/jenkins/alpn-boot.jar ${JAVA_OPTS:-}" #export JAVA_OPTS="-Xbootclasspath/p:/usr/share/jenkins/alpn-boot.jar ${JAVA_OPTS:-}"
if [ -n "${HOST:-}" ]; then
export JAVA_OPTS="-Dhudson.TcpSlaveAgentListener.hostName=$HOST ${JAVA_OPTS:-}"
export JAVA_OPTS="-Dorg.jenkinsci.main.modules.sshd.SSHD.hostName=$HOST $JAVA_OPTS"
fi
if [ -n "${PORT1:-}" ]; then
export JAVA_OPTS="-Djenkins.model.Jenkins.slaveAgentPort=$PORT1 $JAVA_OPTS"
export JAVA_OPTS="-Djenkins.model.Jenkins.slaveAgentPortEnforce=true $JAVA_OPTS"
fi
} }
set-jenkins-options() { set-jenkins-options() {
local jenkins_opts="--webroot=$CACHE_DIR/war --pluginroot=$CACHE_DIR/plugins" export JENKINS_OPTS="--webroot=$CACHE_DIR/war --pluginroot=$CACHE_DIR/plugins ${JENKINS_OPTS:-}"
# PORT0 is set by Mesos because we do host-only networking
if [ -n "${PORT0:-}" ]; then
jenkins_opts="--httpPort=${PORT0} ${jenkins_opts}"
fi
if [ -n "${PORT2:-}" ]; then
# Picked up in init.groovy
export JENKINS_SSHD_PORT=${PORT2:-}
fi
export JENKINS_OPTS="${jenkins_opts} ${JENKINS_OPTS:-}"
} }
link_directory_erase_dest_if_exist() { link_directory_erase_dest_if_exist() {
...@@ -115,3 +50,21 @@ generate-passwd-file() { ...@@ -115,3 +50,21 @@ generate-passwd-file() {
fi fi
fi fi
} }
configure-logging() {
# Configure logging if log file present
local log_config=/etc/jenkins/log.properties
if [ -e $log_config ]; then
JAVA_OPTS="${JAVA_OPTS:-} -Djava.util.logging.config.file=$log_config"
fi
}
core-launch() {
generate-passwd-file
configure-logging
set-java-options
set-jenkins-options
jenkins-cleanup
deploy-groovy-scripts
exec /usr/local/bin/jenkins.sh "$@"
}
  • Pipeline Status: SUCCESS
    Branch: 2.222.4.3

    graph LR
      0([setup]):::INTERNAL_SUCCESS --> 1([Import Artifacts]):::SUCCESS --> 2((/)):::INTERNAL_SUCCESS --> 3([Stage Artifacts]):::SUCCESS --> 4((/)):::INTERNAL_SUCCESS --> 5([Build]):::SUCCESS --> 6([Publish, Scan & Report]):::INTERNAL_NOT_BUILT
    
    classDef SUCCESS font-size:10px
    classDef FAILURE fill:#f44, font-size:10px
    classDef SKIPPED font-size:10px
    classDef ABORTED fill:#889, font-size:10px
    classDef INTERNAL_SUCCESS font-size:10px, stroke-dasharray: 2, 1
    classDef INTERNAL_FAILURE fill:#f44, font-size:10px, stroke-dasharray: 2, 1
    classDef INTERNAL_SKIPPED font-size:10px, stroke-dasharray: 2, 1
    classDef INTERNAL_ABORTED fill:#889, font-size:10px, stroke-dasharray: 2, 1
    
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment