-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NR-164383 provision canaries with Terraform
- Loading branch information
1 parent
18895bd
commit c3b485a
Showing
14 changed files
with
1,630 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# this script acceps a tag as input and it will search for the previous one and set both as env vars | ||
# for GHA | ||
# if no tag is passed as parameter, the latest one will be used | ||
|
||
# fetch the history (including tags) from within a shallow clone like CI-GHA | ||
# supress error when the repository is a complete one. | ||
git fetch --prune --unshallow 2> /dev/null || true | ||
|
||
TAG=$1 | ||
if [ -z $TAG ];then | ||
TAG=$( git tag | grep -E "^[0-9]+\.[0-9]+\.[0-9]$" | sort | tail -n 1 ) | ||
fi | ||
|
||
PREVIOUS_TAG=$( git tag | grep -E "^[0-9]+\.[0-9]+\.[0-9]$" | sort | grep -B 1 $TAG | head -n 1 ) | ||
|
||
# Set the variables for later use in the GHA pipeline | ||
{ | ||
echo "NR_VERSION=${TAG}" | ||
echo "PREVIOUS_NR_VERSION=${PREVIOUS_TAG}" | ||
} >> "$GITHUB_ENV" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.PHONY: deleteme | ||
deleteme: | ||
cp "$(TERRAFORM_DIR)/file" "$(TERRAFORM_DIR)/file1" | ||
sed -i '' -e "s/PREFIX/$(PREFIX)/g" "$(TERRAFORM_DIR)/file1" | ||
#sed -i '' -e "s/TAG_OR_UNIQUE_NAME/$(TAG_OR_UNIQUE_NAME)/g" "$(TERRAFORM_DIR)/file1" |
Oops, something went wrong.