terraspace_ci_github 0.1.3 → 0.2.0

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: bd1bc2f04e34e6cb7e0cc58e2d87f4dd393b28043f383fffe6f7e6e842da38fb
4
- data.tar.gz: f53bedc944ff116d042877f47e1f3768a1549a6ab0c97956c7ad38e40a13f996
3
+ metadata.gz: ed3862589c53aacc52e4ef608a40dfc2c497e975972dd4873d14a2187308812a
4
+ data.tar.gz: f141392dd32495f4ba7297848713a44bb845de03f22881f85afdcd293f06c5f1
5
5
  SHA512:
6
- metadata.gz: 31ffa1b4da8351b72a49c6fc0f95afd6679f1a0b936538ce0509a1fe97bea21737ee09a51da821a8f8e232b73d279f8340de3b8237b5df30d9f77be0a5094b63
7
- data.tar.gz: 4b693db74e2d5aa7dab995039cde20909e7ad3f8b35a49585f58fb49b1e8bb48cb894ee3245bde054b2077cb3f4898eea271f64554d4a0e2c919ee05869d4922
6
+ metadata.gz: 0a7fe5e22a954b75c84d6a8f0f7d0f4b87dc90a79c0b00dafd85dffc868f7e01bd5467091e78822ac62be3728d9af7c1ffb3dffeeba34a45a79eec5f5dd01cce
7
+ data.tar.gz: 55f8b17d8cfe9492202792b475ee77ba31dc319310bb29c10c522d6f25ddac0d7d6feb2902018b11f0fcd397b283c4cc350231c5cff62abedac952fd4d36ada6
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/).
5
5
 
6
+ ## [0.2.0] - 2022-07-11
7
+ - [#3](https://github.com/boltops-tools/terraspace_ci_github/pull/3) Cost support: install infracost
8
+ - [#4](https://github.com/boltops-tools/terraspace_ci_github/pull/4) Deprecate comment interface method
9
+ - update template: use github.token from github actions ci env instead
10
+
6
11
  ## [0.1.3] - 2022-06-15
7
12
  - [#2](https://github.com/boltops-tools/terraspace_ci_github/pull/2) get pr url from push commit message
8
13
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # terraspace_ci_github
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/terraspace.png)](http://badge.fury.io/rb/terraspace)
3
+ [![Gem Version](https://badge.fury.io/rb/terraspace_ci_github.png)](http://badge.fury.io/rb/terraspace_ci_github)
4
4
 
5
5
  [![BoltOps Badge](https://img.boltops.com/boltops/badges/boltops-badge.png)](https://www.boltops.com)
6
6
 
@@ -1,8 +1,15 @@
1
1
  #!/bin/bash
2
+
3
+ # install terraform
2
4
  brew install tfenv
3
5
  tfenv install latest
4
6
  tfenv use latest
5
7
  terraform --version
8
+
9
+ # install terraspace
6
10
  bundle install
7
11
  bundle exec terraspace new shim
8
12
  terraspace --version
13
+
14
+ # install infracost
15
+ curl -fsSL https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh | sh
@@ -9,13 +9,13 @@ jobs:
9
9
 
10
10
  env:
11
11
  <%= plugin_env_vars(indent: 6) -%>
12
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
12
+ GH_TOKEN: ${{ github.token }}
13
13
  TS_ENV: dev
14
14
  TS_TOKEN: ${{ secrets.TS_TOKEN }}
15
15
 
16
16
  steps:
17
17
  <%= partial "init_steps.yml" -%>
18
18
 
19
- - name: Terraspace Command
19
+ - name: Run Terraspace
20
20
  run: |
21
21
  terraspace plan demo
@@ -11,13 +11,13 @@ jobs:
11
11
 
12
12
  env:
13
13
  <%= plugin_env_vars(indent: 6) -%>
14
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
14
+ GH_TOKEN: ${{ github.token }}
15
15
  TS_ENV: dev
16
16
  TS_TOKEN: ${{ secrets.TS_TOKEN }}
17
17
 
18
18
  steps:
19
19
  <%= partial "init_steps.yml" -%>
20
20
 
21
- - name: Terraspace Command
21
+ - name: Run Terraspace
22
22
  run: |
23
23
  terraspace up demo -y
@@ -18,13 +18,13 @@ jobs:
18
18
 
19
19
  env:
20
20
  <%= plugin_env_vars(indent: 6) -%>
21
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
21
+ GH_TOKEN: ${{ github.token }}
22
22
  TS_ENV: ${{ github.event.inputs.env }}
23
23
  TS_TOKEN: ${{ secrets.TS_TOKEN }}
24
24
 
25
25
  steps:
26
26
  <%= partial "init_steps.yml" -%>
27
27
 
28
- - name: Terraspace Command
28
+ - name: Run Terraspace
29
29
  run: |
30
30
  terraspace ${{ github.event.inputs.command }} -y
@@ -7,6 +7,6 @@
7
7
  ruby-version: 3.1
8
8
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
9
9
 
10
- - name: Install
10
+ - name: Install Terraspace
11
11
  run:
12
12
  .github/bin/install
@@ -7,6 +7,9 @@ module TerraspaceCiGithub
7
7
 
8
8
  # optional interface
9
9
  def comment(url)
10
+ puts "DEPRECATED: The comment interface has been replaced by the terraspace_vcs_github gem."
11
+ puts "Please upgrade your terraspace install and add terraspace_vcs_github to your Terraspace project Gemfile."
12
+ puts "The comment interface method will be removed from terraspace."
10
13
  Pr.new.comment(url)
11
14
  end
12
15
  end
@@ -10,6 +10,7 @@ module TerraspaceCiGithub
10
10
  # urls
11
11
  pr_url: pr_url,
12
12
  build_url: build_url,
13
+ branch_url: branch_url,
13
14
  # additional properties
14
15
  build_type: build_type, # required IE: pull_request or push
15
16
  pr_number: pr_number, # set when build_type=pull_request
@@ -25,6 +26,10 @@ module TerraspaceCiGithub
25
26
  ENV['GITHUB_SERVER_URL'] || 'https://github.com'
26
27
  end
27
28
 
29
+ def branch_url
30
+ "#{host}/#{full_repo}/tree/#{branch_name}" if branch_name
31
+ end
32
+
28
33
  COMMIT_PATTERN = %r{Merge pull request #(\d) from (.*)}
29
34
  def pr_url
30
35
  if pr['number']
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TerraspaceCiGithub
4
- VERSION = "0.1.3"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terraspace_ci_github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-15 00:00:00.000000000 Z
11
+ date: 2022-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday-retry