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 | |
| set -ex | |
| echo | |
| echo "COPY XRDs TO TEMPORARY SCHEMA DIRECTORY" | |
| readarray -t XRDS < <(find composites/ -name '*-xrd.yaml') | |
| for xrd in "${XRDS[@]}" | |
| do | |
| cp $xrd $TEMP_CROSSPLANE_DIRECTORY/schemas/ |
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
| FROM ruby:2.4.2-alpine AS base | |
| RUN apk add --update \ | |
| postgresql-dev git freetds-dev sqlite-dev tzdata | |
| FROM base AS dependencies | |
| WORKDIR /app | |
| RUN apk add --update build-base | |
| COPY Gemfile Gemfile.lock ./ |
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
| #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. | |
| FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base | |
| WORKDIR /app | |
| EXPOSE 80 | |
| FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build | |
| WORKDIR /src | |
| COPY ["src/MyApp/MyApp.csproj", "src/MyApp/"] | |
| COPY ["src/MyApp/NuGet.Config", "src/MyApp/"] |
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
| export LC_ALL=C | |
| FILE_NAME=$(date +%s).sar | |
| for file in /var/log/sysstat/sa[0-9]*; do sar -A -f "$file" >> ~/$FILE_NAME; 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
| stages: | |
| - build | |
| - deploy | |
| docker-build: | |
| image: docker:latest | |
| stage: build | |
| services: | |
| - docker:dind | |
| before_script: |
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
| if [[ "$#" -ne 6 ]]; then | |
| echo -e "Incorrect number of arguments. You need to provide:\nImage Repository\nImage Tag\nRegistry FQDN\nWebhook URL\nWebhook User\nWebhook Password" | |
| exit 1 | |
| fi | |
| IMAGE_REPOSITORY=$1 | |
| IMAGE_TAG=$2 | |
| REGISTRY_FQDN=$3 | |
| HOOK_URL=$4 | |
| HOOK_USER=$5 |
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
| #!/usr/bin/env bash | |
| set -e | |
| #Check Arguments | |
| if [ $# -lt 3 ]; then | |
| echo "Insuffecient arguments supplied. Shoudl be: ado_copy_relase_vars.sh src dest RELEASE_ID" | |
| exit 1 | |
| fi | |
| SOURCE_ENV=$1 | |
| DEST_ENV=$2 |
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
| set -e | |
| echo "set -e" > gitbuilder.sh | |
| dirs=() | |
| readarray -d '' dirs < <(find . -name .git -type d -prune) | |
| for dir in ${dirs[@]}; do | |
| cleandir=$(echo $dir | sed 's/\.git//') | |
| remote=$(git --git-dir=$dir remote -v | grep fetch | sed -r 's/origin\s+//' | sed -r 's/\s+\(fetch\)//') |
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
| MYIP=$(curl -s http://ipinfo.io/json | jq -r '.ip') && \ | |
| MATCH="^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" && \ | |
| if [[ $MYIP =~ $MATCH ]]; then \ | |
| echo "Adding $MYIP to $(SERVER_NAME) firewall"; \ | |
| az sql server firewall-rule create -g $(RESOURCE_GROUP) -s $(SERVER_NAME) -n ALLOW_ADO --start-ip-address $MYIP --end-ip-address $MYIP; \ | |
| else \ | |
| echo "$MYIP is not a valid IP address."; \ | |
| exit 1; \ | |
| fi |
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
| NEWEST_BLOB=$(az storage blob list \ | |
| --account-key $STORAGE_KEY \ | |
| --account-name $STORAGE_ACCOUNT \ | |
| -c $CONTAINER \ | |
| --prefix $PREFIX \ | |
| --query "[*].{name: name, date: properties.lastModified } | sort_by([*], &date) | [-1].name") | |
| NEWEST_BLOB=$(echo $NEWEST_BLOB | tr -d \") |
NewerOlder