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
jenkins: | |
Master: | |
Image: my-company/my-project/jenkins-x-image | |
ImageTag: 0.0.70-2 | |
Persistence: | |
mounts: | |
- name: jenkins-security-secrets | |
mountPath: /etc/jenkins-secrets | |
readOnly: true | |
volumes: |
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
jenkins: | |
Master: | |
Image: my-company/my-project/jenkins-x-image | |
ImageTag: 0.0.70-2 | |
Persistence: | |
mounts: | |
- name: jenkins-security-secrets | |
mountPath: /etc/jenkins-secrets | |
readOnly: true | |
volumes: |
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
$ cat google-oauth-config | |
...someClientID... | |
...someClientSecret... | |
$ cat authz_strategy_config | |
{ | |
"strategy": "GlobalMatrixAuthorizationStrategy", | |
"user_permissions": { | |
"authenticated": [ |
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
#!/usr/bin/env bash | |
# Execute with: | |
# ./refresh-jx-platform.sh | |
# or pass the JX_VERSION | |
# JX_VERSION=2.3.333 ./refresh-jx-platform.sh | |
set -eu | |
export JX_HOME=$(mktemp -d) | |
if [ -z "${JX_VERSION:-}" ]; 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
jenkins: | |
Master: | |
Image: my-reg/my-company/jenkins-x-image | |
ImageTag: 0.0.70-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
/* | |
Inspiration taken from the github page below. | |
Changes made: | |
- allowing the configuration to be taken from a file | |
- this will allow the script to be used in a docker/k8s environment | |
with the configuration in a mounted secret. | |
*/ | |
/* | |
Copyright (c) 2015-2018 Sam Gleske - https://github.com/samrocketman/jenkins-bootstrap-shared |
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
// SecurityRealm | |
import jenkins.model.Jenkins | |
import hudson.security.SecurityRealm | |
import org.jenkinsci.plugins.GithubSecurityRealm | |
clientID = null | |
clientSecret = null | |
securityRealm = null | |
// secret sanity check |
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
// SecurityRealm | |
import jenkins.model.Jenkins | |
import hudson.security.SecurityRealm | |
import org.jenkinsci.plugins.googlelogin.GoogleOAuth2SecurityRealm | |
clientID = null | |
clientSecret = null | |
securityRealm = null | |
// secret sanity check |
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
#!/usr/bin/env bash | |
# Script to get a list of plugins from a Jenkins server | |
set -euo pipefail | |
# set the necessary vars | |
JENKINS_URL=${JENKINS_URL:-http://localhost:8080} | |
JENKINS_USER=${JENKINS_USER:-admin} | |
JENKINS_TOKEN=${JENKINS_TOKEN} # eg. abcd1234abcd1234abcd1234 |
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
die() { echo "$@" 1>&2 ; exit 1; } | |
dieGracefully() { echo "$@" 1>&2 ; exit 0; } | |
confirm () { | |
# call with a prompt string or use a default | |
read -p "${1:-Are you sure?} [y/N]" -n 1 -r | |
[ -n "$REPLY" ] && echo # (optional) move to a new line | |
if [[ ! $REPLY =~ ^[Yy]$ ]]; then | |
dieGracefully "Received '${REPLY:-N}'. ${2:-Exiting gracefully}." |