├── .final_builds ├── jobs │ ├── just_install_packages │ │ └── index.yml │ └── slack-notification-resource │ │ └── index.yml ├── license │ └── index.yml └── packages │ └── slack-notification-resource │ └── index.yml ├── .gitignore ├── LICENSE.md ├── README.md ├── Rakefile ├── config ├── blobs.yml └── final.yml ├── examples ├── .gitignore ├── dynamic-text-pipeline.yml └── static-text-pipeline.yml ├── jobs ├── .gitkeep └── slack-notification-resource │ ├── monit │ ├── spec │ └── templates │ └── ignoreme ├── packages ├── .gitkeep └── slack-notification-resource │ ├── packaging │ └── spec ├── pipeline.yml ├── releases └── slack-notification-resource │ ├── index.yml │ ├── slack-notification-resource-1.yml │ ├── slack-notification-resource-2.yml │ ├── slack-notification-resource-3.yml │ ├── slack-notification-resource-4.yml │ ├── slack-notification-resource-5.yml │ ├── slack-notification-resource-6.yml │ ├── slack-notification-resource-7.yml │ ├── slack-notification-resource-8.yml │ └── slack-notification-resource-9.yml ├── src ├── .gitkeep └── ci │ └── scripts │ ├── embed_image_blob.sh │ └── update_subtree.sh └── templates ├── deployment.yml ├── infrastructure-aws-ec2.yml ├── infrastructure-warden.yml ├── jobs.yml ├── make_manifest └── stub.yml /.final_builds/jobs/just_install_packages/index.yml: -------------------------------------------------------------------------------- 1 | --- 2 | builds: 3 | 265b2af741449ce2c5a8b3989b9ea45c258255ef: 4 | version: 265b2af741449ce2c5a8b3989b9ea45c258255ef 5 | sha1: 4f47f1f5da51fd162d471226fd459ae2df2f7d26 6 | blobstore_id: b0581e68-7b3b-4514-bb2f-d4896bee76b8 7 | format-version: '2' 8 | -------------------------------------------------------------------------------- /.final_builds/jobs/slack-notification-resource/index.yml: -------------------------------------------------------------------------------- 1 | --- 2 | builds: 3 | 2d335e8843c35961ae3c850d6ad576b1ad7bdf80: 4 | version: 2d335e8843c35961ae3c850d6ad576b1ad7bdf80 5 | sha1: 2257aa3091a4b5440c0decf79fd9c90ab00ba8bd 6 | blobstore_id: 6e244d18-6f17-4470-bc48-831d99a8580b 7 | format-version: '2' 8 | -------------------------------------------------------------------------------- /.final_builds/license/index.yml: -------------------------------------------------------------------------------- 1 | --- 2 | builds: 3 | 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c: 4 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 5 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 6 | blobstore_id: d52b56e5-4d04-4987-8dd1-9e464adad314 7 | format-version: '2' 8 | -------------------------------------------------------------------------------- /.final_builds/packages/slack-notification-resource/index.yml: -------------------------------------------------------------------------------- 1 | --- 2 | builds: 3 | f877cea508d9dbffad643ce1d725aeafbe2f67b5: 4 | version: f877cea508d9dbffad643ce1d725aeafbe2f67b5 5 | sha1: 37f74ef45f40a336f6b3ad2a02a5d0a640ce621f 6 | blobstore_id: 5b2db2e7-63ca-4669-9549-50a326078815 7 | b6934e87397751ffe666d0bead6eef9e3c62593f: 8 | version: b6934e87397751ffe666d0bead6eef9e3c62593f 9 | sha1: 132b9890e357cc34a6e7b559bf1995b62ce3d229 10 | blobstore_id: 9978dc5f-8061-460d-93cc-e4934746ff4f 11 | 48abf5f1250a724dc55e1bf5b1930256709c3224: 12 | version: 48abf5f1250a724dc55e1bf5b1930256709c3224 13 | sha1: d41a5336f1deaa282fc78a9284a23b067c7b7b50 14 | blobstore_id: 34223293-a5f1-4362-9bd7-fd47c02784a2 15 | cbbbdf271b99d881291eadc7f095dd846aa98ce4: 16 | version: cbbbdf271b99d881291eadc7f095dd846aa98ce4 17 | sha1: 53be61fc9e442157ae93bfb70e84408be8d92d3b 18 | blobstore_id: c59d96c4-e66a-4e05-8f31-19ee13fe60dd 19 | 071ba848c20f99ccc802af4c6e1182d101d1a60d: 20 | version: 071ba848c20f99ccc802af4c6e1182d101d1a60d 21 | sha1: 647ebd1cd0351a79d0137c8c842508c840e0b880 22 | blobstore_id: 1880548d-010a-42a6-81be-423bd2fd4cd8 23 | a22527bbd1f730cd82e286cefa49badca0b5bdcc: 24 | version: a22527bbd1f730cd82e286cefa49badca0b5bdcc 25 | sha1: 1cf30237f131e8415c7c87fa7f17a2dd74a5221c 26 | blobstore_id: d86d3d3b-89c1-4571-94c7-bad5c6146d51 27 | c24ab7eaf484f73e597aaf2422901421666ee6a0: 28 | version: c24ab7eaf484f73e597aaf2422901421666ee6a0 29 | sha1: 0c6bb0cdee5a85072a7ed73aab8dbc06897bff8c 30 | blobstore_id: 46b990f5-2ff9-4854-b162-8b5a83ec274c 31 | 0c0d1ca829024864f2af91d481bdcde1972c1066: 32 | version: 0c0d1ca829024864f2af91d481bdcde1972c1066 33 | sha1: 82bd6f77ab85b4d47b3159ae4df27bad2f537ee6 34 | blobstore_id: 4f60d44f-c1a7-4e1e-bf4a-193c03f19bb5 35 | 418ad00a7c05586e3cbadc615ac51246797d62ad: 36 | version: 418ad00a7c05586e3cbadc615ac51246797d62ad 37 | sha1: 9a6451fdb816dccdaf0fb5f0d2c404897e612bef 38 | blobstore_id: 9ba3f1f6-f2f0-4cf1-a2ae-d700fb446dc7 39 | format-version: '2' 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | config/dev.yml 2 | config/private.yml 3 | config/settings.yml 4 | releases/*.tgz 5 | dev_releases 6 | blobs/* 7 | .blobs 8 | .dev_builds 9 | .vagrant 10 | .idea 11 | .DS_Store 12 | .final_builds/jobs/**/*.tgz 13 | .final_builds/packages/**/*.tgz 14 | *.swp 15 | *~ 16 | *# 17 | #* 18 | tmp 19 | my*.yml 20 | 21 | resource-image 22 | credentials.yml 23 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ 2 | 3 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 4 | 5 | 1. Definitions. 6 | 7 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. 8 | 9 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. 10 | 11 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 12 | 13 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. 14 | 15 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. 16 | 17 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. 18 | 19 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). 20 | 21 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. 22 | 23 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." 24 | 25 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 26 | 27 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 28 | 29 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 30 | 31 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 32 | 33 | (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and 34 | 35 | (b) You must cause any modified files to carry prominent notices stating that You changed the files; and 36 | 37 | (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 38 | 39 | (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. 40 | 41 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 42 | 43 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 44 | 45 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 46 | 47 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 48 | 49 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 50 | 51 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. 52 | 53 | END OF TERMS AND CONDITIONS 54 | 55 | APPENDIX: How to apply the Apache License to your work. 56 | 57 | ``` 58 | To apply the Apache License to your work, attach the following 59 | boilerplate notice, with the fields enclosed by brackets "{}" 60 | replaced with your own identifying information. (Don't include 61 | the brackets!) The text should be enclosed in the appropriate 62 | comment syntax for the file format. We also recommend that a 63 | file or class name and description of purpose be included on the 64 | same "printed page" as the copyright notice for easier 65 | identification within third-party archives. 66 | ``` 67 | 68 | Copyright 2015 Dr Nic Williams 69 | 70 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 71 | 72 | ``` 73 | http://www.apache.org/licenses/LICENSE-2.0 74 | ``` 75 | 76 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | BOSH Release for slack-notification-resource 2 | ============================================ 3 | 4 | Send messages to your [Slack](https://slack.com) channels from Concourse: 5 | 6 | ![example](http://cl.ly/image/1k44412g3i3E/slack_notification.png) 7 | 8 | This BOSH release packages @Nopik's [slack-notification-resource](https://github.com/Nopik/slack-notification-resource) for Concourse, to make it simple to include the additional Concourse resource in your BOSH deployed Concourse system. 9 | 10 | Final releases are automatically created based on any changes to the upstream slack-notification-resource 11 | 12 | See the build pipeline https://ci.starkandwayne.com/pipelines/slack-notification-resource-boshrelease for status. 13 | 14 | Final releases are available on https://bosh.io/releases as well as this project's own [GitHub releases](https://github.com/cloudfoundry-community/slack-notification-resource-boshrelease/releases). 15 | 16 | Installation 17 | ------------ 18 | 19 | To use this bosh release, first upload it to the BOSH/bosh-lite that is running Concourse: 20 | 21 | ``` 22 | bosh upload release https://bosh.io/d/github.com/cloudfoundry-community/slack-notification-resource-boshrelease 23 | ``` 24 | 25 | Next, update your Concourse deployment manifest to add the resource. 26 | 27 | Add the `slack-notification-resource` release to the list: 28 | 29 | ```yaml 30 | releases: 31 | - name: concourse 32 | version: latest 33 | - name: garden-linux 34 | version: latest 35 | - name: slack-notification-resource 36 | version: latest 37 | ``` 38 | 39 | Into the `worker` job, add the `{release: slack-notification-resource, name: slack-notification-resource}` job template that will install the package: 40 | 41 | ```yaml 42 | jobs: 43 | - name: worker 44 | templates: 45 | ... 46 | - {release: slack-notification-resource, name: slack-notification-resource} 47 | ``` 48 | 49 | The final change is to add the `slack-notification-resource` package to the list of `additional_resource_types`: 50 | 51 | ```yaml 52 | jobs: 53 | - name: worker 54 | ... 55 | properties: 56 | groundcrew: 57 | additional_resource_types: 58 | - type: slack-notification 59 | image: /var/vcap/packages/slack-notification-resource 60 | ``` 61 | 62 | And `bosh deploy` your Concourse manifest. 63 | 64 | Usage 65 | ----- 66 | 67 | First, register a new webhook and select a default channel to send messages https://starkandwayne.slack.com/services/new/incoming-webhook 68 | 69 | Slack will give you a URL like `https://hooks.slack.com/services/XXXX/XXX/XXXX`. 70 | 71 | An example mini-pipeline that would send an alert: 72 | 73 | ```yaml 74 | --- 75 | jobs: 76 | - name: alert 77 | public: true 78 | plan: 79 | - task: say-hello 80 | config: 81 | platform: linux 82 | image: "docker:///ubuntu" 83 | run: 84 | path: echo 85 | args: ["Hello, world!"] 86 | - put: alert 87 | params: 88 | text: Hi everybody! 89 | channel: "#general" 90 | username: concourse 91 | icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png 92 | 93 | resources: 94 | - name: alert 95 | type: slack-notification 96 | source: 97 | url: https://hooks.slack.com/services/XXXX/XXX/XXXX 98 | ``` 99 | 100 | This will display the message with an icon for the avatar: 101 | 102 | ![example](http://cl.ly/image/1k44412g3i3E/slack_notification.png) 103 | 104 | Setup pipeline in Concourse 105 | --------------------------- 106 | 107 | ``` 108 | fly -t snw c -c pipeline.yml --vars-from credentials.yml slack-notification-resource-boshrelease 109 | ``` 110 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | desc "Generates a properties file for each job based on properties.X.Y used in templates" 2 | task :job_properties do 3 | require "fileutils" 4 | Dir["jobs/*"].each do |path| 5 | puts "Searching job #{File.basename(path)}..." 6 | FileUtils.chdir(path) do 7 | properties = [] 8 | Dir["templates/*.erb"].each do |template_path| 9 | properties |= File.read(template_path).scan(/\bproperties\.[\w\.]*\b/) 10 | puts properties.join("\n") 11 | File.open("properties", "w") { |file| file << properties.join("\n") } 12 | end 13 | end 14 | end 15 | end -------------------------------------------------------------------------------- /config/blobs.yml: -------------------------------------------------------------------------------- 1 | --- 2 | slack-notification-resource/rootfs.tar: 3 | object_id: 65ca254c-bb01-4a37-9b9e-ca5c492d5ddb 4 | sha: 354258ba1a5f0791e14bd9d07393b18379a53385 5 | size: 206090240 6 | -------------------------------------------------------------------------------- /config/final.yml: -------------------------------------------------------------------------------- 1 | --- 2 | blobstore: 3 | provider: s3 4 | options: 5 | bucket_name: slack-notification-resource-boshrelease 6 | final_name: slack-notification-resource 7 | -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | my*.yml 2 | -------------------------------------------------------------------------------- /examples/dynamic-text-pipeline.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - name: alert 4 | public: true 5 | plan: 6 | - get: messages 7 | trigger: false 8 | - task: show-message 9 | config: 10 | platform: linux 11 | image: docker:///ubuntu 12 | inputs: 13 | - {name: messages} 14 | run: 15 | path: cat 16 | args: [messages/slack-from-repo.out] 17 | - put: alert 18 | params: 19 | text_file: messages/slack-from-repo.out 20 | channel: "#general" 21 | username: concourse 22 | icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png 23 | 24 | resources: 25 | - name: alert 26 | type: slack-notification 27 | source: 28 | url: https://hooks.slack.com/services/XXXX/XXX/XXXX 29 | 30 | - name: messages 31 | type: git 32 | source: 33 | uri: https://gist.github.com/drnic/f70db33e4c060ad3233a 34 | branch: master 35 | -------------------------------------------------------------------------------- /examples/static-text-pipeline.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - name: alert 4 | public: true 5 | plan: 6 | - put: alert 7 | params: 8 | text: Hi everybody! 9 | channel: "#general" 10 | username: concourse 11 | icon_url: http://cl.ly/image/3e1h0H3H2s0P/concourse-logo.png 12 | 13 | resources: 14 | - name: alert 15 | type: slack-notification 16 | source: 17 | url: https://hooks.slack.com/services/XXXX/XXX/XXXX 18 | -------------------------------------------------------------------------------- /jobs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-community-attic/slack-notification-resource-boshrelease/a96c6d91a51b7248f8634681241da424eaba19c5/jobs/.gitkeep -------------------------------------------------------------------------------- /jobs/slack-notification-resource/monit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-community-attic/slack-notification-resource-boshrelease/a96c6d91a51b7248f8634681241da424eaba19c5/jobs/slack-notification-resource/monit -------------------------------------------------------------------------------- /jobs/slack-notification-resource/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: slack-notification-resource 3 | packages: [slack-notification-resource] 4 | templates: 5 | ignoreme: ignoreme 6 | properties: {} 7 | -------------------------------------------------------------------------------- /jobs/slack-notification-resource/templates/ignoreme: -------------------------------------------------------------------------------- 1 | +ignoreme 2 | -------------------------------------------------------------------------------- /packages/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-community-attic/slack-notification-resource-boshrelease/a96c6d91a51b7248f8634681241da424eaba19c5/packages/.gitkeep -------------------------------------------------------------------------------- /packages/slack-notification-resource/packaging: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -x 4 | tar xf slack-notification-resource/rootfs.tar -C ${BOSH_INSTALL_TARGET} 5 | -------------------------------------------------------------------------------- /packages/slack-notification-resource/spec: -------------------------------------------------------------------------------- 1 | --- 2 | name: slack-notification-resource 3 | dependencies: [] 4 | files: 5 | - slack-notification-resource/rootfs.tar 6 | -------------------------------------------------------------------------------- /pipeline.yml: -------------------------------------------------------------------------------- 1 | --- 2 | jobs: 3 | - name: embed 4 | public: true 5 | plan: 6 | - aggregate: 7 | - get: boshrelease 8 | trigger: false 9 | - get: resource-image 10 | passed: [resource-image] 11 | params: {rootfs: true} 12 | trigger: false 13 | - task: embed-image-blob 14 | config: 15 | platform: linux 16 | image: docker:///concourse/concourse-ci 17 | inputs: 18 | - {name: boshrelease, path: .} 19 | - {name: resource-image} 20 | run: 21 | path: ./src/ci/scripts/embed_image_blob.sh 22 | args: [resource-image, slack-notification-resource] 23 | params: 24 | access_key_id: {{aws-access-key-id}} 25 | secret_access_key: {{aws-secret-access-key}} 26 | - put: boshrelease 27 | params: 28 | repository: embed-image-blob 29 | rebase: true 30 | 31 | - name: resource-image 32 | public: true 33 | plan: 34 | - get: slack-notification-resource 35 | trigger: true 36 | - put: resource-image 37 | params: 38 | build: slack-notification-resource 39 | 40 | resources: 41 | - name: slack-notification-resource 42 | type: git 43 | source: 44 | uri: https://github.com/cloudfoundry-community/slack-notification-resource.git 45 | branch: master 46 | 47 | - name: boshrelease 48 | type: git 49 | source: 50 | uri: git@github.com:starkandwayne/slack-notification-resource-boshrelease.git 51 | branch: master 52 | private_key: {{github-private-key}} 53 | 54 | - name: resource-image 55 | type: docker-image 56 | source: 57 | email: {{docker-hub-email}} 58 | username: {{docker-hub-username}} 59 | password: {{docker-hub-password}} 60 | repository: cfcommunity/slack-notification-resource 61 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/index.yml: -------------------------------------------------------------------------------- 1 | --- 2 | builds: 3 | a101a115-c457-432a-b86c-37c80b823901: 4 | version: '1' 5 | 8765b360-53e2-4d0f-afe9-831f38bdef5e: 6 | version: '2' 7 | f8bd2761-e042-4eec-bf9c-167d16d26f1b: 8 | version: '3' 9 | 3cb3302f-a1a7-4f37-8556-e57f99fbe4c5: 10 | version: '4' 11 | 6040667a-b75a-4cef-9986-789fc957e9f9: 12 | version: '5' 13 | eabb8ae0-82a4-41b3-a378-5e02524360d5: 14 | version: '6' 15 | 2f670c7f-798f-438a-af0f-f8cab33568ed: 16 | version: '7' 17 | 8abc8f14-d0c4-4cf0-b37d-ca0156856b7b: 18 | version: '8' 19 | 4fbb50b9-a24f-4e6b-9c85-cafd2f44f52f: 20 | version: '9' 21 | format-version: '2' 22 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/slack-notification-resource-1.yml: -------------------------------------------------------------------------------- 1 | --- 2 | packages: 3 | - name: slack-notification-resource 4 | version: f877cea508d9dbffad643ce1d725aeafbe2f67b5 5 | fingerprint: f877cea508d9dbffad643ce1d725aeafbe2f67b5 6 | sha1: 37f74ef45f40a336f6b3ad2a02a5d0a640ce621f 7 | dependencies: [] 8 | jobs: 9 | - name: just_install_packages 10 | version: 265b2af741449ce2c5a8b3989b9ea45c258255ef 11 | fingerprint: 265b2af741449ce2c5a8b3989b9ea45c258255ef 12 | sha1: 4f47f1f5da51fd162d471226fd459ae2df2f7d26 13 | license: 14 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 15 | fingerprint: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 16 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 17 | commit_hash: fbc08921 18 | uncommitted_changes: true 19 | name: slack-notification-resource 20 | version: '1' 21 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/slack-notification-resource-2.yml: -------------------------------------------------------------------------------- 1 | --- 2 | packages: 3 | - name: slack-notification-resource 4 | version: b6934e87397751ffe666d0bead6eef9e3c62593f 5 | fingerprint: b6934e87397751ffe666d0bead6eef9e3c62593f 6 | sha1: 132b9890e357cc34a6e7b559bf1995b62ce3d229 7 | dependencies: [] 8 | jobs: 9 | - name: just_install_packages 10 | version: 265b2af741449ce2c5a8b3989b9ea45c258255ef 11 | fingerprint: 265b2af741449ce2c5a8b3989b9ea45c258255ef 12 | sha1: 4f47f1f5da51fd162d471226fd459ae2df2f7d26 13 | license: 14 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 15 | fingerprint: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 16 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 17 | commit_hash: 81bc6577 18 | uncommitted_changes: true 19 | name: slack-notification-resource 20 | version: '2' 21 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/slack-notification-resource-3.yml: -------------------------------------------------------------------------------- 1 | --- 2 | packages: 3 | - name: slack-notification-resource 4 | version: 48abf5f1250a724dc55e1bf5b1930256709c3224 5 | fingerprint: 48abf5f1250a724dc55e1bf5b1930256709c3224 6 | sha1: d41a5336f1deaa282fc78a9284a23b067c7b7b50 7 | dependencies: [] 8 | jobs: 9 | - name: just_install_packages 10 | version: 265b2af741449ce2c5a8b3989b9ea45c258255ef 11 | fingerprint: 265b2af741449ce2c5a8b3989b9ea45c258255ef 12 | sha1: 4f47f1f5da51fd162d471226fd459ae2df2f7d26 13 | license: 14 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 15 | fingerprint: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 16 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 17 | commit_hash: 78c496ae 18 | uncommitted_changes: true 19 | name: slack-notification-resource 20 | version: '3' 21 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/slack-notification-resource-4.yml: -------------------------------------------------------------------------------- 1 | --- 2 | packages: 3 | - name: slack-notification-resource 4 | version: cbbbdf271b99d881291eadc7f095dd846aa98ce4 5 | fingerprint: cbbbdf271b99d881291eadc7f095dd846aa98ce4 6 | sha1: 53be61fc9e442157ae93bfb70e84408be8d92d3b 7 | dependencies: [] 8 | jobs: 9 | - name: just_install_packages 10 | version: 265b2af741449ce2c5a8b3989b9ea45c258255ef 11 | fingerprint: 265b2af741449ce2c5a8b3989b9ea45c258255ef 12 | sha1: 4f47f1f5da51fd162d471226fd459ae2df2f7d26 13 | license: 14 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 15 | fingerprint: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 16 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 17 | commit_hash: c5ddafd5 18 | uncommitted_changes: true 19 | name: slack-notification-resource 20 | version: '4' 21 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/slack-notification-resource-5.yml: -------------------------------------------------------------------------------- 1 | --- 2 | packages: 3 | - name: slack-notification-resource 4 | version: 071ba848c20f99ccc802af4c6e1182d101d1a60d 5 | fingerprint: 071ba848c20f99ccc802af4c6e1182d101d1a60d 6 | sha1: 647ebd1cd0351a79d0137c8c842508c840e0b880 7 | dependencies: [] 8 | jobs: 9 | - name: just_install_packages 10 | version: 265b2af741449ce2c5a8b3989b9ea45c258255ef 11 | fingerprint: 265b2af741449ce2c5a8b3989b9ea45c258255ef 12 | sha1: 4f47f1f5da51fd162d471226fd459ae2df2f7d26 13 | license: 14 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 15 | fingerprint: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 16 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 17 | commit_hash: 7047333a 18 | uncommitted_changes: true 19 | name: slack-notification-resource 20 | version: '5' 21 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/slack-notification-resource-6.yml: -------------------------------------------------------------------------------- 1 | --- 2 | packages: 3 | - name: slack-notification-resource 4 | version: a22527bbd1f730cd82e286cefa49badca0b5bdcc 5 | fingerprint: a22527bbd1f730cd82e286cefa49badca0b5bdcc 6 | sha1: 1cf30237f131e8415c7c87fa7f17a2dd74a5221c 7 | dependencies: [] 8 | jobs: 9 | - name: just_install_packages 10 | version: 265b2af741449ce2c5a8b3989b9ea45c258255ef 11 | fingerprint: 265b2af741449ce2c5a8b3989b9ea45c258255ef 12 | sha1: 4f47f1f5da51fd162d471226fd459ae2df2f7d26 13 | license: 14 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 15 | fingerprint: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 16 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 17 | commit_hash: 94f74dbb 18 | uncommitted_changes: true 19 | name: slack-notification-resource 20 | version: '6' 21 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/slack-notification-resource-7.yml: -------------------------------------------------------------------------------- 1 | --- 2 | packages: 3 | - name: slack-notification-resource 4 | version: c24ab7eaf484f73e597aaf2422901421666ee6a0 5 | fingerprint: c24ab7eaf484f73e597aaf2422901421666ee6a0 6 | sha1: 0c6bb0cdee5a85072a7ed73aab8dbc06897bff8c 7 | dependencies: [] 8 | jobs: 9 | - name: just_install_packages 10 | version: 265b2af741449ce2c5a8b3989b9ea45c258255ef 11 | fingerprint: 265b2af741449ce2c5a8b3989b9ea45c258255ef 12 | sha1: 4f47f1f5da51fd162d471226fd459ae2df2f7d26 13 | license: 14 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 15 | fingerprint: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 16 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 17 | commit_hash: 499fddb3 18 | uncommitted_changes: true 19 | name: slack-notification-resource 20 | version: '7' 21 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/slack-notification-resource-8.yml: -------------------------------------------------------------------------------- 1 | --- 2 | packages: 3 | - name: slack-notification-resource 4 | version: 0c0d1ca829024864f2af91d481bdcde1972c1066 5 | fingerprint: 0c0d1ca829024864f2af91d481bdcde1972c1066 6 | sha1: 82bd6f77ab85b4d47b3159ae4df27bad2f537ee6 7 | dependencies: [] 8 | jobs: 9 | - name: slack-notification-resource 10 | version: 2d335e8843c35961ae3c850d6ad576b1ad7bdf80 11 | fingerprint: 2d335e8843c35961ae3c850d6ad576b1ad7bdf80 12 | sha1: 2257aa3091a4b5440c0decf79fd9c90ab00ba8bd 13 | license: 14 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 15 | fingerprint: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 16 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 17 | commit_hash: 015c5c2e 18 | uncommitted_changes: true 19 | name: slack-notification-resource 20 | version: '8' 21 | -------------------------------------------------------------------------------- /releases/slack-notification-resource/slack-notification-resource-9.yml: -------------------------------------------------------------------------------- 1 | --- 2 | packages: 3 | - name: slack-notification-resource 4 | version: 418ad00a7c05586e3cbadc615ac51246797d62ad 5 | fingerprint: 418ad00a7c05586e3cbadc615ac51246797d62ad 6 | sha1: 9a6451fdb816dccdaf0fb5f0d2c404897e612bef 7 | dependencies: [] 8 | jobs: 9 | - name: slack-notification-resource 10 | version: 2d335e8843c35961ae3c850d6ad576b1ad7bdf80 11 | fingerprint: 2d335e8843c35961ae3c850d6ad576b1ad7bdf80 12 | sha1: 2257aa3091a4b5440c0decf79fd9c90ab00ba8bd 13 | license: 14 | version: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 15 | fingerprint: 8da6eb3df1dce64b78610e7cbaf4245d66e88f1c 16 | sha1: bce243b08526c87b20e2d77a11e1b10922860a9f 17 | commit_hash: b43796b9 18 | uncommitted_changes: true 19 | name: slack-notification-resource 20 | version: '9' 21 | -------------------------------------------------------------------------------- /src/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudfoundry-community-attic/slack-notification-resource-boshrelease/a96c6d91a51b7248f8634681241da424eaba19c5/src/.gitkeep -------------------------------------------------------------------------------- /src/ci/scripts/embed_image_blob.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | image_resource=$1; shift 4 | blob_name=$1; shift 5 | 6 | 7 | if [[ "${blob_name}X" == "X" ]]; then 8 | echo "USAGE embed_image_blob.sh path/to/image/resource blob-name" 9 | exit 1 10 | fi 11 | 12 | rootfs_tar=${image_resource}/rootfs.tar 13 | if [[ ! -f ${rootfs_tar} ]]; then 14 | echo "USAGE embed_image_blob.sh path/to/image/resource blob-name" 15 | echo "ERROR: path/to/image/resource/rootfs.tar not found, enable with params: {rootfs: true}" 16 | exit 1 17 | fi 18 | 19 | if [[ "${access_key_id}X" == "X" || "${secret_access_key}" == "X" ]]; then 20 | echo "USAGE embed_image_blob.sh path/to/image/resource blob-name" 21 | echo "MISSING \$access_key_id and/or \$secret_access_key" 22 | exit 1 23 | fi 24 | 25 | if [[ -z "$(git config --global user.name)" ]] 26 | then 27 | git config --global user.name "Concourse Bot" 28 | git config --global user.email "concourse-bot@starkandwayne.com" 29 | fi 30 | 31 | cat > config/private.yml << EOS 32 | --- 33 | blobstore: 34 | s3: 35 | access_key_id: ${access_key_id} 36 | secret_access_key: ${secret_access_key} 37 | EOS 38 | 39 | set -ex 40 | 41 | mkdir -p blobs/${blob_name} 42 | cp ${rootfs_tar} blobs/${blob_name}/rootfs.tar 43 | 44 | bosh -n upload blobs 45 | git commit -a -m "added new ${blob_name} rootfs" 46 | -------------------------------------------------------------------------------- /src/ci/scripts/update_subtree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | subtree_repo=$1; shift 4 | if [[ "${subtree_repo}X" == "X" ]]; then 5 | echo "USAGE: update_subtree.sh subtree_repo - to match to src/subtree_name in bosh release" 6 | exit 1 7 | fi 8 | 9 | set -ex 10 | 11 | 12 | pushd ${subtree_repo} 13 | commit_hash=$(git rev-parse HEAD) 14 | commit_message=$(git log --oneline | head -n1) 15 | subtree_repo_url=$(git config remote.origin.url) 16 | subtree_repo_branch="master" 17 | popd 18 | 19 | if [[ -z "$(git config --global user.name)" ]] 20 | then 21 | git config --global user.name "Concourse Bot" 22 | git config --global user.email "concourse-bot@starkandwayne.com" 23 | fi 24 | 25 | cd boshrelease 26 | git checkout master # see http://stackoverflow.com/a/18608538/36170 27 | git subtree pull \ 28 | --prefix src/${subtree_repo} \ 29 | ${subtree_repo_url} \ 30 | ${subtree_repo_branch} \ 31 | --squash -m "Bump: $commit_message" 32 | -------------------------------------------------------------------------------- /templates/deployment.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | environment: (( merge )) 3 | stemcell: (( merge )) 4 | 5 | name: (( meta.environment )) 6 | 7 | director_uuid: (( merge )) 8 | 9 | releases: (( merge )) 10 | 11 | networks: (( merge )) 12 | 13 | jobs: (( merge )) 14 | 15 | properties: (( merge )) 16 | 17 | compilation: 18 | workers: 6 19 | network: slack_notification_resource1 20 | reuse_compilation_vms: true 21 | cloud_properties: (( merge )) 22 | 23 | update: 24 | canaries: 1 25 | max_in_flight: 1 26 | canary_watch_time: 30000-60000 27 | update_watch_time: 5000-60000 28 | serial: false 29 | 30 | resource_pools: 31 | - name: small_z1 32 | network: slack_notification_resource1 33 | size: (( auto )) 34 | stemcell: (( meta.stemcell )) 35 | cloud_properties: (( merge )) 36 | -------------------------------------------------------------------------------- /templates/infrastructure-aws-ec2.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | environment: (( merge )) 3 | dns_root: (( merge )) 4 | security_groups: (( merge )) 5 | persistent_disk: 4096 6 | 7 | stemcell: 8 | name: bosh-aws-xen-ubuntu 9 | version: latest 10 | 11 | jobs: 12 | - name: slack-notification-resource 13 | networks: 14 | - name: slack_notification_resource1 15 | persistent_disk: (( meta.persistent_disk )) 16 | 17 | compilation: 18 | cloud_properties: 19 | instance_type: m1.small 20 | 21 | resource_pools: 22 | - name: small_z1 23 | cloud_properties: 24 | instance_type: m1.small 25 | 26 | networks: 27 | - name: floating 28 | type: vip 29 | cloud_properties: {} 30 | - name: slack_notification_resource1 31 | type: dynamic 32 | cloud_properties: 33 | security_groups: (( meta.security_groups )) 34 | -------------------------------------------------------------------------------- /templates/infrastructure-warden.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | environment: slack-notification-resource-warden 3 | 4 | stemcell: 5 | name: bosh-warden-boshlite-ubuntu 6 | version: latest 7 | 8 | update: 9 | canaries: 1 10 | max_in_flight: 50 11 | canary_watch_time: 1000-30000 12 | update_watch_time: 1000-30000 13 | 14 | jobs: 15 | - name: slack-notification-resource 16 | networks: 17 | - name: slack_notification_resource1 18 | 19 | compilation: 20 | cloud_properties: 21 | name: random 22 | 23 | resource_pools: 24 | - name: small_z1 25 | cloud_properties: 26 | name: random 27 | 28 | networks: 29 | - name: slack_notification_resource1 30 | # Assumes up to 5 VMs, including 1 static and 4 dynamic. 31 | # Plus 5 (double the size) unused IPs, due to BOSH bug/quirk. 32 | subnets: 33 | - cloud_properties: 34 | name: random 35 | range: 10.244.25.0/30 36 | reserved: 37 | - 10.244.25.1 38 | static: 39 | - 10.244.25.2 40 | 41 | - cloud_properties: 42 | name: random 43 | range: 10.244.25.4/30 44 | reserved: 45 | - 10.244.25.5 46 | static: [] 47 | - cloud_properties: 48 | name: random 49 | range: 10.244.25.8/30 50 | reserved: 51 | - 10.244.25.9 52 | static: [] 53 | - cloud_properties: 54 | name: random 55 | range: 10.244.25.12/30 56 | reserved: 57 | - 10.244.25.13 58 | static: [] 59 | - cloud_properties: 60 | name: random 61 | range: 10.244.25.16/30 62 | reserved: 63 | - 10.244.25.17 64 | static: [] 65 | 66 | # Bonus double-sized network required due to BOSH oddity 67 | - cloud_properties: 68 | name: random 69 | range: 10.244.25.20/30 70 | reserved: 71 | - 10.244.25.21 72 | static: [] 73 | - cloud_properties: 74 | name: random 75 | range: 10.244.25.24/30 76 | reserved: 77 | - 10.244.25.25 78 | static: [] 79 | - cloud_properties: 80 | name: random 81 | range: 10.244.25.28/30 82 | reserved: 83 | - 10.244.25.29 84 | static: [] 85 | - cloud_properties: 86 | name: random 87 | range: 10.244.25.32/30 88 | reserved: 89 | - 10.244.25.33 90 | static: [] 91 | - cloud_properties: 92 | name: random 93 | range: 10.244.25.36/30 94 | reserved: 95 | - 10.244.25.37 96 | static: [] 97 | -------------------------------------------------------------------------------- /templates/jobs.yml: -------------------------------------------------------------------------------- 1 | meta: 2 | environment: ~ 3 | 4 | update: 5 | canaries: 1 6 | max_in_flight: 50 7 | canary_watch_time: 1000-30000 8 | update_watch_time: 1000-30000 9 | serial: false 10 | 11 | jobs: 12 | - name: slack-notification-resource 13 | templates: 14 | - {name: slack-notification-resource, release: slack-notification-resource} 15 | instances: 1 16 | persistent_disk: 0 17 | resource_pool: small_z1 18 | networks: (( merge )) 19 | 20 | networks: (( merge )) 21 | 22 | properties: {} 23 | -------------------------------------------------------------------------------- /templates/make_manifest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | template_prefix="slack-notification-resource" 6 | STEMCELL_OS=${STEMCELL_OS:-ubuntu} 7 | 8 | infrastructure=$1 9 | 10 | if [ "$infrastructure" != "aws-ec2" ] && \ 11 | [ "$infrastructure" != "warden" ] ; then 12 | echo "usage: ./make_manifest " 13 | exit 1 14 | fi 15 | 16 | shift 17 | 18 | BOSH_STATUS=$(bosh status) 19 | DIRECTOR_UUID=$(echo "$BOSH_STATUS" | grep UUID | awk '{print $2}') 20 | DIRECTOR_CPI=$(echo "$BOSH_STATUS" | grep CPI | awk '{print $2}') 21 | DIRECTOR_NAME=$(echo "$BOSH_STATUS" | grep Name | awk '{print $2}') 22 | NAME=$template_prefix-$infrastructure 23 | 24 | if [[ $DIRECTOR_NAME = "warden" ]]; then 25 | if [[ $infrastructure != "warden" ]]; then 26 | echo "Not targeting bosh-lite with warden CPI. Please use 'bosh target' before running this script." 27 | exit 1 28 | fi 29 | fi 30 | 31 | if [[ $infrastructure = "aws-ec2" ]]; then 32 | if [[ $DIRECTOR_CPI != "aws" ]]; then 33 | echo "Not targeting an AWS BOSH. Please use 'bosh target' before running this script." 34 | exit 1 35 | fi 36 | fi 37 | 38 | function latest_uploaded_stemcell { 39 | echo $(bosh stemcells | grep bosh | grep $STEMCELL_OS | awk -F'|' '{ print $2, $3 }' | sort -nr -k2 | head -n1 | awk '{ print $1 }') 40 | } 41 | 42 | STEMCELL=${STEMCELL:-$(latest_uploaded_stemcell)} 43 | if [[ "${STEMCELL}X" == "X" ]]; then 44 | echo 45 | echo "Uploading latest $DIRECTOR_CPI/$STEMCELL_OS stemcell..." 46 | STEMCELL_URL=$(bosh public stemcells --full | grep $DIRECTOR_CPI | grep $STEMCELL_OS | sort -nr | head -n1 | awk '{ print $4 }') 47 | bosh upload stemcell $STEMCELL_URL 48 | fi 49 | STEMCELL=${STEMCELL:-$(latest_uploaded_stemcell)} 50 | 51 | templates=$(dirname $0) 52 | release=$templates/.. 53 | tmpdir=$release/tmp 54 | 55 | mkdir -p $tmpdir 56 | cp $templates/stub.yml $tmpdir/stub-with-uuid.yml 57 | echo $DIRECTOR_NAME $DIRECTOR_CPI $DIRECTOR_UUID $STEMCELL 58 | perl -pi -e "s/PLACEHOLDER-DIRECTOR-UUID/$DIRECTOR_UUID/g" $tmpdir/stub-with-uuid.yml 59 | perl -pi -e "s/NAME/$NAME/g" $tmpdir/stub-with-uuid.yml 60 | perl -pi -e "s/STEMCELL/$STEMCELL/g" $tmpdir/stub-with-uuid.yml 61 | 62 | spiff merge \ 63 | $templates/deployment.yml \ 64 | $templates/jobs.yml \ 65 | $templates/infrastructure-${infrastructure}.yml \ 66 | $tmpdir/stub-with-uuid.yml \ 67 | $* > $tmpdir/$NAME-manifest.yml 68 | 69 | bosh deployment $tmpdir/$NAME-manifest.yml 70 | bosh status 71 | -------------------------------------------------------------------------------- /templates/stub.yml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | environment: NAME 4 | dns_root: microbosh 5 | security_groups: 6 | - slack_notification_resource 7 | stemcell: 8 | name: STEMCELL 9 | 10 | director_uuid: PLACEHOLDER-DIRECTOR-UUID 11 | 12 | releases: 13 | - name: slack-notification-resource 14 | version: latest 15 | --------------------------------------------------------------------------------