File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed 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