Skip to content

Commit

Permalink
Tweak the env skip logic
Browse files Browse the repository at this point in the history
  • Loading branch information
bsquizz committed Sep 26, 2019
1 parent f71b9c0 commit ba3acc7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions vars/deployHelpers.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ def getChangeInfo(parameters = [:]) {
if (dir == "env") {
// if an env yaml was changed, process all templates using that env file
def envFile = l.split('/')[1]
def envFileSplit = envFile.split('.')

// if we are only analyzing a specific env, ignore other changed env files
if (envFileSplit && !envFileSplit[0].equals(envName)) continue

if (envFile.endsWith(".yaml") || envFile.endsWith(".yml")) {
changeInfo['templates'].add(allTemplates)
changeInfo['envFiles'].add(envFile)
changeInfo['envFilesForDiff'].add(envFile)
def envFileSplit = envFile.split('.')
// if we are only analyzing a specific env, ignore other changed env files
if (!envName || envFileSplit[0].equals(envName)) {
changeInfo['templates'].add(allTemplates)
changeInfo['envFiles'].add(envFile)
changeInfo['envFilesForDiff'].add(envFile)
} else {
echo "Ignoring changes for ${envFile} -- only analyzing changes for env ${envName}"
}
}
}
else if (dir == "templates") {
Expand Down

0 comments on commit ba3acc7

Please sign in to comment.