From dd31c2bc331e3e43073cc4fd9032be45c90ea281 Mon Sep 17 00:00:00 2001 From: Tom Monaghan <62273348+t-monaghan@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:30:26 +1000 Subject: [PATCH 1/2] If install_hotel.sh is run with token, configure hotel to use this token (#51) --- scripts/install_hotel.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install_hotel.sh b/scripts/install_hotel.sh index 28f0f65..ebd4c03 100755 --- a/scripts/install_hotel.sh +++ b/scripts/install_hotel.sh @@ -79,11 +79,16 @@ install_hotel() { INITIAL_DIR="$PWD" TMPDIR=$(mktemp -d) cd "$TMPDIR" - download_latest_hotel + download_latest_hotel mkdir -p "$hotel_bin_path/" mv hotel "$hotel_bin_path" cd "$INITIAL_DIR" rm -rf "$TMPDIR" + if [ -n "$github_token" ]; then + mkdir -p ~/.config/hotel + touch ~/.config/hotel/config.yaml + echo "github.token: $github_token" >> ~/.config/hotel/config.yaml + fi log "=> installing hotel, this will ask for a sudo password" sudo "$hotel_bin_path/hotel" setup launcher } @@ -95,7 +100,7 @@ main() { github_token="$(security find-generic-password -s "com.cultureamp.hotel" -a github.app -w)" fi - install_hotel + install_hotel } main "$@" From be540cc607c6633ba2d1ee020aba06fc8557ee5b Mon Sep 17 00:00:00 2001 From: Tom Monaghan <62273348+t-monaghan@users.noreply.github.com> Date: Wed, 2 Oct 2024 10:33:48 +1000 Subject: [PATCH 2/2] Remove bootstrap testing, replace bootstrap with deprecation notice (#50) * removes bootstrap * bootstrap prints deprecation notice * clean up bootstrap tests --------- Co-authored-by: Bruce Wang <93868025+cultureamp-brucew@users.noreply.github.com> --- bootstrap-test.Dockerfile | 22 ---------------------- devbox.json | 12 ------------ 2 files changed, 34 deletions(-) delete mode 100644 bootstrap-test.Dockerfile diff --git a/bootstrap-test.Dockerfile b/bootstrap-test.Dockerfile deleted file mode 100644 index 45fc8e3..0000000 --- a/bootstrap-test.Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -FROM ubuntu:latest - -RUN apt-get update \ - && apt-get install -y sudo curl ca-certificates git - -ARG NETSKOPE_CERT -RUN if [ "${NETSKOPE_CERT}z" != "z" ]; then \ - echo "Installing Netskope MitM certificates" && \ - echo "${NETSKOPE_CERT}" >> /usr/local/share/ca-certificates/netskope.crt; \ - update-ca-certificates; \ - fi - - -WORKDIR /app - -COPY . . - -ARG SHELL_VAR -RUN "./test/docker-test-wrapper-$SHELL_VAR.sh" - -RUN ["devbox", "run", "echo", "installed"] -ENTRYPOINT ["devbox", "run"] diff --git a/devbox.json b/devbox.json index aa2fd9a..f72649e 100644 --- a/devbox.json +++ b/devbox.json @@ -36,18 +36,6 @@ "devbox run test-bash", "devbox run test-zsh", "devbox run test-fish" - ], - "test-bash": [ - "docker build -t bootstrap-script-test --build-arg NETSKOPE_CERT=\"$(cat \"$NETSKOPE_CERT_PATH\")\" --build-arg SHELL_VAR=bash -f ./bootstrap-test.Dockerfile .", - "docker run bootstrap-script-test bats test/bootstrap-agnostic.bats test/bootstrap-bash.bats" - ], - "test-zsh": [ - "docker build -t bootstrap-script-test --build-arg NETSKOPE_CERT=\"$(cat \"$NETSKOPE_CERT_PATH\")\" --build-arg SHELL_VAR=zsh -f ./bootstrap-test.Dockerfile .", - "docker run bootstrap-script-test bats test/bootstrap-agnostic.bats test/bootstrap-zsh.bats" - ], - "test-fish": [ - "docker build -t bootstrap-script-test --build-arg NETSKOPE_CERT=\"$(cat \"$NETSKOPE_CERT_PATH\")\" --build-arg SHELL_VAR=fish -f ./bootstrap-test.Dockerfile .", - "docker run bootstrap-script-test bats test/bootstrap-agnostic.bats test/bootstrap-fish.bats" ] } }