Skip to content

Commit

Permalink
Updating Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
guptamukul-google committed Nov 15, 2021
1 parent 8894a04 commit 5775812
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 138 deletions.
126 changes: 0 additions & 126 deletions .github/workflows/build-tf-plan.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/check-license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: 'BUILD - Check Lisence Boilerplate'
name: 'CHECK - Check Lisence Boilerplate'

on:
schedule:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# .github/workflows/tf-plan.yml
# .github/workflows/check-tf-plan.yml

# Copyright 2021 Google LLC
#
Expand All @@ -14,13 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: '[NEW] BUILD - Terraform Plan'
name: 'CHECK - Terraform Plan'

on:
# pull_request:
# types: [opened, reopened]
# paths:
# - 'modules/**/*.tf'
pull_request:
types: [opened, reopened]
paths:
- 'modules/**/*.tf'
workflow_dispatch:
inputs:
PRNumber:
Expand Down
10 changes: 5 additions & 5 deletions tools/tf-plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ def main(PR):
try:
for dir in working_directories:

print('****************************')
print(glob.glob(os.getcwd() + '/temp/' + dir+'/*'))
print('****************************')
print(glob.glob(os.getcwd() + '/temp/' + dir+'/*/*'))
# print('****************************')
# print(glob.glob(os.getcwd() + '/temp/' + dir+'/*'))
# print('****************************')
# print(glob.glob(os.getcwd() + '/temp/' + dir+'/*/*'))

comment, status = tf(os.getcwd() + '/temp/' + dir)
# commentpr(GITHUB_REPOSITORY, PR, comment, TOKEN)
commentpr(GITHUB_REPOSITORY, PR, comment, TOKEN)
if(status == 'fail'):
sys.exit('Terraform Init or Terraform Plan FAILED for: '+ dir)
except requests.exceptions.RequestException as e:
Expand Down

0 comments on commit 5775812

Please sign in to comment.