Skip to content

Instantly share code, notes, and snippets.

View coreydaley's full-sized avatar
🪐
Working from home

Corey Daley coreydaley

🪐
Working from home
View GitHub Profile
#!/bin/env bash
#
# Run the Jenkins image on your local workstation using podman or similar
# so that you get an interactive command prompt, something like
# $ podman run -it --entrypoint /bin/bash <image>
#
# You can then paste the following command at the command prompt
# which will download this script file and run it in the container
#
@coreydaley
coreydaley / gist:34287ccac7a0c42282b3f3393fa9ae59
Created April 28, 2023 04:45
OpenShift Jenkins image build script
#!/bin/bash
# Assumes the following directory structure exists:
# ~/projects/github.com/openshift/jenkins
# ~/projects/github.com/openshift/jenkins-sync-plugin
# ~/projects/github.com/openshift/jenkins-client-plugin
# ~/projects/github.com/openshift/jenkins-openshift-login-plugin
if [ -z "$QUAY_USER" ]; then
printf "You MUST supply a QUAY_USER to push the image to\n"
podTemplate(label: 'maven-build-pod',
cloud: 'openshift',
containers: [
containerTemplate(
name: 'jnlp', image: 'quay.io/openshift/origin-jenkins-agent-maven:4.13'
)
],
volumes: [persistentVolumeClaim(mountPath: '/home/jenkins/.m2', claimName: 'dependencies', readOnly: false) ]
) {
node("maven-build-pod") {