Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Last active January 18, 2022 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vfarcic/cba4f52d90d4d47fcb068a052077c953 to your computer and use it in GitHub Desktop.
Save vfarcic/cba4f52d90d4d47fcb068a052077c953 to your computer and use it in GitHub Desktop.
# Source: https://gist.github.com/cba4f52d90d4d47fcb068a052077c953
# Links to gists for creating a cluster with jx
# gke-jx-serverless.sh: https://gist.github.com/fe18870a015f4acc34d91c106d0d43c8
# eks-jx-serverless.sh: https://gist.github.com/f4a1df244d1852ee250e751c7191f5bd
# aks-jx-serverless.sh: https://gist.github.com/b07f45f6907c2a1c71f45dbe0df8d410
# install-serverless.sh: https://gist.github.com/7b3b3d90ecd7f343effe4fff5241d037
cd go-demo-6
git pull
git checkout pr-tekton
git merge -s ours master --no-edit
git checkout master
git merge pr-tekton
git push
# If GKE
export REGISTRY_OWNER=$PROJECT
# If EKS or AKS
# Replace `[...]` with your GitHub user
export REGISTRY_OWNER=[...]
cat charts/go-demo-6/Makefile \
| sed -e \
"s@vfarcic@$REGISTRY_OWNER@g" \
| sed -e \
"s@devops-26@$REGISTRY_OWNER@g" \
| tee charts/go-demo-6/Makefile
cat charts/preview/Makefile \
| sed -e \
"s@vfarcic@$REGISTRY_OWNER@g" \
| sed -e \
"s@devops-26@$REGISTRY_OWNER@g" \
| tee charts/preview/Makefile
cat skaffold.yaml \
| sed -e \
"s@vfarcic@$REGISTRY_OWNER@g" \
| sed -e \
"s@devops-26@$REGISTRY_OWNER@g" \
| tee skaffold.yaml
jx import --batch-mode
jx get activities \
--filter go-demo-6 \
--watch
jx get applications --env production
jx get applications --env staging
VERSION=[...]
jx promote go-demo-6 \
--version $VERSION \
--env production \
--batch-mode
jx get applications --env production
PROD_ADDR=[...]
curl "$PROD_ADDR/demo/hello"
cd ..
GH_USER=[...]
hub delete -y \
$GH_USER/environment-jx-rocks-staging
hub delete -y \
$GH_USER/environment-jx-rocks-production
rm -rf ~/.jx/environments/$GH_USER/environment-jx-rocks-*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment