Skip to content

Commit 8646f7c

Browse files
authored
chore: add JFrog VS Code extension to jfrog template (#9128)
1 parent 752070b commit 8646f7c

File tree

1 file changed

+13
-0
lines changed
  • examples/templates/jfrog/docker

1 file changed

+13
-0
lines changed

examples/templates/jfrog/docker/main.tf

+13
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ resource "coder_agent" "main" {
6969
curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.11.0
7070
/tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
7171
72+
# Install the JFrog VS Code extension.
73+
# Find the latest version number at
74+
# https://open-vsx.org/extension/JFrog/jfrog-vscode-extension.
75+
JFROG_EXT_VERSION=2.4.1
76+
curl -o /tmp/jfrog.vsix -L "https://open-vsx.org/api/JFrog/jfrog-vscode-extension/$JFROG_EXT_VERSION/file/JFrog.jfrog-vscode-extension-$JFROG_EXT_VERSION.vsix"
77+
/tmp/code-server/bin/code-server --install-extension /tmp/jfrog.vsix
78+
7279
# The jf CLI checks $CI when determining whether to use interactive
7380
# flows.
7481
export CI=true
@@ -95,6 +102,12 @@ resource "coder_agent" "main" {
95102
# Set GOPROXY to use the Artifactory "go" repository.
96103
env = {
97104
GOPROXY : "https://${local.artifactory_username}:${artifactory_scoped_token.me.access_token}@${var.jfrog_host}/artifactory/api/go/${local.artifactory_repository_keys["go"]}"
105+
# Authenticate with JFrog extension.
106+
JFROG_IDE_URL : "https://${var.jfrog_host}"
107+
JFROG_IDE_USERNAME : "${local.artifactory_username}"
108+
JFROG_IDE_PASSWORD : "${artifactory_scoped_token.me.access_token}"
109+
JFROG_IDE_ACCESS_TOKEN : "${artifactory_scoped_token.me.access_token}"
110+
JFROG_IDE_STORE_CONNECTION : "true"
98111
}
99112
}
100113

0 commit comments

Comments
 (0)