@@ -12,16 +12,14 @@ load ../test_helper
1212 needs_aws
1313
1414 config () {
15- echo " namespace: ${STACKER_NAMESPACE} "
15+ echo " namespace: ${STACKER_NAMESPACE} -integrated-hooks "
1616 cat << 'EOF '
1717stacks:
18- - name: buckets
18+ - name: bucket
1919 profile: stacker
20- class_path: stacker_blueprints.s3.Buckets
20+ template_path: fixtures/blueprints/bucket.yaml.j2
2121 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}"
2523
2624build_hooks:
2725 - name: write-hello
@@ -38,7 +36,7 @@ build_hooks:
3836 command: 'aws s3 cp /tmp/hello.txt "s3://$BUCKET/hello.txt"'
3937 shell: true
4038 env:
41- BUCKET: "${output buckets::StackerTestBucketBucketId }"
39+ BUCKET: "${output bucket::BucketName }"
4240 AWS_PROFILE: stacker
4341
4442 - name: send-world
@@ -49,7 +47,7 @@ build_hooks:
4947 command: 'aws s3 cp "s3://$BUCKET/hello.txt" "s3://$BUCKET/world.txt"'
5048 shell: true
5149 env:
52- BUCKET: "${output buckets::StackerTestBucketBucketId }"
50+ BUCKET: "${output bucket::BucketName }"
5351 AWS_PROFILE: stacker
5452
5553destroy_hooks:
@@ -59,7 +57,7 @@ destroy_hooks:
5957 command: 'aws s3 rm "s3://$BUCKET/world.txt"'
6058 shell: true
6159 env:
62- BUCKET: "${output buckets::StackerTestBucketBucketId }"
60+ BUCKET: "${output bucket::BucketName }"
6361 AWS_PROFILE: stacker
6462
6563 - name: remove-hello
@@ -70,13 +68,13 @@ destroy_hooks:
7068 command: 'aws s3 rm "s3://$BUCKET/hello.txt"'
7169 shell: true
7270 env:
73- BUCKET: "${output buckets::StackerTestBucketBucketId }"
71+ BUCKET: "${output bucket::BucketName }"
7472 AWS_PROFILE: stacker
7573
7674 - name: clean-hello
7775 path: stacker.hooks.command.run_command
7876 required_by:
79- - buckets
77+ - bucket
8078 args:
8179 command: [rm, -f, /tmp/hello.txt]
8280EOF
8684 stacker destroy --force <( config)
8785 }
8886
89- stacker build <( config)
87+ stacker build -t --recreate-failed <( config)
9088 assert " $status " -eq 0
9189 assert_has_line " Using default AWS provider mode"
9290 assert_has_lines_in_order -E << 'EOF '
9391pre_build_hooks: complete
9492write-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\)
9795upload: [^ ]*/hello.txt to s3://[^ ]*/hello.txt
9896send-hello: complete
9997copy: s3://[^ ]*/hello.txt to s3://[^ ]*/world.txt
@@ -110,8 +108,8 @@ delete: s3://[^ ]*/world.txt
110108remove-world: complete
111109delete: s3://[^ ]*/hello.txt
112110remove-hello: complete
113- buckets : submitted \(submitted for destruction\)
114- buckets : complete \(stack destroyed\)
111+ bucket : submitted \(submitted for destruction\)
112+ bucket : complete \(stack destroyed\)
115113clean-hello: complete
116114post_destroy_hooks: complete
117115EOF
125123pre_destroy_hooks: complete
126124remove-world: skipped
127125remove-hello: skipped
128- buckets : skipped
126+ bucket : skipped
129127clean-hello: complete
130128post_destroy_hooks: complete
131129EOF
0 commit comments