Skip to content

Instantly share code, notes, and snippets.

View jhvhs's full-sized avatar

Konstantin Semenov jhvhs

View GitHub Profile
@jhvhs
jhvhs / find_all_git_resources
Last active January 10, 2024 15:52
This script can be used to find all git resources for a given repository across all concourse pipelines
#!/usr/bin/env bash
set -eu
function print_framed() {
local line=${1}
printf "\n+="
for ((i=1; i <= ${#line}; i++)); do echo -n =; done
printf "=+\n| %s |\n+=" "$line"
for ((i=1; i <= ${#line}; i++)); do echo -n =; done
2022-10-05T18:37:39.915+0100 [INFO] Terraform version: 1.3.1
2022-10-05T18:37:39.915+0100 [DEBUG] using github.com/hashicorp/go-tfe v1.9.0
2022-10-05T18:37:39.915+0100 [DEBUG] using github.com/hashicorp/hcl/v2 v2.14.1
2022-10-05T18:37:39.915+0100 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2022-10-05T18:37:39.915+0100 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2022-10-05T18:37:39.915+0100 [DEBUG] using github.com/zclconf/go-cty v1.11.0
2022-10-05T18:37:39.915+0100 [INFO] Go runtime version: go1.19.1
2022-10-05T18:37:39.915+0100 [INFO] CLI args: []string{"terraform", "plan"}
2022-10-05T18:37:39.915+0100 [TRACE] Stdout is a terminal of width 125
2022-10-05T18:37:39.915+0100 [TRACE] Stderr is a terminal of width 125
@jhvhs
jhvhs / concourse-maintainer.sh
Last active April 16, 2019 15:17
A script for maintaining a concourse deployment
#!/usr/bin/env bash
set -eu
set -o pipefail
[[ -z "${DEBUG:-}" ]] || set -x
cleanup(){
if [[ -d concourse-bosh-deployment ]]; then
rm -rf concourse-bosh-deployment
fi
}
---
resource_types:
- name: slack-notification-resource
type: docker-image
source:
repository: cfcommunity/slack-notification-resource
tag: latest
resources:
- name: schedule