This file contains 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
import java.io.IOException; | |
import java.time.LocalDateTime; | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import org.kohsuke.github.GHIssueState; | |
import org.kohsuke.github.GHOrganization; | |
import org.kohsuke.github.GHRepository; | |
import org.kohsuke.github.GitHub; |
This file contains 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
def configuration = [ | |
[ | |
name : "Core", | |
repositories: "jenkins" | |
], | |
[ | |
name : "Infra", | |
repositories: "*", | |
owner : "jenkins-infra" |
This file contains 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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "prometheus-00", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"limit": 100, |
This file contains 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 | |
SRC_SECRET_NAME=${1} | |
SRC_VAULT=${2} | |
DEST_VAULT=${3} | |
DEST_SECRET_NAME=${4} | |
CERTIFICATE_NAME=${1} | |
function usage() { | |
echo "usage: ./key-vault-copy-cert-to-different-vault <src-secret-name> <src-vault> <dest-vault> <dest-secret-name>" |
This file contains 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
package admission | |
import data.k8s.matches | |
############################################################################### | |
# | |
# Policy : Container image name check if it matches the whitelisted patterns | |
# e.g. should be from an organization registry. | |
# | |
############################################################################### |
This file contains 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 | |
vault_name=$1 | |
mkdir -p ${vault_name} | |
az keyvault secret list --vault-name ${vault_name} -o tsv --query [].id | cut -d '/' -f 5 | xargs -n1 -I % sh -c "az keyvault secret show --vault-name ${vault_name} --name % -o tsv --query value > ${vault_name}/%" |
This file contains 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
[ | |
{ | |
"userName": "hmcts", | |
"repo": "draft-store" | |
}, | |
{ | |
"userName": "hmcts", | |
"repo": "rpe-pdf-service" | |
}, | |
{ |
This file contains 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
stage("Reload") { | |
sh "curl -fsSLO ${JENKINS_URL}jnlpJars/jenkins-cli.jar" | |
withCredentials([usernamePassword(credentialsId: 'jenkins-remoting', passwordVariable: 'JENKINS_API_TOKEN', usernameVariable: 'JENKINS_USER_ID')]) { | |
sh "java -jar jenkins-cli.jar -s ${JENKINS_URL} reload-jcasc-configuration" | |
} | |
archiveArtifacts artifacts: 'dist/**', fingerprint: true, onlyIfSuccessful: true | |
} |
This file contains 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
import serial | |
import json | |
import time | |
import osascript | |
s = serial.Serial('/dev/cu.usbmodem14201') | |
while True: | |
data = json.loads(s.readline()) | |
proximity = (data['detail']['proximity']) |
This file contains 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 | |
set -e | |
old_vault_name=$1 | |
new_vault_name=$2 | |
for file in $old_vault_name/* | |
do | |
echo $file | cut -d '/' -f 2 | xargs -n1 -I % sh -c 'az keyvault secret set --vault-name '${new_vault_name}' --name '%' --value $(cat '$file')' | |
done |