Skip to content

Commit c052ece

Browse files
authored
Configure doppler in Gitpod config (#15)
* Configure doppler in Gitpod config * Up * up
1 parent d21697f commit c052ece

File tree

4 files changed

+12
-23
lines changed

4 files changed

+12
-23
lines changed

.gitpod.Dockerfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@ RUN pyenv install 3.11 \
44
&& pyenv global 3.11
55

66
# Install gh CLI
7-
RUN cd /tmp \
8-
&& curl -L "https://github.com/cli/cli/releases/download/v2.32.0/gh_2.32.0_linux_amd64.tar.gz" -o gh.tar.gz \
9-
&& tar -xpf gh.tar.gz && sudo mv gh_*linux_amd64/bin/gh /usr/bin/gh
7+
RUN (curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh || wget -t 3 -qO- https://cli.doppler.com/install.sh) | sudo sh

.gitpod.yml

+11-15
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,19 @@ image:
22
file: .gitpod.Dockerfile
33

44
tasks:
5-
- name: Install deps and enter shell
5+
- name: Doppler login
66
command: |
7-
poetry install
8-
poetry shell
7+
printf "\033[3J\033c\033[3J"
8+
printf '%s\n' "${DOPPLER_TOKEN}" | doppler configure set token --scope "${GITPOD_REPO_ROOT}"
9+
printf '• %s\n' \
10+
"To update the values of ${GITPOD_REPO_ROOT}/ProdBotConfig.toml go to ${DOPPLER_URL}"
911
10-
- name: Setup gh auth and pull ProdBotConfig.toml
12+
- name: Install deps and enter shell
1113
command: |
14+
poetry install
1215
printf "\033[3J\033c\033[3J"
13-
14-
if token="$(printf '%s\n' "host=github.com" | gp credential-helper get | awk -F'password=' '{print $2}')"; then {
15-
printf "${token}" | gh auth login --with-token
16-
gh api /repos/gitpod-io/glu/actions/variables \
17-
| jq -r '.variables[] | select(.name == "CONFIG_BASE64") | .value' \
18-
| base64 -d > ProdBotConfig.toml
19-
gp open ProdBotConfig.toml & disown
20-
} fi
21-
2216
printf '• %s\n' \
23-
"You can modify the ${GITPOD_REPO_ROOT}/ProdBotConfig.toml config file as needed" \
24-
"And, to push the new config to the prod server, run \`${GITPOD_REPO_ROOT:-.}/scripts/deploy_gitpod.sh\`"
17+
'Run this command to start bot:' \
18+
'doppler run --config main --mount BotConfig.toml --mount-template BotConfig_tmpl.toml -- poetry run python3 -m glu'
19+
20+
poetry shell -q

ProdBotConfig.toml

Whitespace-only changes.

scripts/deploy_gitpod.sh

-5
This file was deleted.

0 commit comments

Comments
 (0)