codepipeline 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c0d9f302516d5bf417e34c50a505651e1914bcad5808e92fd7d8153e735024a
4
- data.tar.gz: 3a230093f5c0ad559e4f9a2e4fe4e3a161b924f58edd52034d053522e3dd0b6e
3
+ metadata.gz: c512eabee2e9506733bde41ee89c2b83f03c5a45ea4e5abb31a96cee369cbe89
4
+ data.tar.gz: 1920d0720610d8388ac4502a24a794ead85eec0ecbde04100f9e9bc7265c99e1
5
5
  SHA512:
6
- metadata.gz: 5a845e6dda524324df5cf73979f536f7ae5a8bd442adb15089a0a596850e5c3c074e4b8a31448716c5370e0efe49b2152afe9b45ea3cb0633cba995876fa545b
7
- data.tar.gz: 03fd5976598655990e01c6679dbaeb37d3d5417717c166caaec7a7880c3d2546f5fcb2b57682981e878f4e9af816f826d240cb6909655947ffd5a8bf2ddb7a0e
6
+ metadata.gz: 626e1e6bede33a5b1fec8b774b015334b9f8d996f335f778f92eef8a538395266c4a205eedd033ccd0cefcb15b59f3a30ecd2c8b7d5ee4cd43c3397d295d77e2
7
+ data.tar.gz: f6f14e543a7275a3deb546031bd65444d1f3191fae20f3c1e395ef3aadfd6005406d5840dfb26214ad8bca5b20dcab34d0fe679add107fabab72be09c3229601
@@ -3,6 +3,9 @@
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.2.1]
7
+ - fix different branch check
8
+
6
9
  ## [0.2.0]
7
10
  - DSL: pipeline, role, schedule, webhook, sns
8
11
  - pipe deploy -b branch
@@ -56,8 +56,7 @@ It is useful to build pipelines with different source git branches. You can pass
56
56
  stage "Source" do
57
57
  github(
58
58
  source: "tongueroo/demo-test",
59
- branch: branch, # branch method defaults to "master" or the `pipe deploy --branch` option
60
- auth_token: ssm("/codebuild/github/tongueroo/oauth_token")
59
+ auth_token: ssm("/github/user/token")
61
60
  )
62
61
  end
63
62
  ```
@@ -11,8 +11,7 @@ The pipeline DSL allows you to define the stages and actions within that stage w
11
11
  stage "Source" do
12
12
  github(
13
13
  source: "tongueroo/demo-test",
14
- branch: branch, # branch method defaults to "master" or the `pipe deploy --branch` option
15
- auth_token: ssm("/codebuild/github/tongueroo/oauth_token")
14
+ auth_token: ssm("/github/user/token")
16
15
  )
17
16
  end
18
17
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: 'ECS Deploy: Codebuild ufo ship vs CodePipeline ECS Deploy'
3
- nav_order: 19
3
+ nav_order: 20
4
4
  ---
5
5
 
6
6
  CodePipeline comes with many [Action Type Integrations](https://docs.aws.amazon.com/codepipeline/latest/userguide/integrations-action-type.html). One of the Integrations is [Amazon Elastic Container Service](https://docs.aws.amazon.com/codepipeline/latest/userguide/integrations-action-type.html#integrations-deploy) deployment.
@@ -29,7 +29,6 @@ You might normally set the branch option in your pipeline.rb. Example:
29
29
  stage "Source" do
30
30
  github(
31
31
  source: "tongueroo/demo-cb",
32
- branch: "master", # optional, defaults to master
33
32
  auth_token: ssm("/github/user/token")
34
33
  )
35
34
  end
@@ -0,0 +1,58 @@
1
+ ---
2
+ title: Multiple CodeBuild Projects
3
+ nav_text: CodeBuild Projects
4
+ categories: examples
5
+ nav_order: 19
6
+ ---
7
+
8
+ In this example guide, we'll create a couple of test CodeBuild projects and quickly connect them up to a pipeline.
9
+
10
+ ## CodeBuild Projects
11
+
12
+ We'll use the the [codebuild](https://codebuild.cloud/) tool to quickly get going.
13
+
14
+ You can use any project, even an empty folder. You just have to make sure it is first pushed to GitHub. If you need an example project, you can try this one: [tongueroo/demo-ufo](https://github.com/tongueroo/demo-ufo).
15
+
16
+ First, you can use `cb init` create some starter ``.codebuild` files.
17
+
18
+ cd init
19
+ git add .
20
+ git commit -m 'add starter .codebuild files'
21
+ git push
22
+
23
+ Then create the 4 CodeBuild projects for testing:
24
+
25
+ for i in 1 2 3 4 ; do cb deploy demo$i --no-wait ; done
26
+
27
+ ## CodePipeline
28
+
29
+ Let's define a pipeline now with the 4 CodeBuild test projects. First, use `pipe init` to create the starter ``.codepipeline` files. Update your `pipeline.rb` with the following:
30
+
31
+ codepipeline/pipeline.rb:
32
+
33
+ ```ruby
34
+ stage "Source" do
35
+ github(
36
+ source: "tongueroo/demo-ufo", # replace with your repo
37
+ auth_token: ssm("/github/user/token")
38
+ )
39
+ end
40
+
41
+ stage "Build" do
42
+ codebuild "demo1"
43
+ codebuild "demo2", "demo3" # runs in parallel
44
+ codebuild "demo4"
45
+ end
46
+ ```
47
+
48
+ Deploy it with:
49
+
50
+ pipe deploy
51
+
52
+ Last, start the pipeline execution:
53
+
54
+ pipe start
55
+
56
+ That's it!
57
+
58
+ {% include prev_next.md %}
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Next Steps
3
- nav_order: 21
3
+ nav_order: 22
4
4
  ---
5
5
 
6
6
  Hopefully, you have a good feel for how codepipeline works now. From here, there are a few resources that can help you continue along:
@@ -53,7 +53,6 @@ pipe start demo-project # explicitly specify pipeline name
53
53
  stage "Source" do
54
54
  github(
55
55
  source: "tongueroo/demo-cb",
56
- branch: "master",
57
56
  auth_token: ssm("/codebuild/github/tongueroo/oauth_token")
58
57
  )
59
58
  end
@@ -8,7 +8,7 @@
8
8
  {% if page.title %}
9
9
  <title>{{ page.title }} - {{ site.title }}</title>
10
10
  {% else %}
11
- <title>TODO: default title</title>
11
+ <title>CodePipeline DSL</title>
12
12
  {% endif %}
13
13
 
14
14
  <meta name="description" content="{{ site.description }}">
@@ -6,7 +6,6 @@
6
6
  stage "Source" do
7
7
  github(
8
8
  source: "tongueroo/demo-cb",
9
- branch: "master",
10
9
  auth_token: ssm("/codebuild/github/tongueroo/oauth_token")
11
10
  )
12
11
  end
@@ -39,7 +39,6 @@ An important generated file `.codepipeline/pipeline.rb`. The starter file looks
39
39
  stage "Source" do
40
40
  github(
41
41
  source: "tongueroo/demo-test",
42
- branch: branch, # branch method defaults to "master" or the `pipe deploy --branch` option
43
42
  auth_token: ssm("/codebuild/github/tongueroo/oauth_token")
44
43
  )
45
44
  end
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Support
3
- nav_order: 20
3
+ nav_order: 21
4
4
  ---
5
5
 
6
6
  ## Getting Help
@@ -29,6 +29,7 @@ module Codepipe
29
29
  end
30
30
 
31
31
  def different_branch?
32
+ return false unless @options[:branch]
32
33
  current_pipeline_branch != @options[:branch]
33
34
  end
34
35
 
@@ -1,3 +1,3 @@
1
1
  module Codepipe
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codepipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
@@ -275,6 +275,7 @@ files:
275
275
  - docs/_docs/dsl/webhook.md
276
276
  - docs/_docs/ecs-deploy.md
277
277
  - docs/_docs/examples/different-branches.md
278
+ - docs/_docs/examples/multiple-codebuild-projects.md
278
279
  - docs/_docs/install.md
279
280
  - docs/_docs/next-steps.md
280
281
  - docs/_docs/settings.md