Skip to content

Commit ecdc650

Browse files
committed
more fixes to CI
1 parent 349822b commit ecdc650

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.circleci/ci_integration.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,25 @@ finish() {
1313
setup_environment() {
1414
local tmpfile
1515
tmpfile="$(mktemp)"
16-
echo "${SERVICE_ACCOUNT_JSON}" > "${tmpfile}"
16+
17+
echo "$GOOGLE_APPLICATION_CREDENTIALS" > "${tmpfile}"
1718

1819
# Terraform and most other tools respect GOOGLE_CREDENTIALS
19-
export GOOGLE_CREDENTIALS="${SERVICE_ACCOUNT_JSON}"
20+
export GOOGLE_CREDENTIALS="$GOOGLE_APPLICATION_CREDENTIALS"
21+
2022
# gcloud variables
21-
export CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE="${tmpfile}"
2223
export CLOUDSDK_CORE_PROJECT="${PROJECT_ID}"
2324
export GOOGLE_APPLICATION_CREDENTIALS="${tmpfile}"
25+
gcloud auth activate-service-account --key-file="${tmpfile}"
26+
gcloud compute networks list --format=json
2427

2528
# Terraform input variables
2629
export TF_VAR_project_id="${PROJECT_ID}"
2730
TF_VAR_random_string_for_testing="${RANDOM_STRING_FOR_TESTING:-$(LC_ALL=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 5 | head -n 1)}"
2831
export TF_VAR_random_string_for_testing
2932

30-
gcloud auth activate-service-account --key-file "$GOOGLE_APPLICATION_CREDENTIALS"
33+
# Setup auth for service account
34+
gcloud auth activate-service-account --key-file="${tmpfile}"
3135
}
3236

3337
main() {
@@ -38,9 +42,9 @@ main() {
3842

3943
# Setup environment
4044
setup_environment
45+
4146
set -x
4247
# Execute the test lifecycle
43-
bundle install --path vendor
4448
bundle exec kitchen create
4549
bundle exec kitchen converge -c 4
4650
bundle exec kitchen verify

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run-tests:
2222
<<: *docker
2323
environment:
24-
BUNDLE_PATH: vendor
24+
BUNDLE_PATH: vendor
2525

2626
steps:
2727
- checkout
@@ -37,8 +37,8 @@ jobs:
3737
paths:
3838
- vendor
3939
- run:
40-
name: Run test command
41-
command: echo ${CIRCLE_PROJECT_REPONAME}
40+
name: Run test-kitchen cicle
41+
command: .circleci/ci_integration.sh
4242

4343
workflows:
4444
version: 2

0 commit comments

Comments
 (0)