This repository was archived by the owner on May 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Expand file tree Collapse file tree 4 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ variable "jfrog_url" {
19
19
}
20
20
}
21
21
22
+ variable "jfrog_server_id" {
23
+ type = string
24
+ description = " The server ID of the JFrog instance for JFrog CLI confuguration"
25
+ default = " 0"
26
+ }
27
+
22
28
variable "username_field" {
23
29
type = string
24
30
description = " The field to use for the artifactory username. i.e. Coder username or email."
@@ -79,6 +85,7 @@ resource "coder_script" "jfrog" {
79
85
script = templatefile (" ${ path . module } /run.sh" , {
80
86
JFROG_URL : var.jfrog_url,
81
87
JFROG_HOST : local.jfrog_host,
88
+ JFROG_SERVER_ID : var.jfrog_server_id,
82
89
ARTIFACTORY_USERNAME : local.username,
83
90
ARTIFACTORY_EMAIL : data.coder_workspace.me.owner_email,
84
91
ARTIFACTORY_ACCESS_TOKEN : data.coder_external_auth.jfrog.access_token,
Original file line number Diff line number Diff line change 15
15
# flows.
16
16
export CI=true
17
17
# Authenticate JFrog CLI with Artifactory.
18
- echo " ${ARTIFACTORY_ACCESS_TOKEN} " | jf c add --access-token-stdin --url " ${JFROG_URL} " --overwrite 0
18
+ echo " ${ARTIFACTORY_ACCESS_TOKEN} " | jf c add --access-token-stdin --url " ${JFROG_URL} " --overwrite " ${JFROG_SERVER_ID} "
19
19
# Set the configured server as the default.
20
- jf c use 0
20
+ jf c use " ${JFROG_SERVER_ID} "
21
21
22
22
# Configure npm to use the Artifactory "npm" repository.
23
23
if [ -z " ${REPOSITORY_NPM} " ]; then
Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ variable "jfrog_url" {
23
23
}
24
24
}
25
25
26
+ variable "jfrog_server_id" {
27
+ type = string
28
+ description = " The server ID of the JFrog instance for JFrog CLI confuguration"
29
+ default = " 0"
30
+ }
31
+
26
32
variable "artifactory_access_token" {
27
33
type = string
28
34
description = " The admin-level access token to use for JFrog."
@@ -112,6 +118,7 @@ resource "coder_script" "jfrog" {
112
118
script = templatefile (" ${ path . module } /run.sh" , {
113
119
JFROG_URL : var.jfrog_url,
114
120
JFROG_HOST : local.jfrog_host,
121
+ JFROG_SERVER_ID : var.jfrog_server_id,
115
122
ARTIFACTORY_USERNAME : local.username,
116
123
ARTIFACTORY_EMAIL : data.coder_workspace.me.owner_email,
117
124
ARTIFACTORY_ACCESS_TOKEN : artifactory_scoped_token.me.access_token,
Original file line number Diff line number Diff line change 15
15
# flows.
16
16
export CI=true
17
17
# Authenticate JFrog CLI with Artifactory.
18
- echo " ${ARTIFACTORY_ACCESS_TOKEN} " | jf c add --access-token-stdin --url " ${JFROG_URL} " --overwrite 0
18
+ echo " ${ARTIFACTORY_ACCESS_TOKEN} " | jf c add --access-token-stdin --url " ${JFROG_URL} " --overwrite " ${JFROG_SERVER_ID} "
19
19
# Set the configured server as the default.
20
- jf c use 0
20
+ jf c use " ${JFROG_SERVER_ID} "
21
21
22
22
# Configure npm to use the Artifactory "npm" repository.
23
23
if [ -z " ${REPOSITORY_NPM} " ]; then
You can’t perform that action at this time.
0 commit comments