Last active
March 4, 2022 09:54
-
-
Save keskad/027fb751682d74b3b8018384b3f4edc9 to your computer and use it in GitHub Desktop.
Building `lighthouse-tekton-controller` and swapping it on live K8s cluster running on remote machine
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 -x | |
| set -e | |
| set -o pipefail | |
| DEPLOY_KEY_PATH=~/.ssh/deploy_key | |
| VERSION=$(date +%s) | |
| IMAGE="mydockerhublogin/test-lightouse-tekton-controller:${VERSION}" | |
| # notice: You may need to edit Dockerfile and change base image to glibc based (e.g. Debian Slim) | |
| export CC=/usr/bin/musl-gcc | |
| make build-tekton-controller | |
| docker build . -f ./docker/tekton/Dockerfile -t ${IMAGE} | |
| docker push ${IMAGE} | |
| ssh -i ${DEPLOY_KEY_PATH} ubuntu@example.org kubectl -n jx set image deployment/lighthouse-tekton-controller "*=${IMAGE}" | |
| sleep 30 | |
| ssh -i ${DEPLOY_KEY_PATH} ubuntu@example.org kubectl -n jx logs -f deployment/lighthouse-tekton-controller |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment