Skip to content

Commit

Permalink
rollback actions (#1940)
Browse files Browse the repository at this point in the history
  • Loading branch information
rberrelleza committed Nov 16, 2021
1 parent 60ee441 commit 8f7d479
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions rollback_actions.sh
@@ -0,0 +1,38 @@
#!/bin/bash
set -e

VERSION=$1

if [ -z "$VERSION" ]; then
echo "missing version"
exit 1
fi

actionsRepos=(delete-namespace
build
destroy-preview
deploy-preview
deploy-stack
namespace
pipeline
push
create-namespace
destroy-pipeline
login
destroy-stack
apply
context
)

for repo in "${actionsRepos[@]}"; do
echo "$repo"
rm -rf "$repo"
git clone git@github.com:okteto/"$repo".git
pushd "$repo"
git checkout "$VERSION"
git tag -d latest
git push --delete origin latest
ghr -token "$GITHUB_TOKEN" -delete "latest"
popd
rm -rf "$repo"
done

0 comments on commit 8f7d479

Please sign in to comment.