conjur-cli 6.0.1 → 6.1.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: c8e1fcb9f16178d7df4bb379b2040f8823399db19540754d87d61b81c8190e24
4
- data.tar.gz: 3a36b197de69c0c3e0882eec341e407e0062df0e381e89e5579437344df0e3f6
3
+ metadata.gz: 0533b1c7e9164260ba4a86d41004a71811d24b034230909cbcb6967cc8ac71e5
4
+ data.tar.gz: 305ee4fc8b00b049b65eb7bd8742bd69d4bf41716c926291f21801b2139ce8f5
5
5
  SHA512:
6
- metadata.gz: 23a42edf43a99b23b34389ec85333c6198b28790c31d24a8ef9edd83b627af3c3e0a83d5351797e89e4b3b1a0e2d4f5b678491b865533c33a7377c59f17f585f
7
- data.tar.gz: 60c0c4ca64efae0bac433aaabe8f19a55245557d847e0d0172bd240acea07e2bb8ae7a5be8f7633fe37fad06bb2c26163ce6cb0f6c5d3992e1f5ca06e1013e1e
6
+ metadata.gz: f4bdae507abdcb0032bb312bbdba75fb5e6f94bc5292cfe773ee2ca691951ca3fe3616018b54bd9993e2d1f45bcb7ce5c7d87f9884f1d16e0d73e4dc238bddb3
7
+ data.tar.gz: 4a2d081ada6358818ec5b1607600e5b841e8d85bb3299da4fc9107a13bfc25700ebe72a1fbb3ac05b7b3dbf09834ec76b38df50def439292f958c5025bd4346a
@@ -54,38 +54,39 @@ pipeline {
54
54
 
55
55
  when {
56
56
  expression { currentBuild.resultIsBetterOrEqualTo('SUCCESS') }
57
- expression {
58
- def exitCode = sh returnStatus: true, script: ''' set +x
59
- echo "Determining if publishing is requested..."
60
-
61
- VERSION=`cat lib/conjur/version.rb | grep \'VERSION\\s*=\' | sed -e "s/.*\'\\(.*\\)\'.*/\\1/"`
62
- echo Declared version: $VERSION
63
-
64
- # Jenkins git plugin is broken and always fetches with `--no-tags`
65
- # (or `--tags`, neither of which is what you want), so tags end up
66
- # not being fetched. Try to fix that.
67
- # (Unfortunately this fetches all remote heads, so we may have to find
68
- # another solution for bigger repos.)
69
- git fetch -q
70
-
71
- # note when tag not found git rev-parse will just print its name
72
- TAG=`git rev-parse tags/v$VERSION 2>/dev/null || :`
73
- echo Tag v$VERSION: $TAG
74
-
75
- HEAD=`git rev-parse HEAD`
76
- echo HEAD: $HEAD
77
-
78
- test "$HEAD" = "$TAG"
79
- '''
80
- return exitCode == 0
81
- }
57
+ // expression {
58
+ // def exitCode = sh returnStatus: true, script: ''' set +x
59
+ // echo "Determining if publishing is requested..."
60
+ //
61
+ // VERSION=`cat lib/conjur/version.rb | grep \'VERSION\\s*=\' | sed -e "s/.*\'\\(.*\\)\'.*/\\1/"`
62
+ // echo Declared version: $VERSION
63
+ //
64
+ // # Jenkins git plugin is broken and always fetches with `--no-tags`
65
+ // # (or `--tags`, neither of which is what you want), so tags end up
66
+ // # not being fetched. Try to fix that.
67
+ // # (Unfortunately this fetches all remote heads, so we may have to find
68
+ // # another solution for bigger repos.)
69
+ // git fetch -q
70
+ //
71
+ // # note when tag not found git rev-parse will just print its name
72
+ // # TAG=`git rev-parse tags/v$VERSION 2>/dev/null || :`
73
+ // TAG=`git rev-list -n 1 "v$VERSION 2>/dev/null || :`
74
+ // echo Tag v$VERSION: $TAG
75
+ //
76
+ // HEAD=`git rev-parse HEAD`
77
+ // echo HEAD: $HEAD
78
+ //
79
+ // test "$HEAD" = "$TAG"
80
+ // '''
81
+ // return exitCode == 0
82
+ // }
82
83
  }
83
84
  steps {
84
85
  // Clean up first
85
86
  sh 'docker run -i --rm -v $PWD:/src -w /src alpine/git clean -fxd'
86
87
 
87
88
  sh './publish.sh'
88
-
89
+
89
90
  // Clean up again...
90
91
  sh 'docker run -i --rm -v $PWD:/src -w /src alpine/git clean -fxd'
91
92
  deleteDir()
data/README.md CHANGED
@@ -68,17 +68,31 @@ $ cd dev
68
68
  dev $ ./start.sh
69
69
  ```
70
70
 
71
- This will drop you into a bash shell in a container called `cli`. The sandbox also includes a Postgres container and Conjur server container. The environment is already setup to connect the CLI to the server:
71
+ This will drop you into a bash shell in a container called `cli`.
72
+
73
+ The sandbox also includes a Postgres container and Conjur server container. The
74
+ environment is already setup to connect the CLI to the server:
72
75
 
73
76
  * **CONJUR_APPLIANCE_URL** `http://conjur`
74
77
  * **CONJUR_ACCOUNT** `cucumber`
75
78
 
76
- You can obtain the API key for the role `cucumber:user:admin` from the Docker logs of the Conjur container. Use it to login:
79
+ To login to conjur, type the following and you'll be prompted for a password:
77
80
 
78
81
  ```sh-session
79
82
  root@2b5f618dfdcb:/# conjur authn login admin
80
83
  Please enter admin's password (it will not be echoed):
81
- Logged in
84
+ ```
85
+
86
+ The required password is the API key at the end of the output from the
87
+ `start.sh` script. It looks like this:
88
+
89
+ ```
90
+ =============== LOGIN WITH THESE CREDENTIALS ===============
91
+
92
+ username: admin
93
+ api key : 9j113d35wag023rq7tnv201rsym1jg4pev1t1nb4419767ms1cnq00n
94
+
95
+ ============================================================
82
96
  ```
83
97
 
84
98
  At this point, you can use any CLI command you like.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.0.1
1
+ 6.1.0
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
19
19
  gem.version = Conjur::VERSION
20
20
 
21
21
  gem.add_dependency 'activesupport', '>= 4.2', '< 6'
22
- gem.add_dependency 'conjur-api', '~> 5.0'
22
+ gem.add_dependency 'conjur-api', '~> 5.1'
23
23
  gem.add_dependency 'gli', '>=2.8.0'
24
24
  gem.add_dependency 'highline', '~> 1.7'
25
25
  gem.add_dependency 'netrc', '~> 0.10'
@@ -1,4 +1,5 @@
1
- #!/bin/bash -ex
1
+ #!/bin/bash
2
+ set -ex
2
3
 
3
4
  export COMPOSE_PROJECT_NAME=clirubydev
4
5
 
@@ -7,9 +8,28 @@ docker-compose build
7
8
  if [ ! -f data_key ]; then
8
9
  echo "Generating data key"
9
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
10
12
  fi
11
13
 
12
- export POSSUM_DATA_KEY="$(cat data_key)"
14
+ export CONJUR_DATA_KEY="$(cat data_key)"
13
15
 
14
16
  docker-compose up -d
17
+ docker-compose exec conjur conjurctl wait
18
+
19
+ apikey=$(docker-compose exec conjur \
20
+ conjurctl role retrieve-key cucumber:user:admin)
21
+
22
+ set +x
23
+ echo ''
24
+ echo ''
25
+ echo '=============== LOGIN WITH THESE CREDENTIALS ==============='
26
+ echo ''
27
+ echo 'username: admin'
28
+ echo "api key : ${apikey}"
29
+ echo ''
30
+ echo '============================================================'
31
+ echo ''
32
+ echo ''
33
+ set -x
34
+
15
35
  docker-compose exec cli bash
@@ -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.0.1'
22
+ VERSION = '6.1.0'
23
23
  ::Version=VERSION
24
24
  end
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.0.1
4
+ version: 6.1.0
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-04-05 00:00:00.000000000 Z
12
+ date: 2018-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -37,14 +37,14 @@ dependencies:
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '5.0'
40
+ version: '5.1'
41
41
  type: :runtime
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: '5.1'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: gli
50
50
  requirement: !ruby/object:Gem::Requirement