pact_broker-client 1.28.2 → 1.28.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release_gem.yml +17 -2
- data/.github/workflows/trigger_pact_docs_update.yml +3 -0
- data/CHANGELOG.md +9 -0
- data/lib/pact_broker/client/git.rb +12 -3
- data/lib/pact_broker/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21b198e50ce3323193d1d4ee08c5de775c6d1a86cea0fcab7150870a35a39dc2
|
4
|
+
data.tar.gz: 25f87195826bf949de6d330dc60cdbfcf06398fd9bee8b0d50c8095c98dd4230
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d32d943bb74e1bcaf0dcadb22f6fe8b9d9c434c131e43cfa23f67c7a2eeae7c5a7c4bceceb1bea9346ae5f30b10a2dbacff4a18c7a8c3d2046c03522ee78301d
|
7
|
+
data.tar.gz: 5a0065b1401a19cd4407c3f88f957e4169d7ca878ca35157c8b340475146372d32fffcd8ba135b2799a8ff70c1218343d79bb159ef59e3b2aec13711addfbbd7
|
@@ -6,7 +6,21 @@ on:
|
|
6
6
|
- release-triggered
|
7
7
|
|
8
8
|
jobs:
|
9
|
+
test:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v2
|
13
|
+
- uses: actions/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: '2.6'
|
16
|
+
- run: |
|
17
|
+
gem install bundler -v 2.1
|
18
|
+
bundle install
|
19
|
+
- name: Test
|
20
|
+
run: bundle exec rake
|
21
|
+
|
9
22
|
release:
|
23
|
+
needs: test
|
10
24
|
runs-on: ubuntu-latest
|
11
25
|
outputs:
|
12
26
|
gem_name: ${{ steps.release.outputs.gem_name }}
|
@@ -22,11 +36,12 @@ jobs:
|
|
22
36
|
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_API_KEY }}'
|
23
37
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
24
38
|
INCREMENT: '${{ github.event.client_payload.increment }}'
|
25
|
-
|
39
|
+
|
40
|
+
notify-gem-released:
|
26
41
|
needs: release
|
27
42
|
strategy:
|
28
43
|
matrix:
|
29
|
-
repository: [pact-foundation/pact-ruby-cli, pact-foundation/pact-ruby-standalone]
|
44
|
+
repository: [pact-foundation/pact-ruby-cli, pact-foundation/pact-ruby-standalone, $GITHUB_REPOSITORY]
|
30
45
|
runs-on: ubuntu-latest
|
31
46
|
steps:
|
32
47
|
- name: Notify ${{ matrix.repository }} of gem release
|
data/CHANGELOG.md
CHANGED
@@ -11,7 +11,7 @@ APPVEYOR_REPO_COMMIT APPVEYOR_REPO_BRANCH https://www.appveyor.com/docs/en
|
|
11
11
|
CI_COMMIT_REF_NAME https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
|
12
12
|
CI_BRANCH CI_COMMIT_ID https://documentation.codeship.com/pro/builds-and-configuration/environment-variables/
|
13
13
|
bamboo.repository.git.branch https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html
|
14
|
-
BITBUCKET_BRANCH https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html
|
14
|
+
BITBUCKET_BRANCH BITBUCKET_COMMIT https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html
|
15
15
|
|
16
16
|
=end
|
17
17
|
|
@@ -21,6 +21,11 @@ module PactBroker
|
|
21
21
|
module Git
|
22
22
|
COMMAND = 'git name-rev --name-only HEAD'.freeze
|
23
23
|
BRANCH_ENV_VAR_NAMES = %w{BUILDKITE_BRANCH CIRCLE_BRANCH TRAVIS_BRANCH GIT_BRANCH GIT_LOCAL_BRANCH APPVEYOR_REPO_BRANCH CI_COMMIT_REF_NAME BITBUCKET_BRANCH}.freeze
|
24
|
+
COMMIT_ENV_VAR_NAMES = %w{BUILDKITE_COMMIT CIRCLE_SHA1 TRAVIS_COMMIT GIT_COMMIT APPVEYOR_REPO_COMMIT CI_COMMIT_ID BITBUCKET_COMMIT}
|
25
|
+
|
26
|
+
def self.commit
|
27
|
+
find_commit_from_env_vars
|
28
|
+
end
|
24
29
|
|
25
30
|
def self.branch
|
26
31
|
find_branch_from_env_vars || branch_from_git_command
|
@@ -28,11 +33,15 @@ module PactBroker
|
|
28
33
|
|
29
34
|
# private
|
30
35
|
|
36
|
+
def self.find_commit_from_env_vars
|
37
|
+
COMMIT_ENV_VAR_NAMES.collect { |env_var_name| value_from_env_var(env_var_name) }.compact.first
|
38
|
+
end
|
39
|
+
|
31
40
|
def self.find_branch_from_env_vars
|
32
|
-
BRANCH_ENV_VAR_NAMES.collect { |env_var_name|
|
41
|
+
BRANCH_ENV_VAR_NAMES.collect { |env_var_name| value_from_env_var(env_var_name) }.compact.first
|
33
42
|
end
|
34
43
|
|
35
|
-
def self.
|
44
|
+
def self.value_from_env_var(env_var_name)
|
36
45
|
val = ENV[env_var_name]
|
37
46
|
if val && val.strip.size > 0
|
38
47
|
val
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact_broker-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.28.
|
4
|
+
version: 1.28.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Beth Skurrie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|