Skip to content

Instantly share code, notes, and snippets.

View timja's full-sized avatar

Tim Jacomb timja

View GitHub Profile
@timja
timja / platform-fourth-wall.json
Last active October 29, 2019 09:31
platform-fourth-wall.json
[
{
"userName": "hmcts",
"repo": "draft-store"
},
{
"userName": "hmcts",
"repo": "rpe-pdf-service"
},
{
@timja
timja / copy-from-old-to-new-keyvault
Last active October 10, 2019 10:05
dump and copy to new keyvault
#!/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
@timja
timja / jenkins-dump-credentials.groovy
Last active May 16, 2024 16:46
Dump jenkins credentials - use in script console
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")