conjur-cli 6.2.0 → 6.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: f36460d10d570d5ff2a54a398d29306fe1219fafb7ba2840ae6ddf58c49371ba
4
- data.tar.gz: ea60423bdea6801c241156bc4a286f198fdc1540aa3688b127ce5ead8e7c293b
3
+ metadata.gz: d0520b947529d571863374704ce0b613a07b6e63fa1e9cb37932e0d254e17353
4
+ data.tar.gz: 490b04289eb77fdbb1c7d56fc317ac6266111af4cde3fb6a655c92e48cf50cf3
5
5
  SHA512:
6
- metadata.gz: 5461e4818f8b51ec34099e488e58b37722e592b1238ab7ce275935710b25890fd4ba1cbe5a464b74e7fedafdbc21320ab4fa206871cfbad124473c74ed3c79a0
7
- data.tar.gz: 6691b092ec9669c544234ac0f47449d915b0cbcae2562b5133b32378ea591c3987a716fa22daa8370b71e0e3988b9eda7a621f8062e9b32068f25c45acb05b31
6
+ metadata.gz: 726d627c741a1a7ae611316dd482e6b2d6633e8d193fef1879f1acd5d8a86e68f8f5a0e5f0d6679085b7f15a86930a2a747c6a43c307ebedcd31494d52b1714e
7
+ data.tar.gz: 0424f34f72f7b625270eb42cbfe432160ab4a063a2600d82b7a8efe51d07df5e95a42d85b5dc3138d4074e63d2e28b8fc2a448d6c6ffe61f1715cd477269b2a2
@@ -1,3 +1,7 @@
1
+ # 6.2.1
2
+
3
+ * Pin to xdg gem v2.2.3 due to a [crashing CLI](https://github.com/cyberark/conjur-cli/issues/243).
4
+
1
5
  # 6.2.0
2
6
 
3
7
  * Add `ldap-sync` subcommand.
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env groovy
2
+
1
3
  pipeline {
2
4
  agent { label 'executor-v2' }
3
5
 
@@ -6,10 +8,14 @@ pipeline {
6
8
  buildDiscarder(logRotator(daysToKeepStr: '30'))
7
9
  }
8
10
 
11
+ triggers {
12
+ cron(getDailyCronString())
13
+ }
14
+
9
15
  stages {
10
- stage('Test 2.2') {
16
+ stage('Test 2.4') {
11
17
  environment {
12
- RUBY_VERSION = '2.2.8'
18
+ RUBY_VERSION = '2.4'
13
19
  }
14
20
  steps {
15
21
  sh './test.sh'
@@ -17,9 +23,9 @@ pipeline {
17
23
  }
18
24
  }
19
25
 
20
- stage('Test 2.3') {
26
+ stage('Test 2.5') {
21
27
  environment {
22
- RUBY_VERSION = '2.3.5'
28
+ RUBY_VERSION = '2.5'
23
29
  }
24
30
  steps {
25
31
  sh './test.sh'
@@ -27,9 +33,9 @@ pipeline {
27
33
  }
28
34
  }
29
35
 
30
- stage('Test 2.4') {
36
+ stage('Test 2.6') {
31
37
  environment {
32
- RUBY_VERSION = '2.4.2'
38
+ RUBY_VERSION = '2.6'
33
39
  }
34
40
  steps {
35
41
  sh './test.sh'
@@ -37,12 +43,18 @@ pipeline {
37
43
  }
38
44
  }
39
45
 
40
- stage('Build standalone image & push to DockerHub') {
46
+ stage('Build standalone image') {
47
+ steps {
48
+ sh './build-standalone'
49
+ }
50
+ }
51
+
52
+ stage('Push standalone image to DockerHub') {
41
53
  when {
42
54
  branch 'master'
43
55
  }
56
+
44
57
  steps {
45
- sh './build-standalone'
46
58
  sh './push-image'
47
59
  }
48
60
  }
@@ -56,32 +68,11 @@ pipeline {
56
68
  expression { currentBuild.resultIsBetterOrEqualTo('SUCCESS') }
57
69
  branch "master"
58
70
  expression {
59
- def exitCode = sh returnStatus: true, script: ''' set +x
60
- echo "Determining if publishing is requested..."
61
-
62
- VERSION=`cat lib/conjur/version.rb | grep \'VERSION\\s*=\' | sed -e "s/.*\'\\(.*\\)\'.*/\\1/"`
63
- echo Declared version: $VERSION
64
-
65
- # Jenkins git plugin is broken and always fetches with `--no-tags`
66
- # (or `--tags`, neither of which is what you want), so tags end up
67
- # not being fetched. Try to fix that.
68
- # (Unfortunately this fetches all remote heads, so we may have to find
69
- # another solution for bigger repos.)
70
- git fetch -q
71
-
72
- # note when tag not found git rev-parse will just print its name
73
- # TAG=`git rev-parse tags/v$VERSION 2>/dev/null || :`
74
- TAG=`git rev-list -n 1 "v$VERSION" 2>/dev/null || :`
75
- echo Tag v$VERSION: $TAG
76
-
77
- HEAD=`git rev-parse HEAD`
78
- echo HEAD: $HEAD
79
-
80
- test "$HEAD" = "$TAG"
81
- '''
71
+ def exitCode = sh returnStatus: true, script: './needs-publishing'
82
72
  return exitCode == 0
83
73
  }
84
74
  }
75
+
85
76
  steps {
86
77
  // Clean up first
87
78
  sh 'docker run -i --rm -v $PWD:/src -w /src alpine/git clean -fxd'
data/Rakefile CHANGED
@@ -3,7 +3,6 @@ require "bundler/gem_tasks"
3
3
 
4
4
  begin
5
5
  require 'ci/reporter/rake/rspec'
6
- require 'ci/reporter/rake/cucumber'
7
6
  require 'cucumber'
8
7
  require 'cucumber/rake/task'
9
8
  require 'rspec/core/rake_task'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.1.1
1
+ 6.2.1
data/bin/conjur CHANGED
@@ -22,5 +22,7 @@
22
22
 
23
23
  require 'active_support'
24
24
  require 'conjur/cli'
25
-
25
+ if ENV['RAILS_ENV'] == 'development'
26
+ require 'pry'
27
+ end
26
28
  exit Conjur::CLI.run(ARGV)
@@ -1,6 +1,10 @@
1
1
  #!/bin/bash -ex
2
2
 
3
+ # This can run with mounted source directory which is used in different Ruby versions.
4
+ # Since library support is different for different versions, clear out the lock to
5
+ # make sure full gem resolution runs each time.
6
+ rm -f Gemfile.lock
3
7
  bundle install
4
8
 
5
9
  # If we got passed arguments, run that as the test command. Otherwise, run the full suite of tests.
6
- ${@-bundle exec rake jenkins}
10
+ exec ${@-bundle exec rake jenkins}
@@ -24,14 +24,13 @@ Gem::Specification.new do |gem|
24
24
  gem.add_dependency 'highline', '~> 1.7'
25
25
  gem.add_dependency 'netrc', '~> 0.10'
26
26
  gem.add_dependency 'deep_merge', '~> 1.0'
27
- gem.add_dependency 'xdg', '~> 2.2'
27
+ gem.add_dependency 'xdg', '= 2.2.3'
28
28
  gem.add_dependency 'table_print', '~> 1.5'
29
29
 
30
30
  gem.add_development_dependency 'rspec', '~> 3.0'
31
31
  gem.add_development_dependency 'simplecov'
32
32
  gem.add_development_dependency 'aruba', '~> 0.12'
33
33
  gem.add_development_dependency 'ci_reporter_rspec', '~> 1.0'
34
- gem.add_development_dependency 'ci_reporter_cucumber', '~> 1.0'
35
34
  gem.add_development_dependency 'rake', '~> 10.0'
36
35
  gem.add_development_dependency 'io-grab', '~> 0.0'
37
36
  gem.add_development_dependency 'json_spec'
@@ -17,6 +17,7 @@ services:
17
17
  entrypoint: sleep
18
18
  command: infinity
19
19
  environment:
20
+ RAILS_ENV: development
20
21
  CONJUR_APPLIANCE_URL: http://conjur
21
22
  CONJUR_ACCOUNT: cucumber
22
23
  working_dir: /src/conjur-cli
@@ -6,9 +6,9 @@ export COMPOSE_PROJECT_NAME=clirubydev
6
6
  docker-compose build
7
7
 
8
8
  if [ ! -f data_key ]; then
9
- echo "Generating data key"
10
- docker-compose run --no-deps --rm conjur data-key generate > data_key
11
- docker-compose run --no-deps --rm conjurctl role retrieve-key cucumber:user:admin
9
+ echo "Generating data key"
10
+ docker-compose pull
11
+ docker-compose run --no-deps --rm conjur data-key generate > data_key
12
12
  fi
13
13
 
14
14
  export CONJUR_DATA_KEY="$(cat data_key)"
@@ -18,5 +18,5 @@ Feature: Host factory tokens
18
18
  Scenario: create a host using a token
19
19
  When I successfully run `conjur hostfactory tokens create myapp`
20
20
  And I keep the JSON response at "0/token" as "TOKEN"
21
- Then I successfully run `conjur hostfactory hosts create %{TOKEN} host-01`
21
+ Then I use it to successfully run `conjur hostfactory hosts create %{TOKEN} host-01`
22
22
  And the JSON should have "api_key"
@@ -12,7 +12,3 @@ Feature: Show public keys for a user
12
12
  Scenario: After adding a key, the key is shown
13
13
  When I run `conjur pubkeys show alice`
14
14
  And the output should match /^ssh-rsa .* laptop$/
15
-
16
- Scenario: Public keys can be listed using cURL, without authentication
17
- When I successfully run `curl -k $conjur_url/public_keys/cucumber/user/alice`
18
- Then the output should match /^ssh-rsa .* laptop$/
@@ -1,22 +1,3 @@
1
- Transform /\$ns/ do |s|
2
- s.gsub('$ns', namespace)
3
- end
4
-
5
- Transform /\$user_role/ do |s|
6
- s.gsub('$user_role', test_user.role_id)
7
- end
8
-
9
- Transform /^table:/ do |table|
10
- table.tap do |t|
11
- t.hashes.each do |row|
12
- row.each do |_,v|
13
- v.gsub!('$ns', namespace)
14
- v.gsub!('$user_role', test_user.role_id)
15
- end
16
- end
17
- end
18
- end
19
-
20
1
  When /^the command completes successfully/ do
21
2
  last_command_started.wait
22
3
  last_command_started.terminate
@@ -1,9 +1,7 @@
1
1
  # Use a json_spec style memorized value as an environment variable
2
- When /I set the environment variable "(.*)" to memorized value "(.*)"/ do |key, value|
2
+ When /I use it to (.*)/ do |statement|
3
3
  JsonSpec.memory.each do |k,v|
4
- # JSON parser doesn't function properly on a JSON encoded string
5
- v = v[1...-1] if v[0] == '"'
6
- value.gsub! "%{#{k}}", v
4
+ statement = statement.gsub("%{#{k}}", v)
7
5
  end
8
- set_environment_variable key, value
6
+ step "I #{statement}"
9
7
  end
@@ -4,17 +4,6 @@ Aruba.configure do |config|
4
4
  config.io_wait_timeout = 2
5
5
  end
6
6
 
7
- Transform /\$conjur_url/ do |statement|
8
- statement.gsub "$conjur_url", Conjur.configuration.appliance_url
9
- end
10
-
11
- Transform /\%\{\w+\}/ do |statement|
12
- JsonSpec.memory.each do |k,v|
13
- statement = statement.gsub("%{#{k}}", v)
14
- end
15
- statement
16
- end
17
-
18
7
  Before('@conjurapi-log') do
19
8
  set_env 'CONJURAPI_LOG', 'stderr'
20
9
  end
@@ -25,9 +25,7 @@ require 'active_support/deprecation'
25
25
  require 'xdg'
26
26
  require 'fileutils'
27
27
 
28
- # this makes mime/types gem load much faster by lazy loading
29
- # mime types and caching them in binary form
30
- ENV['RUBY_MIME_TYPES_LAZY_LOAD'] ||= 'true'
28
+ # this makes mime/types gem load much faster by caching them in binary form
31
29
  ENV['RUBY_MIME_TYPES_CACHE'] ||= (
32
30
  XDG['CACHE'].to_path.tap(&FileUtils.method(:mkdir_p)) + 'ruby-mime-types.cache'
33
31
  ).to_s
@@ -19,6 +19,6 @@
19
19
  # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  #
21
21
  module Conjur
22
- VERSION = '6.2.0'
22
+ VERSION = '6.2.1'
23
23
  ::Version=VERSION
24
24
  end
@@ -0,0 +1,28 @@
1
+ #!/bin/bash -ex
2
+
3
+ echo "Determining if publishing is requested..."
4
+
5
+ VERSION=$(ruby -I lib -r conjur/version -e 'puts Conjur::VERSION')
6
+ echo Declared version: $VERSION
7
+
8
+ if curl -s https://rubygems.org/api/v1/versions/conjur-cli.json | jq -e ".[] | select(.number == \"$VERSION\")" >/dev/null; then
9
+ echo "Found $VERSION on rubygems, not republishing"
10
+ exit 1
11
+ fi
12
+
13
+ # Jenkins git plugin is broken and always fetches with `--no-tags`
14
+ # (or `--tags`, neither of which is what you want), so tags end up
15
+ # not being fetched. Try to fix that.
16
+ # (Unfortunately this fetches all remote heads, so we may have to find
17
+ # another solution for bigger repos.)
18
+ git fetch -q
19
+
20
+ # note when tag not found git rev-parse will just print its name
21
+ # TAG=`git rev-parse tags/v$VERSION 2>/dev/null || :`
22
+ TAG=`git rev-list -n 1 "v$VERSION" 2>/dev/null || :`
23
+ echo Tag v$VERSION: $TAG
24
+
25
+ HEAD=`git rev-parse HEAD`
26
+ echo HEAD: $HEAD
27
+
28
+ test "$HEAD" = "$TAG"
data/test.sh CHANGED
@@ -6,6 +6,11 @@
6
6
  RUBY_VERSION=$(cut -d '-' -f 2 <<< $RUBY_VERSION)
7
7
 
8
8
  main() {
9
+
10
+ # set up the containers to run in their own namespace
11
+ COMPOSE_PROJECT_NAME="$(basename "$PWD")_$(openssl rand -hex 3)"
12
+ export COMPOSE_PROJECT_NAME
13
+
9
14
  build
10
15
 
11
16
  start_conjur
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjur-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafal Rzepecki
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-22 00:00:00.000000000 Z
12
+ date: 2019-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -105,16 +105,16 @@ dependencies:
105
105
  name: xdg
106
106
  requirement: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: '2.2'
110
+ version: 2.2.3
111
111
  type: :runtime
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: '2.2'
117
+ version: 2.2.3
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: table_print
120
120
  requirement: !ruby/object:Gem::Requirement
@@ -185,20 +185,6 @@ dependencies:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
187
  version: '1.0'
188
- - !ruby/object:Gem::Dependency
189
- name: ci_reporter_cucumber
190
- requirement: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: '1.0'
195
- type: :development
196
- prerelease: false
197
- version_requirements: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: '1.0'
202
188
  - !ruby/object:Gem::Dependency
203
189
  name: rake
204
190
  requirement: !ruby/object:Gem::Requirement
@@ -392,6 +378,7 @@ files:
392
378
  - lib/conjur/version.rb
393
379
  - lib/patches/conjur/error.rb
394
380
  - lib/patches/gli.rb
381
+ - needs-publishing
395
382
  - profile.rb
396
383
  - publish.sh
397
384
  - push-image
@@ -430,8 +417,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
430
417
  - !ruby/object:Gem::Version
431
418
  version: '0'
432
419
  requirements: []
433
- rubyforge_project:
434
- rubygems_version: 2.7.6
420
+ rubygems_version: 3.0.3
435
421
  signing_key:
436
422
  specification_version: 4
437
423
  summary: Conjur command line interface