-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dtspo 13916 terraform format implementation #1106
base: master
Are you sure you want to change the base?
Conversation
…AT-IMPLEMENTATION add master changes
updating with chanages to master
…AT-IMPLEMENTATION uodating master changes
…AT-IMPLEMENTATION updating master changes
…AT-IMPLEMENTATION merge master changes
vars/spinInfra.groovy
Outdated
USER_NAME=${1} | ||
BEARER_TOKEN=${2} | ||
EMAIL_ID=${3} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this? it will be breaking it
vars/spinInfra.groovy
Outdated
sh 'terraform fmt -recursive' | ||
|
||
// Commit the formatting changes | ||
git fetch origin $BRANCH:$BRANCH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be in an sh
step
vars/spinInfra.groovy
Outdated
git fetch origin $BRANCH:$BRANCH | ||
sh 'git remote set-url origin $(git config remote.origin.url | sed "s/github.com/${USER_NAME}:${BEARER_TOKEN}@github.com/g ")' | ||
|
||
sh "git config --global user.name ${USER_NAME}:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all these sh
steps should be combined into one and they probably should be in an external script in the resources folder, see an example:
steps.writeFile(file: 'save-pods-logs.sh', text: steps.libraryResource('uk/gov/hmcts/helm/save-pods-logs.sh')) |
rm -f save-pods-logs.sh |
adding changes from master
adding changes from master
Resolves # . (This is applicable only if this pull request relates to a GitHub issue, delete the line otherwise)
Notes:
https://tools.hmcts.net/jira/browse/DTSPO-13916
Adding a auto terraform formatting updater for branches and warning message.