@@ -12,16 +12,14 @@ load ../test_helper
12
12
needs_aws
13
13
14
14
config () {
15
- echo " namespace: ${STACKER_NAMESPACE} "
15
+ echo " namespace: ${STACKER_NAMESPACE} -integrated-hooks "
16
16
cat << 'EOF '
17
17
stacks:
18
- - name: buckets
18
+ - name: bucket
19
19
profile: stacker
20
- class_path: stacker_blueprints.s3.Buckets
20
+ template_path: fixtures/blueprints/bucket.yaml.j2
21
21
variables:
22
- Buckets:
23
- StackerTestBucket:
24
- BucketName: "stacker-${envvar STACKER_NAMESPACE}-integrated-hooks-${awsparam AccountId}"
22
+ BucketName: "stacker-${envvar STACKER_NAMESPACE}-integrated-hooks-${awsparam AccountId}"
25
23
26
24
build_hooks:
27
25
- name: write-hello
@@ -38,7 +36,7 @@ build_hooks:
38
36
command: 'aws s3 cp /tmp/hello.txt "s3://$BUCKET/hello.txt"'
39
37
shell: true
40
38
env:
41
- BUCKET: "${output buckets::StackerTestBucketBucketId }"
39
+ BUCKET: "${output bucket::BucketName }"
42
40
AWS_PROFILE: stacker
43
41
44
42
- name: send-world
@@ -49,7 +47,7 @@ build_hooks:
49
47
command: 'aws s3 cp "s3://$BUCKET/hello.txt" "s3://$BUCKET/world.txt"'
50
48
shell: true
51
49
env:
52
- BUCKET: "${output buckets::StackerTestBucketBucketId }"
50
+ BUCKET: "${output bucket::BucketName }"
53
51
AWS_PROFILE: stacker
54
52
55
53
destroy_hooks:
@@ -59,7 +57,7 @@ destroy_hooks:
59
57
command: 'aws s3 rm "s3://$BUCKET/world.txt"'
60
58
shell: true
61
59
env:
62
- BUCKET: "${output buckets::StackerTestBucketBucketId }"
60
+ BUCKET: "${output bucket::BucketName }"
63
61
AWS_PROFILE: stacker
64
62
65
63
- name: remove-hello
@@ -70,13 +68,13 @@ destroy_hooks:
70
68
command: 'aws s3 rm "s3://$BUCKET/hello.txt"'
71
69
shell: true
72
70
env:
73
- BUCKET: "${output buckets::StackerTestBucketBucketId }"
71
+ BUCKET: "${output bucket::BucketName }"
74
72
AWS_PROFILE: stacker
75
73
76
74
- name: clean-hello
77
75
path: stacker.hooks.command.run_command
78
76
required_by:
79
- - buckets
77
+ - bucket
80
78
args:
81
79
command: [rm, -f, /tmp/hello.txt]
82
80
EOF
86
84
stacker destroy --force <( config)
87
85
}
88
86
89
- stacker build <( config)
87
+ stacker build -t --recreate-failed <( config)
90
88
assert " $status " -eq 0
91
89
assert_has_line " Using default AWS provider mode"
92
90
assert_has_lines_in_order -E << 'EOF '
93
91
pre_build_hooks: complete
94
92
write-hello: complete
95
- buckets : submitted \(creating new stack\)
96
- buckets : complete \(creating new stack\)
93
+ bucket : submitted \(creating new stack\)
94
+ bucket : complete \(creating new stack\)
97
95
upload: [^ ]*/hello.txt to s3://[^ ]*/hello.txt
98
96
send-hello: complete
99
97
copy: s3://[^ ]*/hello.txt to s3://[^ ]*/world.txt
@@ -110,8 +108,8 @@ delete: s3://[^ ]*/world.txt
110
108
remove-world: complete
111
109
delete: s3://[^ ]*/hello.txt
112
110
remove-hello: complete
113
- buckets : submitted \(submitted for destruction\)
114
- buckets : complete \(stack destroyed\)
111
+ bucket : submitted \(submitted for destruction\)
112
+ bucket : complete \(stack destroyed\)
115
113
clean-hello: complete
116
114
post_destroy_hooks: complete
117
115
EOF
125
123
pre_destroy_hooks: complete
126
124
remove-world: skipped
127
125
remove-hello: skipped
128
- buckets : skipped
126
+ bucket : skipped
129
127
clean-hello: complete
130
128
post_destroy_hooks: complete
131
129
EOF
0 commit comments