codebuild 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +1 -1
- data/README.md +10 -2
- data/docs/.gitignore +4 -0
- data/docs/CNAME +1 -0
- data/docs/Gemfile +3 -0
- data/docs/LICENSE +21 -0
- data/docs/README.md +25 -0
- data/docs/_config.yml +73 -0
- data/docs/_docs/contributing.md +99 -0
- data/docs/_docs/conventions.md +51 -0
- data/docs/_docs/deploy.md +69 -0
- data/docs/_docs/dsl.md +12 -0
- data/docs/_docs/dsl/project.md +80 -0
- data/docs/{dsl → _docs/dsl}/role.md +39 -1
- data/docs/_docs/dsl/schedule.md +29 -0
- data/docs/_docs/examples.md +12 -0
- data/docs/_docs/examples/ecs.md +94 -0
- data/docs/_docs/examples/jets.md +68 -0
- data/docs/_docs/examples/ruby.md +44 -0
- data/docs/_docs/github_oauth.md +51 -0
- data/docs/_docs/install.md +14 -0
- data/docs/_docs/next-steps.md +16 -0
- data/docs/_docs/settings.md +34 -0
- data/docs/_docs/start.md +46 -0
- data/docs/_docs/type-option.md +72 -0
- data/docs/_docs/variables.md +90 -0
- data/docs/_includes/commands.html +86 -0
- data/docs/_includes/content.html +25 -0
- data/docs/_includes/edit-on-github.html +9 -0
- data/docs/_includes/footer.html +41 -0
- data/docs/_includes/google_analytics.html +10 -0
- data/docs/_includes/head.html +45 -0
- data/docs/_includes/js.html +18 -0
- data/docs/_includes/nav.html +17 -0
- data/docs/_includes/prev_next.md +19 -0
- data/docs/_includes/reference.md +1 -0
- data/docs/_includes/subnav.html +38 -0
- data/docs/_includes/tutorials.md +38 -0
- data/docs/_layouts/default.html +12 -0
- data/docs/_reference/codebuild-completion.md +44 -0
- data/docs/_reference/codebuild-completion_script.md +25 -0
- data/docs/_reference/codebuild-delete.md +26 -0
- data/docs/_reference/codebuild-deploy.md +58 -0
- data/docs/_reference/codebuild-init.md +87 -0
- data/docs/_reference/codebuild-start.md +43 -0
- data/docs/_reference/codebuild-version.md +21 -0
- data/docs/_sass/_bootstrap-overrides.scss +40 -0
- data/docs/_sass/_contact.scss +49 -0
- data/docs/_sass/_cta.scss +37 -0
- data/docs/_sass/_download.scss +31 -0
- data/docs/_sass/_features.scss +47 -0
- data/docs/_sass/_footer.scss +49 -0
- data/docs/_sass/_global.scss +102 -0
- data/docs/_sass/_main.scss +364 -0
- data/docs/_sass/_masthead.scss +70 -0
- data/docs/_sass/_mixins.scss +79 -0
- data/docs/_sass/_navbar.scss +92 -0
- data/docs/_sass/_syntax.scss +65 -0
- data/docs/_sass/_table.scss +34 -0
- data/docs/_sass/_timeline.scss +207 -0
- data/docs/_sass/_variables.scss +24 -0
- data/docs/bin/web +8 -0
- data/docs/docs.md +22 -0
- data/docs/favicon.ico +0 -0
- data/docs/img/docs/codebuild-output.png +0 -0
- data/docs/img/logos/boltops-logo-full.png +0 -0
- data/docs/img/logos/boltops-logo.png +0 -0
- data/docs/img/logos/project-logo.png +0 -0
- data/docs/index.html +35 -0
- data/docs/js/nav.js +39 -0
- data/docs/js/new-age.js +38 -0
- data/docs/js/new-age.min.js +6 -0
- data/docs/new-age.scss +20 -0
- data/docs/quick-start.md +72 -0
- data/docs/reference.md +12 -0
- data/docs/support.md +22 -0
- data/docs/vendor/bootstrap/css/bootstrap-grid.css +1339 -0
- data/docs/vendor/bootstrap/css/bootstrap-grid.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap-grid.min.css +1 -0
- data/docs/vendor/bootstrap/css/bootstrap-grid.min.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap-reboot.css +459 -0
- data/docs/vendor/bootstrap/css/bootstrap-reboot.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap-reboot.min.css +1 -0
- data/docs/vendor/bootstrap/css/bootstrap-reboot.min.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap.css +9320 -0
- data/docs/vendor/bootstrap/css/bootstrap.css.map +1 -0
- data/docs/vendor/bootstrap/css/bootstrap.min.css +6 -0
- data/docs/vendor/bootstrap/css/bootstrap.min.css.map +1 -0
- data/docs/vendor/bootstrap/js/bootstrap.js +3535 -0
- data/docs/vendor/bootstrap/js/bootstrap.min.js +7 -0
- data/docs/vendor/font-awesome/css/font-awesome.css +2337 -0
- data/docs/vendor/font-awesome/css/font-awesome.min.css +4 -0
- data/docs/vendor/font-awesome/fonts/FontAwesome.otf +0 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.svg +2671 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/docs/vendor/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- data/docs/vendor/font-awesome/less/animated.less +34 -0
- data/docs/vendor/font-awesome/less/bordered-pulled.less +25 -0
- data/docs/vendor/font-awesome/less/core.less +12 -0
- data/docs/vendor/font-awesome/less/fixed-width.less +6 -0
- data/docs/vendor/font-awesome/less/font-awesome.less +18 -0
- data/docs/vendor/font-awesome/less/icons.less +789 -0
- data/docs/vendor/font-awesome/less/larger.less +13 -0
- data/docs/vendor/font-awesome/less/list.less +19 -0
- data/docs/vendor/font-awesome/less/mixins.less +60 -0
- data/docs/vendor/font-awesome/less/path.less +15 -0
- data/docs/vendor/font-awesome/less/rotated-flipped.less +20 -0
- data/docs/vendor/font-awesome/less/screen-reader.less +5 -0
- data/docs/vendor/font-awesome/less/stacked.less +20 -0
- data/docs/vendor/font-awesome/less/variables.less +799 -0
- data/docs/vendor/font-awesome/scss/_animated.scss +34 -0
- data/docs/vendor/font-awesome/scss/_bordered-pulled.scss +25 -0
- data/docs/vendor/font-awesome/scss/_core.scss +12 -0
- data/docs/vendor/font-awesome/scss/_fixed-width.scss +6 -0
- data/docs/vendor/font-awesome/scss/_icons.scss +789 -0
- data/docs/vendor/font-awesome/scss/_larger.scss +13 -0
- data/docs/vendor/font-awesome/scss/_list.scss +19 -0
- data/docs/vendor/font-awesome/scss/_mixins.scss +60 -0
- data/docs/vendor/font-awesome/scss/_path.scss +15 -0
- data/docs/vendor/font-awesome/scss/_rotated-flipped.scss +20 -0
- data/docs/vendor/font-awesome/scss/_screen-reader.scss +5 -0
- data/docs/vendor/font-awesome/scss/_stacked.scss +20 -0
- data/docs/vendor/font-awesome/scss/_variables.scss +799 -0
- data/docs/vendor/font-awesome/scss/font-awesome.scss +18 -0
- data/docs/vendor/jquery-easing/jquery.easing.compatibility.js +59 -0
- data/docs/vendor/jquery-easing/jquery.easing.js +166 -0
- data/docs/vendor/jquery-easing/jquery.easing.min.js +1 -0
- data/docs/vendor/jquery/jquery.js +10253 -0
- data/docs/vendor/jquery/jquery.min.js +4 -0
- data/docs/vendor/simple-line-icons/css/simple-line-icons.css +778 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.eot +0 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.svg +200 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.ttf +0 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.woff +0 -0
- data/docs/vendor/simple-line-icons/fonts/Simple-Line-Icons.woff2 +0 -0
- data/docs/vendor/simple-line-icons/less/simple-line-icons.less +982 -0
- data/docs/vendor/simple-line-icons/scss/simple-line-icons.scss +979 -0
- data/docs/vendor/tether/tether.js +1811 -0
- data/docs/vendor/tether/tether.min.js +1 -0
- data/exe/cb +1 -1
- data/exe/codebuild +1 -1
- data/lib/codebuild.rb +0 -1
- data/lib/codebuild/aws_services/helpers.rb +1 -1
- data/lib/codebuild/cli.rb +2 -1
- data/lib/codebuild/core.rb +2 -2
- data/lib/codebuild/dsl/project.rb +3 -3
- data/lib/codebuild/help/init.md +38 -2
- data/lib/codebuild/help/start.md +7 -1
- data/lib/codebuild/init.rb +19 -9
- data/lib/codebuild/project.rb +3 -2
- data/lib/codebuild/role.rb +2 -0
- data/lib/codebuild/schedule.rb +5 -0
- data/lib/codebuild/setting.rb +2 -3
- data/lib/codebuild/stack.rb +25 -0
- data/lib/codebuild/start.rb +22 -3
- data/lib/codebuild/variables.rb +17 -0
- data/lib/codebuild/version.rb +1 -1
- data/lib/template/{.codebuild → project}/buildspec.yml +7 -7
- data/lib/template/{.codebuild → project}/project.rb.tt +8 -0
- data/lib/template/{.codebuild → project}/role.rb +0 -0
- data/lib/template/project/schedule.rb +3 -0
- data/lib/template/top/settings.yml +9 -0
- data/lib/template/top/variables/base.rb +1 -0
- data/lib/template/top/variables/development.rb +1 -0
- data/lib/template/top/variables/production.rb +1 -0
- metadata +150 -11
- data/docs/dsl/project.md +0 -46
- data/docs/dsl/schedule.md +0 -12
- data/docs/github_oauth.md +0 -39
- data/docs/type.md +0 -39
- data/lib/template/.codebuild/settings.yml +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95697bfe6c4ae37bb84258a9b2067494efcc83e259f9a03bd9e4a2088d579f52
|
|
4
|
+
data.tar.gz: b472131c142171e67aa7fa5f0d4e7f12e35efe18572408d3f002ead4cb230687
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee5f2784e0986fbd38ed79df15089ed8eb031a8da983dbb7c690fbf1084ab0a21b2e4327ec8d4ac99cf29aecb2431f217b3ca745a22c6797f986f0eaf39ac5e0
|
|
7
|
+
data.tar.gz: f4334660cfc0c108b03fecc451d1cbf7742ec5c223b4964bd8969006d8a9aaea6e7a9ddb54dfe8ce7fdaa1ab633d7ccbd2e39130e33b958f7b015ce59973430f
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
|
5
5
|
|
|
6
|
+
## [0.6.0]
|
|
7
|
+
- named stack with -cb at the very end
|
|
8
|
+
- add docs
|
|
9
|
+
- cb init --no-variables option
|
|
10
|
+
|
|
6
11
|
## [0.5.0]
|
|
7
12
|
- add --wait option
|
|
8
13
|
- change default append_env setting to false
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Codebuild
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|
|
|
5
5
|
The codebuild tool provides a DSL to create a CodeBuild project with some reasonable defaults.
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ IMPORTANT: Before deploying, if you are using a private repo, use [aws codebuild
|
|
|
22
22
|
2. **deploy**: deploy the CodeBuild project on AWS.
|
|
23
23
|
3. **start**: kick off a CodeBuild project run.
|
|
24
24
|
|
|
25
|
-
### Init
|
|
25
|
+
### Init and Structure
|
|
26
26
|
|
|
27
27
|
First, run `codebuild init` to generate a starter .codebuild structure.
|
|
28
28
|
|
|
@@ -127,6 +127,14 @@ You can also create managed iam policy.
|
|
|
127
127
|
managed_iam_policy("AmazonS3ReadOnlyAccess")
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
+
## Schedule Support
|
|
131
|
+
|
|
132
|
+
.codebuild/schedule.rb:
|
|
133
|
+
|
|
134
|
+
```ruby
|
|
135
|
+
rate "1 day"
|
|
136
|
+
```
|
|
137
|
+
|
|
130
138
|
## Full DSL
|
|
131
139
|
|
|
132
140
|
The convenience DSL methods shown above are short and clean. They merely wrap a DSL that map to the properties of CloudFormation resources like [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) and [AWS::IAM::Role](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html). Refer the [DSL docs](docs/dsl) for more info.
|
data/docs/.gitignore
ADDED
data/docs/CNAME
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
codebuild.cloud
|
data/docs/Gemfile
ADDED
data/docs/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Tung Nguyen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/docs/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Codebuild Documentation
|
|
2
|
+
|
|
3
|
+
This project powers the codebuild documementation website: [https://codebuild.cloud](https://codebuild.cloud). It is a static website generated by [Jekyll](https://jekyllrb.com/).
|
|
4
|
+
|
|
5
|
+
## Contributing
|
|
6
|
+
|
|
7
|
+
For minor changes like typos, you can click **Suggest an edit to this page**, located at the bottom of each article. This will take you to the source file on GitHub, where you can submit a pull request for your change through the UI.
|
|
8
|
+
|
|
9
|
+
## Local Setup
|
|
10
|
+
|
|
11
|
+
For larger fixes, you can run the site locally with the following:
|
|
12
|
+
|
|
13
|
+
git clone https://github.com/tongueroo/codebuild.git
|
|
14
|
+
cd codebuild/docs
|
|
15
|
+
bundle
|
|
16
|
+
bin/web
|
|
17
|
+
|
|
18
|
+
You'll be able to view the site on [http://localhost:4000](http://localhost:4000).
|
|
19
|
+
|
|
20
|
+
## Rordering Site Nav
|
|
21
|
+
|
|
22
|
+
To reorder the `nav_order` for links on the sidenav run:
|
|
23
|
+
|
|
24
|
+
cd docs
|
|
25
|
+
jekyll-sort reorder
|
data/docs/_config.yml
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Site settings
|
|
2
|
+
title: codebuild
|
|
3
|
+
email: tongueroo@gmail.com
|
|
4
|
+
url: https://codebuild.cloud
|
|
5
|
+
description: "The codebuild tool provides a DSL to create a CodeBuild project with some reasonable defaults."
|
|
6
|
+
keywords: "codebuild boltops dsl ruby aws"
|
|
7
|
+
skills: ""
|
|
8
|
+
meta_author: Tung Nguyen
|
|
9
|
+
|
|
10
|
+
# Google webmaster tools
|
|
11
|
+
google_verify:
|
|
12
|
+
google_analytics: UA-98684555-11
|
|
13
|
+
|
|
14
|
+
# https://ssl.bing.com/webmaster/configure/verify/ownership Option 2 content= goes here
|
|
15
|
+
bing_verify:
|
|
16
|
+
|
|
17
|
+
# Contact form:
|
|
18
|
+
# - static : pass through formspree.io to validate email sending
|
|
19
|
+
# - disqus : replace contact form by disqus thread
|
|
20
|
+
# - comment the line below if you want to stick with the default PHP contact form
|
|
21
|
+
contact: static
|
|
22
|
+
|
|
23
|
+
# If you use disqus you need disqus shortname
|
|
24
|
+
# https://help.disqus.com/customer/portal/articles/466208
|
|
25
|
+
disqus_shortname:
|
|
26
|
+
|
|
27
|
+
# Color settings (hex-codes without the leading hash-tag)
|
|
28
|
+
color:
|
|
29
|
+
primary: 3972c7
|
|
30
|
+
primary-rgb: "24,288,156" #"128,179,255"
|
|
31
|
+
secondary: 2c3e50 #FD6E8A
|
|
32
|
+
secondary-dark: 233140 #A2122F
|
|
33
|
+
links: a3c8ff
|
|
34
|
+
|
|
35
|
+
# Footer settings
|
|
36
|
+
footer:
|
|
37
|
+
copyright: BoltOps, LLC
|
|
38
|
+
location: San Francisco, CA
|
|
39
|
+
social: BoltOps
|
|
40
|
+
credits:
|
|
41
|
+
contact: contact@boltops.com
|
|
42
|
+
phone:
|
|
43
|
+
|
|
44
|
+
# Social networks usernames (many more available: google-plus, flickr, dribbble, pinterest, instagram, tumblr, linkedin, etc.)
|
|
45
|
+
social:
|
|
46
|
+
- title: twitter
|
|
47
|
+
url: http://twitter.com/tongueroo
|
|
48
|
+
- title: github
|
|
49
|
+
url: https://github.com/tongueroo/codebuild
|
|
50
|
+
|
|
51
|
+
# Credits content
|
|
52
|
+
credits:
|
|
53
|
+
|
|
54
|
+
# Build settings
|
|
55
|
+
markdown: kramdown
|
|
56
|
+
permalink: pretty
|
|
57
|
+
|
|
58
|
+
gh_url: https://github.com/tongueroo/codebuild
|
|
59
|
+
|
|
60
|
+
collections:
|
|
61
|
+
docs:
|
|
62
|
+
name: "Documentation"
|
|
63
|
+
output: true
|
|
64
|
+
reference:
|
|
65
|
+
name: "Reference"
|
|
66
|
+
output: true
|
|
67
|
+
|
|
68
|
+
defaults:
|
|
69
|
+
- values:
|
|
70
|
+
layout: default
|
|
71
|
+
|
|
72
|
+
plugins_dir:
|
|
73
|
+
- jekyll-coffeescript
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Contributing
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Hi there! Interested in contributing to CodeBuild? We'd love your help. CodeBuild is an open source project, built one contribution at a time by users like you.
|
|
6
|
+
|
|
7
|
+
## Where to get help or report a problem
|
|
8
|
+
|
|
9
|
+
See [the support guidelines]({% link support.md %})
|
|
10
|
+
|
|
11
|
+
## Ways to contribute
|
|
12
|
+
|
|
13
|
+
Whether you're a developer, an infrastructure engineer, or just an enthusiast, there are lots of ways to contribute. Here are a few ideas:
|
|
14
|
+
|
|
15
|
+
* [Install CodeBuild on your computer](https://https://codebuild.cloud.com/docs/install/) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/tongueroo/codebuild/issues/new/choose) and let us know.
|
|
16
|
+
* Comment on some of the project's [open issues](https://github.com/tongueroo/codebuild/issues). Have you experienced the same problem? Know a workaround? Do you have a suggestion for how the feature could be better?
|
|
17
|
+
* Read through [the documentation](https://https://codebuild.cloud.com/docs/), and click the "improve this page" button, any time you see something confusing or have a suggestion for something that could be improved.
|
|
18
|
+
* Browse through the [CodeBuild Community forum](https://community.https://codebuild.cloud.com), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing.
|
|
19
|
+
* Find [an open issue](https://github.com/tongueroo/codebuild/issues) (especially [those labeled `help wanted`](https://github.com/tongueroo/codebuild/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)), and submit a proposed fix. If it's your first pull request, we promise we won't bite and are glad to answer any questions.
|
|
20
|
+
* Help evaluate [open pull requests](https://github.com/tongueroo/codebuild/pulls), by testing the changes locally and reviewing what's proposed.
|
|
21
|
+
|
|
22
|
+
## Submitting a pull request
|
|
23
|
+
|
|
24
|
+
### Pull requests generally
|
|
25
|
+
|
|
26
|
+
* The smaller the proposed change, the better. If you'd like to propose two unrelated changes, submit two pull requests.
|
|
27
|
+
|
|
28
|
+
* The more information, the better. Make judicious use of the pull request body. Describe what changes were made, why you made them, and what impact they will have for users.
|
|
29
|
+
|
|
30
|
+
* If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
|
|
31
|
+
|
|
32
|
+
* If you're submitting a code contribution, be sure to read the [code contributions](#code-contributions) section below.
|
|
33
|
+
|
|
34
|
+
### Submitting a pull request via github.com
|
|
35
|
+
|
|
36
|
+
Many small changes can be made entirely through the github.com web interface.
|
|
37
|
+
|
|
38
|
+
1. Navigate to the file within [tongueroo/codebuild](https://github.com/tongueroo/codebuild) that you'd like to edit.
|
|
39
|
+
2. Click the pencil icon in the top right corner to edit the file.
|
|
40
|
+
3. Make your proposed changes.
|
|
41
|
+
4. Click "Propose file change."
|
|
42
|
+
5. Click "Create pull request."
|
|
43
|
+
6. Add a descriptive title and detailed description for your proposed change. The more information, the better.
|
|
44
|
+
7. Click "Create pull request."
|
|
45
|
+
|
|
46
|
+
That's it! You'll be automatically subscribed to receive updates as others review your proposed change and provide feedback.
|
|
47
|
+
|
|
48
|
+
### Submitting a pull request via Git command line
|
|
49
|
+
|
|
50
|
+
1. Fork the project by clicking "Fork" in the top right corner of [tongueroo/codebuild](https://github.com/tongueroo/codebuild).
|
|
51
|
+
2. Clone the repository locally `git clone https://github.com/<your-username>/codebuild`.
|
|
52
|
+
3. Fetch submodules `git submodule init && git submodule update`.
|
|
53
|
+
4. Create a new, descriptively named branch to contain your change ( `git checkout -b my-awesome-feature` ).
|
|
54
|
+
5. Hack away, add tests. Not necessarily in that order.
|
|
55
|
+
6. Make sure everything still passes by running `bundle exec rspec` (see [the tests section](#running-tests-locally) below)
|
|
56
|
+
7. Push the branch up ( `git push origin my-awesome-feature` ).
|
|
57
|
+
8. Create a pull request by visiting `https://github.com/<your-username>/codebuild` and following the instructions at the top of the screen.
|
|
58
|
+
|
|
59
|
+
## Proposing updates to the documentation
|
|
60
|
+
|
|
61
|
+
We want the CodeBuild documentation to be the best it can be. We've open-sourced our docs and we welcome any pull requests if you find it lacking.
|
|
62
|
+
|
|
63
|
+
### How to submit changes
|
|
64
|
+
|
|
65
|
+
You can find the documentation for [https://codebuild.cloud.com](http://https://codebuild.cloud.com) in the [docs](https://github.com/tongueroo/codebuild/tree/master/docs) directory. See the section above, [submitting a pull request](#submitting-a-pull-request) for information on how to propose a change.
|
|
66
|
+
|
|
67
|
+
One gotcha, all pull requests should be directed at the `master` branch (the default branch).
|
|
68
|
+
|
|
69
|
+
## Code Contributions
|
|
70
|
+
|
|
71
|
+
Interesting in submitting a pull request? Awesome. Read on. There are a few common gotchas that we'd love to help you avoid.
|
|
72
|
+
|
|
73
|
+
### Tests and documentation
|
|
74
|
+
|
|
75
|
+
Any time you propose a code change, you should also include updates to the documentation and tests within the same pull request.
|
|
76
|
+
|
|
77
|
+
#### Documentation
|
|
78
|
+
|
|
79
|
+
If your contribution changes any CodeBuild behavior, make sure to update the documentation. Documentation lives in the `docs` folder. It's a Jekyll site and can be started with `cd docs && bin/web`. If the docs are missing information, please feel free to add it in. Great docs make a great project. Include changes to the documentation within your pull request, and once merged, `https://codebuild.cloud.com` will be updated.
|
|
80
|
+
|
|
81
|
+
#### Tests
|
|
82
|
+
|
|
83
|
+
* If you're creating a small fix or patch to an existing feature, a simple test is more than enough. You can usually copy/paste from an existing example in the `specs` folder.
|
|
84
|
+
|
|
85
|
+
### Code contributions generally
|
|
86
|
+
|
|
87
|
+
* Don't bump the Gem version in your pull request (if you don't know what that means, you probably didn't).
|
|
88
|
+
|
|
89
|
+
## Running tests
|
|
90
|
+
|
|
91
|
+
### Test Dependencies
|
|
92
|
+
|
|
93
|
+
To run the test suite by running the following command:
|
|
94
|
+
|
|
95
|
+
bundle exec rspec
|
|
96
|
+
|
|
97
|
+
## Thank You
|
|
98
|
+
|
|
99
|
+
Thanks! Hacking on CodeBuild should be fun. If you find any of this hard to figure out, let us know so we can improve our process or documentation!
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Naming Conventions
|
|
3
|
+
nav_order: 9
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The codebuild tool follows a few naming conventions.
|
|
7
|
+
|
|
8
|
+
## Project Name
|
|
9
|
+
|
|
10
|
+
It will set the codebuild project name by inferring the name of the parent folder. For example, if the parent folder is `demo`.
|
|
11
|
+
|
|
12
|
+
cd demo
|
|
13
|
+
cb deploy
|
|
14
|
+
|
|
15
|
+
The CodeBuild project is named `demo`. You can override this easily by providing a project name.
|
|
16
|
+
|
|
17
|
+
cd deploy my-project # explicitly use my-project as CodeBuild project name
|
|
18
|
+
|
|
19
|
+
The CodeBuild project is named `my-project`
|
|
20
|
+
|
|
21
|
+
## Type Option
|
|
22
|
+
|
|
23
|
+
If the `--type` option is used, then it is appended to the CodeBuild project name. For example:
|
|
24
|
+
|
|
25
|
+
cb deploy my-project --type unit
|
|
26
|
+
|
|
27
|
+
The CodeBuild project is named `my-project-unit`.
|
|
28
|
+
|
|
29
|
+
## CB_ENV_EXTRA
|
|
30
|
+
|
|
31
|
+
The `CB_ENV_EXTRA` also affects the name of the CodeBuild project. It gets appened after the type option.
|
|
32
|
+
|
|
33
|
+
CB_ENV_EXTRA=2 cb deploy my-project --type unit
|
|
34
|
+
|
|
35
|
+
The CodeBuild project is named `my-project-unit-2`.
|
|
36
|
+
|
|
37
|
+
## Settings append_env option
|
|
38
|
+
|
|
39
|
+
If the append_env is configured in the [Settings]({% link _docs/settings.md %}).
|
|
40
|
+
|
|
41
|
+
## Stack Name
|
|
42
|
+
|
|
43
|
+
The CloudFormation stack name which creates the CodeBuild related resources is named the same as the project name with `-cb` appended to the stack name. Examples:
|
|
44
|
+
|
|
45
|
+
CodeBuild Project Name | Stack Name
|
|
46
|
+
--- | ---
|
|
47
|
+
demo | demo-cb
|
|
48
|
+
demo-unit | demo-unit-cb
|
|
49
|
+
demo-web-unit | demo-web-unit-cb
|
|
50
|
+
|
|
51
|
+
{% include prev_next.md %}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Deploy
|
|
3
|
+
nav_order: 6
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The CodeBuild project is generated from the DSL and created with CloudFormation. By default, the files that the DSL evaluates are:
|
|
7
|
+
|
|
8
|
+
.codebuild/buildspec.yml
|
|
9
|
+
.codebuild/project.rb
|
|
10
|
+
.codebuild/role.rb
|
|
11
|
+
|
|
12
|
+
To create the CodeBuild project, you run:
|
|
13
|
+
|
|
14
|
+
codebuild deploy
|
|
15
|
+
|
|
16
|
+
You'll see output that looks something like this:
|
|
17
|
+
|
|
18
|
+
$ cb deploy
|
|
19
|
+
Generated CloudFormation template at /tmp/codebuild.yml
|
|
20
|
+
Deploying stack demo-cb with CodeBuild project demo
|
|
21
|
+
Creating stack demo-cb. Check CloudFormation console for status.
|
|
22
|
+
Stack name demo-cb status CREATE_IN_PROGRESS
|
|
23
|
+
Here's the CloudFormation url to check for more details https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks
|
|
24
|
+
Waiting for stack to complete
|
|
25
|
+
03:04:30AM CREATE_IN_PROGRESS AWS::CloudFormation::Stack demo-cb User Initiated
|
|
26
|
+
03:04:34AM CREATE_IN_PROGRESS AWS::IAM::Role IamRole
|
|
27
|
+
03:04:35AM CREATE_IN_PROGRESS AWS::IAM::Role IamRole Resource creation Initiated
|
|
28
|
+
03:04:54AM CREATE_COMPLETE AWS::IAM::Role IamRole
|
|
29
|
+
03:04:56AM CREATE_IN_PROGRESS AWS::CodeBuild::Project CodeBuild
|
|
30
|
+
03:04:58AM CREATE_IN_PROGRESS AWS::CodeBuild::Project CodeBuild Resource creation Initiated
|
|
31
|
+
03:04:59AM CREATE_COMPLETE AWS::CodeBuild::Project CodeBuild
|
|
32
|
+
03:05:01AM CREATE_COMPLETE AWS::CloudFormation::Stack demo-cb
|
|
33
|
+
Stack success status: CREATE_COMPLETE
|
|
34
|
+
Time took for stack deployment: 30s.
|
|
35
|
+
$
|
|
36
|
+
|
|
37
|
+
## Explicit CodeBuild Project Name
|
|
38
|
+
|
|
39
|
+
By default, the CodeBuild project name is inferred and is the parent folder that you are within. You can explicitly specify the project name as the first CLI argument:
|
|
40
|
+
|
|
41
|
+
cb deploy my-project
|
|
42
|
+
|
|
43
|
+
## Types
|
|
44
|
+
|
|
45
|
+
By default, the codebuild tool looks up files in the `.codebuild` folder. Example:
|
|
46
|
+
|
|
47
|
+
.codebuild/buildspec.yml
|
|
48
|
+
.codebuild/project.rb
|
|
49
|
+
.codebuild/role.rb
|
|
50
|
+
|
|
51
|
+
You can use the `--type` option to tell the tool to lookup files in a subfolder. Here's an example.
|
|
52
|
+
|
|
53
|
+
cb deploy PROJECT_NAME --type deploy
|
|
54
|
+
|
|
55
|
+
This will look up `buildspec.yml`, `project.rb`, and `role.rb` files in the `.codebuild/deploy` folder. So:
|
|
56
|
+
|
|
57
|
+
.codebuild/deploy/buildspec.yml
|
|
58
|
+
.codebuild/deploy/project.rb
|
|
59
|
+
.codebuild/deploy/role.rb
|
|
60
|
+
|
|
61
|
+
Likewise `cb deploy PROJECT_NAME --type unit` would result in:
|
|
62
|
+
|
|
63
|
+
.codebuild/unit/buildspec.yml
|
|
64
|
+
.codebuild/unit/project.rb
|
|
65
|
+
.codebuild/unit/role.rb
|
|
66
|
+
|
|
67
|
+
Also, for help info you can check the [cb deploy]({% link _reference/codebuild-deploy.md %}) CLI reference.
|
|
68
|
+
|
|
69
|
+
{% include prev_next.md %}
|
data/docs/_docs/dsl.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CodeBuild DSL
|
|
3
|
+
nav_order: 11
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
CodeBuild provides a simple yet powerful DSL to create CodeBuild related resources. Here are some examples of resources it can create:
|
|
7
|
+
|
|
8
|
+
* [project]({% link _docs/dsl/project.md %}): The CodeBuild project. This is required.
|
|
9
|
+
* [iam role]({% link _docs/dsl/role.md %}): The IAM role associated with the CodeBuild project.
|
|
10
|
+
* [schedule]({% link _docs/dsl/schedule.md %}): An CloudWatch Event rule. The rule triggers the codebuild project to start on a scheduled basis.
|
|
11
|
+
|
|
12
|
+
{% include prev_next.md %}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Project DSL
|
|
3
|
+
nav_text: Project
|
|
4
|
+
categories: dsl
|
|
5
|
+
nav_order: 12
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You define the CodeBuild project in `.codebuild/project.rb`. Here's an example of the DSL used to create a codebuild project.
|
|
9
|
+
|
|
10
|
+
.codebuild/project.rb:
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
# name("demo") # recommended to leave unset and use the conventional name that cb tool sets
|
|
14
|
+
github_url("https://github.com/tongueroo/demo-ufo")
|
|
15
|
+
linux_image("aws/codebuild/ruby:2.5.3-1.7.0")
|
|
16
|
+
environment_variables(
|
|
17
|
+
UFO_ENV: "development",
|
|
18
|
+
API_KEY: "ssm:/codebuild/demo/api_key" # ssm param example
|
|
19
|
+
)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Here's a list of some of the convenience shorthand DSL methods:
|
|
23
|
+
|
|
24
|
+
* github_url(url)
|
|
25
|
+
* github_source(options={})
|
|
26
|
+
* linux_image(name)
|
|
27
|
+
* linux_environment(options={})
|
|
28
|
+
* environment_variables(vars)
|
|
29
|
+
* local_cache(enable=true)
|
|
30
|
+
|
|
31
|
+
Refer to the [dsl/project.rb](https://github.com/tongueroo/codebuild/blob/master/lib/codebuild/dsl/project.rb) source code for the most updated list of methods.
|
|
32
|
+
|
|
33
|
+
## Full DSL
|
|
34
|
+
|
|
35
|
+
The convenience methods are shorter and cleaner. However, you have access to a Full DSL if needed. The Full DSL methods are merely the properties of the [AWS::CodeBuild::Project CloudFormation Resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html). Here's an example.
|
|
36
|
+
|
|
37
|
+
.codebuild/project.rb:
|
|
38
|
+
|
|
39
|
+
```ruby
|
|
40
|
+
name("demo") # recommend to not set this, and let the codebuild tool set this automatically
|
|
41
|
+
description("desc2")
|
|
42
|
+
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html
|
|
43
|
+
source(
|
|
44
|
+
type: "GITHUB",
|
|
45
|
+
location: "https://github.com/tongueroo/demo-ufo",
|
|
46
|
+
git_clone_depth: 1,
|
|
47
|
+
git_submodules_config: { fetch_submodules: true },
|
|
48
|
+
build_spec: ".codebuild/buildspec.yml",
|
|
49
|
+
auth: {
|
|
50
|
+
type: "OAUTH",
|
|
51
|
+
resource: ssm("/codebuild/demo/oauth_token"),
|
|
52
|
+
},
|
|
53
|
+
report_build_status: true,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
artifacts(type: "NO_ARTIFACTS")
|
|
57
|
+
environment(
|
|
58
|
+
compute_type: "BUILD_GENERAL1_SMALL",
|
|
59
|
+
image_pull_credentials_type: "CODEBUILD",
|
|
60
|
+
privileged_mode: true,
|
|
61
|
+
image: "aws/codebuild/ruby:2.5.3-1.7.0",
|
|
62
|
+
environment_variables: [
|
|
63
|
+
{
|
|
64
|
+
type: "PLAINTEXT",
|
|
65
|
+
name: "UFO_ENV",
|
|
66
|
+
value: "development"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
type: "PARAMETER_STORE",
|
|
70
|
+
name: "API_KEY",
|
|
71
|
+
value: "/codebuild/demo/api_key"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
type: "LINUX_CONTAINER"
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
service_role(ref: "IamRole")
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
{% include prev_next.md %}
|