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 | |
NS=$1; | |
if [ -z "$NS" ] | |
then | |
echo "Usage: $0 namespace" >&2 | |
exit 1; | |
fi |
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 | |
# Migrate VSTS release pipelines agent | |
function get-vsts-creedentials | |
{ | |
echo -n "_:$VSTS_TOKEN" | base64 -w 0 | |
} |
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 | |
if [ -z "$HELM_APPLY_REPO" ] | |
then | |
echo "Falta a variavel de ambiente 'HELM_APPLY_REPO'." >&2 | |
exit 1 | |
fi |
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 | |
TOKEN=xxx | |
AUTH="Basic $(echo -n $TOKEN: | base64)" | |
SONARAPI="http://sonarqube/api" | |
for projKey in $(curl -s -X GET $SONARAPI/projects/search -H "Authorization: $AUTH" | \ | |
jq -r '.components[].key') |
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 | |
# Required enviroment variables: | |
# VSTS_BASE_URL (ex: https://YOUR_ORG.visualstudio.com/) | |
# VSTS_TOKEN (ex: xpto...) | |
# VS_DEVENV (ex: "/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/devenv.exe") | |
set -e | |
function extract-branch-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
# usage: kubectl get pod THE_POD_NAME -json | dockerinfo | |
alias dockerinfo="jq '{ name: .metadata.name, nodeName: .spec.nodeName, containers: [ .status.containerStatuses[] | { image: .image, containerID: .containerID } ]}'" |
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
public class OtcApiVersionActionSelector : ApiVersionActionSelector | |
{ | |
public OtcApiVersionActionSelector(IActionDescriptorCollectionProvider actionDescriptorCollectionProvider, ActionConstraintCache actionConstraintCache, IOptions<ApiVersioningOptions> options, ILoggerFactory loggerFactory, IApiVersionRoutePolicy routePolicy) : base(actionDescriptorCollectionProvider, actionConstraintCache, options, loggerFactory, routePolicy) | |
{ | |
} | |
public override ActionDescriptor SelectBestCandidate(RouteContext context, IReadOnlyList<ActionDescriptor> candidates) | |
{ | |
if (context == 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
#!/bin/bash | |
NAMESPACE=$1 | |
if [ -z $NAMESPACE ] | |
then | |
echo "Usage: $0 namespace" | |
exit 1 | |
fi |
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 | |
JQ_OUTPUT=$(mktemp) | |
cat /dev/stdin | while read -r l; | |
do | |
if echo $l | jq -C '.' > $JQ_OUTPUT 2>&1 | |
then | |
cat $JQ_OUTPUT | |
else |