Skip to content

Commit

Permalink
chore(infra): disable version steps
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-h1 committed Jan 2, 2025
1 parent 077e743 commit 227f53a
Showing 1 changed file with 61 additions and 61 deletions.
122 changes: 61 additions & 61 deletions .github/workflows/deploy-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,29 +182,29 @@ jobs:
-t $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.TF_VAR_docker_image_tag }} -f docker/api/Dockerfile .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{ env.TF_VAR_docker_image_tag }}
get-current-version:
name: Get current API version
needs: [build-and-push-docker]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Get current version
run: |
response=$(curl -s https://pets-staging.lhowsam.com/api/version)
echo "Response: $response"
gitSha=$(echo $response | jq -r '.gitSha')
echo "gitSha: $gitSha"
echo "GIT_SHA=$gitSha" >> $GITHUB_ENV
# get-current-version:
# name: Get current API version
# needs: [build-and-push-docker]
# runs-on: ubuntu-latest
# timeout-minutes: 5
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# ref: ${{ github.head_ref }}

# - name: Get current version
# run: |
# response=$(curl -s https://pets-staging.lhowsam.com/api/version)
# echo "Response: $response"
# gitSha=$(echo $response | jq -r '.gitSha')
# echo "gitSha: $gitSha"
# echo "GIT_SHA=$gitSha" >> $GITHUB_ENV

migrate-db:
name: Migrate database
needs: [build-and-push-docker, get-current-version]
needs: [build-and-push-docker]
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
Expand Down Expand Up @@ -275,44 +275,44 @@ jobs:
run: terraform apply ./app.out
working-directory: ${{ env.TERRAFORM_ROOT }}

staging-e2e:
name: Staging e2e tests
needs: [get-current-version, deploy-infra]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Install moreutils
run: sudo apt install moreutils

# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}

- name: Check for new version
id: check_version
run: |
while true; do
response=$(curl -s https://pets-staging.lhowsam.com/api/version)
echo "Response: $response"
newGitSha=$(echo $response | jq -r '.gitSha')
echo "newGitSha: $newGitSha"
if [ "$newGitSha" != "${{ env.GIT_SHA }}" ]; then
echo "New version detected: $newGitSha"
echo "NEW_GIT_SHA=$newGitSha" >> $GITHUB_ENV
echo "running e2e tests"
break
fi
echo "No new version detected. Retrying in 5 seconds..."
sleep 5
done
- name: e2e staging
uses: ./.github/actions/e2e
with:
target: e2e-staging
# staging-e2e:
# name: Staging e2e tests
# needs: [get-current-version, deploy-infra]
# runs-on: ubuntu-latest
# timeout-minutes: 15
# steps:
# - name: Install moreutils
# run: sudo apt install moreutils

# # https://github.com/actions/virtual-environments/issues/1187
# - name: tune linux network
# run: sudo ethtool -K eth0 tx off rx off

# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# ref: ${{ github.head_ref }}

# - name: Check for new version
# id: check_version
# run: |
# while true; do
# response=$(curl -s https://pets-staging.lhowsam.com/api/version)
# echo "Response: $response"
# newGitSha=$(echo $response | jq -r '.gitSha')
# echo "newGitSha: $newGitSha"
# if [ "$newGitSha" != "${{ env.GIT_SHA }}" ]; then
# echo "New version detected: $newGitSha"
# echo "NEW_GIT_SHA=$newGitSha" >> $GITHUB_ENV
# echo "running e2e tests"
# break
# fi
# echo "No new version detected. Retrying in 5 seconds..."
# sleep 5
# done

# - name: e2e staging
# uses: ./.github/actions/e2e
# with:
# target: e2e-staging

0 comments on commit 227f53a

Please sign in to comment.