Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
Try to debug CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
vchudnov-g committed Oct 31, 2019
1 parent 302c5f8 commit b525fb6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ anchor_test_ruby_client: &anchor_test_ruby_client
bundle update
bundle exec rake test
else
echo "Ruby ${TEST_API} library was not generated."
echo "Ruby ${TEST_API} library was not generated for ${LANGUAGE} at ${RUBY_GEN_DIR}."
ls -la ${RUBY_GEN_DIR}
exit 1
fi
when: always
Expand All @@ -133,6 +134,10 @@ anchor_run_ruby: &anchor_run_ruby
- attach_workspace:
# Use the workspace created in generate-clients
at: workspace
- run:
name: Prepare environment # The environemnt set for this job does not seem to propagate
command: |
echo 'export RUBY_GEN_DIR="/tmp/workspace/gapic-generator/artman-genfiles/ruby/google-cloud-ruby/"' >> $BASH_ENV
- run:
<<: *anchor_run_decrypt
- run:
Expand Down Expand Up @@ -397,7 +402,7 @@ jobs:
command: |
mkdir -p /tmp/workspace/reports/gapic-generator
cd gapic-generator
./gradlew check
./gradlew --info check
bash <(curl -s https://codecov.io/bash)
find -type f -regex ".*/build/test-results/.*xml" | xargs cp -t /tmp/workspace/reports/gapic-generator
when: always
Expand Down
6 changes: 3 additions & 3 deletions generate_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def generate_clients(root_dir, languages, artman_config, log_dir, user_config):
else:
logger.info("All passed.")

return success
return success, failure


def _generate_artifact(artman_config, artifact_name, root_dir, log_file, user_config_file):
Expand Down Expand Up @@ -161,10 +161,10 @@ def _setup_logger(log_file):
log_dir = os.path.abspath(flags.log_dir)
user_config = os.path.abspath(os.path.expanduser(flags.user_config)) if flags.user_config else None

successes = generate_clients(root_dir, flags.languages, flags.artman_config, log_dir, user_config)
successes, failures = generate_clients(root_dir, flags.languages, flags.artman_config, log_dir, user_config)

# Exit with success if there were any successful generations.
if successes:
if not failures:
sys.exit(0)
else:
sys.exit('Client generation failed.')

0 comments on commit b525fb6

Please sign in to comment.