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
CREDS="user:password" | |
SOURCE="http://10.14.232.51:8081" | |
DEST="http://localhost:8081" | |
for i in $(curl -s -H"Content-Type: application/json" -u ${CREDS} $SOURCE/service/rest/v1/blobstores | jq '.[].name | select(contains("bmg"))' -r) | |
do | |
BB=$(curl -s -H"Content-Type: application/json" -u ${CREDS} ${SOURCE}/service/rest/v1/blobstores/google/${i} | jq -c '.name=.name+"_v2"| .bucketName=.bucketName+"_v2" | .credentialFilePath="/opt/sonatype/nexus/creds/gcp.json"| del(.softQuota)') | |
curl -vvv -H"Content-Type: application/json" -u ${CREDS} ${SOURCE}/service/rest/v1/blobstores/google/ -d @<(echo ${BB}) | |
done |
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
CREDS="user:password" | |
SOURCE="http://localhost:8081" | |
DEST="http://localhost:8081" | |
for i in $(curl -s -H"Content-Type: application/json" -u ${CREDS} $SOURCE/service/rest/v1/repositories | jq '.[]|select(.format=="apt" or .format=="yum")|select(.type=="proxy" or .type=="group")|.name+","+.format+","+.type' -r) | |
do | |
IFS="," read -r NAME FORMAT TYPE < <( echo $i) | |
JJ=$(curl -s -H"Content-Type: application/json" -u ${CREDS} ${SOURCE}/service/rest/v1/repositories/${FORMAT}/${TYPE}/${NAME} | jq -c '.name=.name+"_v2"') | |
echo ${JJ} | |
curl -s -H"Content-Type: application/json" -u ${CREDS} ${SOURCE}/service/rest/v1/repositories/${FORMAT}/${TYPE} -d @<(echo ${JJ}) | |
done |
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
#!/bin/bash | |
#Caching meh | |
[[ -f /tmp/bmgprojcache ]] || touch /tmp/bmgprojcache | |
[[ -f /tmp/bmgvmcache ]] || touch /tmp/bmgvmcache | |
#if file is not even populated | |
if [[ $(find /tmp/bmgprojcache -mmin +60 -print) || $(wc /tmp/bmgprojcache | awk '{ print $1}') == 0 ]] | |
then | |
echo "re-caching projects" | |
gcloud projects list --format=json | jq '.[].projectId' -r > /tmp/bmgprojcache |
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
rm -rf .terraform | |
TC=" -no-color" | |
terraform init | |
[0m[1mInitializing modules...[0m | |
Downloading [email protected]:sportingsolutions/SS.Terraform.Module.Instances.git for cassandra-01-spoke-rms-prod... | |
- cassandra-01-spoke-rms-prod in .terraform/modules/cassandra-01-spoke-rms-prod | |
Downloading [email protected]:sportingsolutions/SS.Terraform.Module.Instances.git for cassandra-02-spoke-rms-prod... | |
- cassandra-02-spoke-rms-prod in .terraform/modules/cassandra-02-spoke-rms-prod | |
Downloading [email protected]:sportingsolutions/SS.Terraform.Module.Instances.git for cassandra-03-spoke-rms-prod... | |
- cassandra-03-spoke-rms-prod in .terraform/modules/cassandra-03-spoke-rms-prod |
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
rm -rf .terraform | |
TC=" -no-color" | |
terraform init | |
[0m[1mInitializing modules...[0m | |
Downloading [email protected]:sportingsolutions/SS.Terraform.Module.Instances.git for cassandra-01-spoke-rms-uat... | |
- cassandra-01-spoke-rms-uat in .terraform/modules/cassandra-01-spoke-rms-uat | |
Downloading [email protected]:sportingsolutions/SS.Terraform.Module.Instances.git for cassandra-02-spoke-rms-uat... | |
- cassandra-02-spoke-rms-uat in .terraform/modules/cassandra-02-spoke-rms-uat | |
Downloading [email protected]:sportingsolutions/SS.Terraform.Module.Instances.git for cassandra-03-spoke-rms-uat... | |
- cassandra-03-spoke-rms-uat in .terraform/modules/cassandra-03-spoke-rms-uat |
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
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"reflect" | |
) | |
type FruitBasket struct { | |
Name string |
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
apiVersion: jenkins.io/v1alpha2 | |
kind: Jenkins | |
metadata: | |
name: custom | |
spec: | |
groovyScripts: | |
configurations: | |
- name: jenkins-operator-user-configuration-sporting | |
configurationAsCode: | |
configurations: |
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
apiVersion: jenkins.io/v1alpha2 | |
kind: Jenkins | |
metadata: | |
name: custom | |
spec: | |
groovyScripts: | |
configurations: | |
- name: jenkins-operator-user-configuration-sporting | |
configurationAsCode: | |
configurations: |
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
#! perl | |
# This extension implements vim like scrollback buffer navigation, search, and | |
# paste. Initially based on the searchable-scrollback extension and some gf | |
# related code borrowed from the matcher extension. | |
# | |
# Copyright (C) 2007 - 2013 Eric Van Dewoestine | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 |