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
{"query":"{\n search(last: 100, type: REPOSITORY, query: \"user:hmcts moj\") {\n nodes {\n ... on Repository {\n name\n }\n }\n repositoryCount\n }\n}\n","variables":{},"operationName":null} |
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 com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.* | |
import com.cloudbees.plugins.credentials.impl.* | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import org.jenkinsci.plugins.plaincredentials.impl.* | |
// def item = Jenkins.instance.getItem("your-folder") |
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
# | |
# Usage: ./az-keyvault-full-permissions <vault-name> John.Smith@example.com | |
# Ensure your account is in the right subscription | |
az keyvault set-policy --name $1 --secret-permissions backup delete get list purge recover restore set --certificate-permissions create delete deleteissuers get getissuers import --key-permissions backup create decrypt delete encrypt get import list purge recover restore sign unwrapKey update verify wrapKey --upn $2 |
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 |
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
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
[ | |
{ | |
"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
#!/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
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 | |
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>" |
OlderNewer