Skip to content

Commit

Permalink
Improve CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
Topin2001 committed May 2, 2024
1 parent e2bf909 commit b908fbf
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,8 @@ jobs:
# Run the tests (with the appropriate server image)
- name: Test docker image
run: |
echo "Retrieving the branch name..."
if [ "${{ github.event_name }}" = "push" ]
then
branch=${{ github.ref }}
branch=${branch#*/}
branch=${branch#*/}
else # PR
branch=${{ github.head_ref }}
fi
echo "Cloning the server repo on branch $branch..."
if ! git clone https://github.com/cnescatlab/sonarqube.git -b "$branch" tmpserver;
then
echo "No branch $branch found on the server repository, using develop"
git clone https://github.com/cnescatlab/sonarqube.git -b develop tmpserver
fi
echo "Building the server image..."
docker build -t lequal/sonarqube:latest tmpserver/
echo "Retrieving the sonarqube image..."
docker pull lequal/sonarqube-catlab:latest
echo "Testing the scanner image..."
echo -e "Results of the CI pipeline\n" > tests_logs.txt
cd tests/
Expand Down

0 comments on commit b908fbf

Please sign in to comment.