Skip to content

Commit

Permalink
Fix Jenkins build: error when retrieving API key (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-odonnell authored May 13, 2022
1 parent f47127b commit 620d5bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function runOssTests() {

conjur_client_cid=$(docker-compose ps -q client)

api_key_admin=$(docker-compose exec -T conjur rails r "print Credentials['cucumber:user:admin'].api_key")
api_key_admin=$(docker-compose exec -T conjur conjurctl role retrieve-key cucumber:user:admin)

# Execute OSS tests
docker-compose run --rm \
Expand All @@ -141,9 +141,9 @@ function runOssHttpsTests() {
echo "Running https tests"
echo '------------------------------------------------------------'

api_key_admin=$(docker-compose exec -T conjur rails r "print Credentials['cucumber:user:admin'].api_key")
api_key_alice=$(docker-compose exec -T conjur rails r "print Credentials['cucumber:user:alice@test'].api_key")
api_key_myapp=$(docker-compose exec -T conjur rails r "print Credentials['cucumber:host:test/myapp'].api_key")
api_key_admin=$(docker-compose exec -T conjur conjurctl role retrieve-key cucumber:user:admin)
api_key_alice=$(docker-compose exec -T conjur conjurctl role retrieve-key cucumber:user:alice@test)
api_key_myapp=$(docker-compose exec -T conjur conjurctl role retrieve-key cucumber:host:test/myapp)

echo 'api keys:'
echo 'user admin api key = ' ${api_key_admin}
Expand Down
2 changes: 1 addition & 1 deletion bin/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function loadOssPolicy() {

conjur_client_cid=$(docker-compose ps -q client)

api_key=$(docker-compose exec -T conjur rails r "print Credentials['cucumber:user:admin'].api_key")
api_key=$(docker-compose exec -T conjur conjurctl role retrieve-key cucumber:user:admin)

# Copy test-policy into a /tmp/test-policy within the possum container
docker cp test-policy ${conjur_client_cid}:/tmp
Expand Down

0 comments on commit 620d5bc

Please sign in to comment.