Skip to content

Commit

Permalink
added the cloud tenant in the Jenkins file
Browse files Browse the repository at this point in the history
  • Loading branch information
ramavenkata-loya committed Jun 25, 2024
1 parent 9682ebd commit 3d4de3a
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,39 @@ pipeline {
}
}
}
stages {
stage('Get InfraPool ExecutorV2 Agent') {
steps {
script {
INFRAPOOL_EXECUTORV2_AGENT_0 = getInfraPoolAgent.connected(type: "ExecutorV2", quantity: 1, duration: 1)[0]
}
}
}
stage('Create a Tenant') {
steps {
script {
TENANT = getConjurCloudTenant()
}
}
}
stage('Authenticate') {
steps {
script {
def id_token = getConjurCloudTenant.tokens(
infrapool: INFRAPOOL_EXECUTORV2_AGENT_0,
identity_url: "${TENANT.identity_information.idaptive_tenant_fqdn}",
username: "${TENANT.login_name}",
)

def conj_token = getConjurCloudTenant.tokens(
infrapool: INFRAPOOL_EXECUTORV2_AGENT_0,
conjur_url: "${TENANT.conjur_cloud_url}",
identity_token: "${id_token}"
)
}
}
}
}

stage('Build Release Artifacts') {
when {
Expand Down Expand Up @@ -185,6 +218,9 @@ pipeline {

post {
always {
script {
deleteConjurCloudTenant("${TENANT.id}")
}
cleanupAndNotify(currentBuild.currentResult)
}
}
Expand Down

0 comments on commit 3d4de3a

Please sign in to comment.