Skip to content

Commit

Permalink
refactor dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
mshahmalaki committed Mar 2, 2022
1 parent 2d8eb20 commit 776f6b0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ override.tf.json
# Ignore CLI configuration files
.terraformrc
terraform.rc
.terraform.lock.hcl
.terraform.lock.hcl
.DS_Store
14 changes: 7 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ pipeline {
stages {
stage("Load Configurations"){
steps{
load "jkenvs/${env.JOB_NAME}.groovy"
dir("TFConfigs"){
load "jenkins/env/${env.JOB_NAME}.groovy"
dir("jenkins/config"){
git(
url: "$INFRA_CONFIG_GIT_URL",
branch: "main",
credentialsId: "$INFRA_CONFIG_GIT_CREDENTIAL_ID"
)
}
sh "mv TFConfigs/terraform.tfvars ."
sh "mv TFConfigs/backend.tfvars ."
sh "mv TFConfigs/envs.groovy ./jkenvs"
sh "rm -rf TFConfigs"
load "jkenvs/envs.groovy"
sh "mv jenkins/config/terraform.tfvars ."
sh "mv jenkins/config/backend.tfvars ."
sh "mv jenkins/config/envs.groovy ./jenkins/env"
sh "rm -rf jenkins/config"
load "jenkins/env/envs.groovy"
}
}
stage("Init"){
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 776f6b0

Please sign in to comment.