Skip to content

Commit

Permalink
chore(ci): auto sync fly after login for UTs
Browse files Browse the repository at this point in the history
Before running unit tests, we ensure fly version is consistent with running concourse
  • Loading branch information
o-orand committed Oct 31, 2024
1 parent 3bc99d2 commit 48c77b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ jobs:
echo "Testing environment config:"
echo "---------------------------"
echo "System: $(uname -a)"
echo "fly $(fly --version)"
echo "Docker image fly $(fly --version)"
ruby --version
bundle --version
bundle exec rspec --version
Expand All @@ -251,11 +251,13 @@ jobs:
git config --global user.name "COA CI"
echo "Running tests for $GIT_COMMIT_SHA@$GIT_BRANCH"
fly -t cf-ops-automation login -u ((concourse-username)) -p '((concourse-password))' -k -c ((concourse-url))
echo "Ensure local fly version is in sync with concourse"
fly -t cf-ops-automation sync
echo "Setup Code Climate coverage"
cc-test-reporter before-build
bundle exec rspec --format documentation --format html --out ../test-reports/rspec-results.html
echo "Sending coverage to Code Climate"
if [[ $(cc-test-reporter after-build) -eq 0 ]]; then
if [ $(cc-test-reporter after-build) -eq 0 ]; then
echo "Failed to run cc-test-reporter. Re-launch in debug mode";
echo "---------------------------"
cc-test-reporter after-build -d;
Expand Down

0 comments on commit 48c77b2

Please sign in to comment.