@@ -3,7 +3,7 @@ component:
3
3
mapping :
4
4
- .
5
5
dependsOn :
6
- - ../demo_storage_bucket
6
+ - ../google_storage
7
7
template :
8
8
terraform :
9
9
backend :
@@ -23,9 +23,15 @@ component:
23
23
source : ./demo.zip
24
24
google_cloudfunctions_function :
25
25
google_function :
26
+ <<<<<<< HEAD:google_function/.terrahub.yml
26
27
depends_on :
27
28
- google_storage_bucket_object.google_storage_object
28
29
name : ' demofunction${local.project["code"]}'
30
+ =======
31
+ name : ' demofunction${local.project["code"]}'
32
+ depends_on :
33
+ - google_storage_bucket_object.google_storage_object
34
+ >>>>>>> 954e40474032055d4b4f929cfdbe7991e50c8e39:google_function/.terrahub.yml
29
35
region : us-central1
30
36
runtime : nodejs8
31
37
description : My demo function
@@ -35,6 +41,24 @@ component:
35
41
trigger_http : true
36
42
timeout : 60
37
43
entry_point : helloGET
44
+ <<<<<<< HEAD:google_function/.terrahub.yml
45
+ =======
46
+ google_storage_bucket_object :
47
+ google_storage_object :
48
+ name : demo.zip
49
+ bucket : ' ${data.terraform_remote_state.storage.thub_id}'
50
+ source : ./demo.zip
51
+ terraform :
52
+ backend :
53
+ local :
54
+ path : /tmp/.terrahub/local_backend/google_function/terraform.tfstate
55
+ data :
56
+ terraform_remote_state :
57
+ storage :
58
+ backend : local
59
+ config :
60
+ path : /tmp/.terrahub/local_backend/google_storage/terraform.tfstate
61
+ >>>>>>> 954e40474032055d4b4f929cfdbe7991e50c8e39:google_function/.terrahub.yml
38
62
output :
39
63
id :
40
64
value : ' ${google_cloudfunctions_function.google_function.id}'
@@ -64,7 +88,20 @@ build:
64
88
build :
65
89
commands :
66
90
- ' echo "BUILD: Running build step"'
91
+ <<<<<<< HEAD:google_function/.terrahub.yml
67
92
- ./scripts/build.sh $COMPONENT_NAME $OBJECT_NAME $THUB_BUCKET_KEY/
93
+ =======
94
+ - >-
95
+ if [ "$(head -n 1 "$THUB_FUNCTION_TXT")" != "$(stat -c %y
96
+ "${THUB_BUILD_PATH}/index.js")" ]; then zip -j ${THUB_FUNCTION_ZIP}
97
+ ${THUB_BUILD_PATH}/index.js; fi
98
+ - >-
99
+ if [ "$(head -n 1 "$THUB_FUNCTION_TXT")" != "$(stat -c %y
100
+ "${THUB_BUILD_PATH}/index.js")" ]; then terrahub configure -i
101
+ google_function -c
102
+ component.template.resource.google_storage_bucket_object.google_storage_object.name=$(date
103
+ +%s).zip; fi
104
+ >>>>>>> 954e40474032055d4b4f929cfdbe7991e50c8e39:google_function/.terrahub.yml
68
105
finally :
69
106
- ' echo "BUILD: build step successful"'
70
107
post_build :
0 commit comments