Skip to content

Commit

Permalink
ci: even quieter output
Browse files Browse the repository at this point in the history
  • Loading branch information
rosado committed Jul 25, 2024
1 parent 6078bb4 commit 045b49b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 55 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
curl --silent "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
sudo ./aws/install --update
sudo apt-get -q update
sudo apt-get -q install -y rsync
sudo apt-get -qq update
sudo apt-get -qq install -y rsync
- id: install-node-dependencies
run: |
Expand All @@ -41,12 +41,12 @@ jobs:
- uses: aws-actions/amazon-ecr-login@v1

- id: run-with-docker-compose
run: docker compose -f docker-compose-real-backend.yml up -d
run: docker compose --quiet -f docker-compose-real-backend.yml up -d

- id: docker-compose-ps
run: |
sleep 30
docker compose -f docker-compose-real-backend.yml ps
docker compose --quiet -f docker-compose-real-backend.yml ps
curl -v http://localhost:8085/
- id: run-acceptance-tests
Expand All @@ -62,10 +62,10 @@ jobs:
- id: docker-compose-logs
if: always()
run: |
docker compose -f docker-compose-real-backend.yml logs --tail frontend
docker compose -f docker-compose-real-backend.yml logs --tail request-api
docker compose --quiet -f docker-compose-real-backend.yml logs --tail frontend
docker compose --quiet -f docker-compose-real-backend.yml logs --tail request-api
- id: stop-containers
if: always()
run: docker compose -f docker-compose-real-backend.yml down
run: docker compose --quiet -f docker-compose-real-backend.yml down
56 changes: 8 additions & 48 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
curl --silent "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
sudo ./aws/install --update
sudo apt-get -q update
sudo apt-get -q install -y rsync
sudo apt-get -qq update
sudo apt-get -qq install -y rsync
- id: install-node-dependencies
run: |
Expand All @@ -47,12 +47,12 @@ jobs:
- uses: aws-actions/amazon-ecr-login@v1

- id: run-with-docker-compose
run: docker compose -f docker-compose-real-backend.yml up -d
run: docker compose --quiet -f docker-compose-real-backend.yml up -d

- id: docker-compose-ps
run: |
sleep 30
docker compose -f docker-compose-real-backend.yml ps
docker compose --quiet -f docker-compose-real-backend.yml ps
curl -v http://localhost:8085/
- id: run-acceptance-tests
Expand All @@ -68,13 +68,13 @@ jobs:
- id: docker-compose-logs
if: always()
run: |
docker compose -f docker-compose-real-backend.yml logs --tail frontend
docker compose -f docker-compose-real-backend.yml logs --tail request-api
docker compose --quiet -f docker-compose-real-backend.yml logs --tail frontend
docker compose --quiet -f docker-compose-real-backend.yml logs --tail request-api
- id: stop-containers
if: always()
run: docker compose -f docker-compose-real-backend.yml down
run: docker compose --quiet -f docker-compose-real-backend.yml down

detect-environments:
runs-on: ubuntu-latest
Expand All @@ -93,44 +93,4 @@ jobs:
const {data: {environments}} =
await github.request(`GET /repos/${process.env.GITHUB_REPOSITORY}/environments`);
return environments.map(e => e.name)
# deploy:
# runs-on: ubuntu-latest
# needs: [detect-environments]
# if: github.ref_name == 'main'
# strategy:
# matrix:
# environment: ${{ fromJSON(needs.detect-environments.outputs.environments) }}
# environment: ${{ matrix.environment }}
# env:
# DOCKER_REPO: ${{ secrets.DEPLOY_DOCKER_REPOSITORY }}
# steps:
# - uses: actions/checkout@v4

# - id: vars
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

# - run: |
# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
# unzip -q awscliv2.zip
# sudo ./aws/install --update
# sudo apt-get update
# sudo apt-get install -y rsync

# - uses: aws-actions/configure-aws-credentials@v1-node16
# with:
# aws-access-key-id: ${{ secrets.DEPLOY_AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.DEPLOY_AWS_SECRET_ACCESS_KEY }}
# aws-region: eu-west-2

# - uses: aws-actions/amazon-ecr-login@v1

# - run: docker pull $DOCKER_REPO:latest || echo "no current latest image"

# - run: docker build --build-arg DEPLOY_TIME="$(date +%Y-%m-%dT%H:%M:%S)" --build-arg GIT_COMMIT="${{ steps.vars.outputs.sha_short }}" -t $DOCKER_REPO:${{ steps.vars.outputs.sha_short }} .

# - run: docker tag $DOCKER_REPO:${{ steps.vars.outputs.sha_short }} $DOCKER_REPO:latest

# - run: docker push $DOCKER_REPO:${{ steps.vars.outputs.sha_short }}

# - run: docker push $DOCKER_REPO:latest

0 comments on commit 045b49b

Please sign in to comment.