Skip to content

Commit

Permalink
Bringing in changes from previous PR on Running automated tests via CICD
Browse files Browse the repository at this point in the history
The previous PR commit history got messed up due to rebasing to handle the commits that had missing signoffs.
Created a new PR to bring over the final changes from there.

PR link: EVerest#62

Signed-off-by: Mahadik, Mukul Chandrakant <MukulChandrakant.Mahadik@nrel.gov>
  • Loading branch information
Mahadik, Mukul Chandrakant authored and Mahadik, Mukul Chandrakant committed Jul 16, 2024
1 parent 6ac3228 commit fe1b1fa
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,31 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
load: true
context: ${{ matrix.context }}
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ matrix.image_name }}
cache-to: type=gha,mode=max,scope=${{ matrix.image_name }}

- name: Run automated tests using docker-compose.automated-tests.yml
if: ${{ matrix.image_name == 'manager' }}
run: |
echo "Running docker compose up..."
docker compose --project-name everest-ac-demo \
--file "docker-compose.automated-tests.yml" up \
--abort-on-container-exit \
--exit-code-from manager
exit_code=$?
echo "Docker-compose up exit code from manager service: $exit_code"
- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
push: ${{ github.event_name != 'pull_request' }}
Expand Down

0 comments on commit fe1b1fa

Please sign in to comment.