Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) suggestions for deprecated GH actions stuff, Feb 2023 edition #896

Open
wants to merge 33 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
34c3f31
add qa raster to h3 data notebook
elpamart Feb 17, 2023
021e72b
Add user delete endpoint
alexeh Feb 20, 2023
c59f00c
Add cascade delete user - scenario
alexeh Feb 20, 2023
52764c6
Add tests, fix intervention entity mock
alexeh Feb 20, 2023
92b59ff
Add build/publish tiler image workflow
alexeh Feb 22, 2023
58e0b15
feat(impact tables): Adds sorting by value of Year on Impact Tables
KevSanchez Feb 21, 2023
aa0fad8
Add tiler TF deployment
alexeh Feb 14, 2023
cb6461d
bypass auth middleware for health and openapi docs in tiler
alexeh Feb 23, 2023
bb2962f
Delete certs, add routing to tiler
alexeh Feb 23, 2023
e2bec76
test tiler dockerfile and deployment
alexeh Feb 23, 2023
379cc99
Add tiler folder to k8s deploy workflow
alexeh Feb 23, 2023
43f1b68
destroy vcf namespace
alexeh Feb 23, 2023
6facfea
Add ingress rule for tiler routing
alexeh Feb 23, 2023
7e637d7
log path
alexeh Feb 23, 2023
4baf6f8
Tweaks and improvements to the /data Dockerfile
tiagojsag Feb 24, 2023
2a17231
Add prefix to tiler
alexeh Feb 23, 2023
17e1808
Add routing env vars
alexeh Feb 23, 2023
66d687f
merging analysis specs; centralizing all intercepts in the specs
davidsingal Feb 22, 2023
17bc49e
Fix senario edition permission bug
barbara-chaves Feb 23, 2023
a865137
Include user to infinite scenarios request
barbara-chaves Feb 23, 2023
7ca84d7
Add fit to changelog
barbara-chaves Feb 23, 2023
9dddc32
fix tiler gh workflow
alexeh Feb 27, 2023
205472a
integrate s3 in tiler
alexeh Feb 25, 2023
54f0597
remove silence flag to test k8s deploy
alexeh Feb 27, 2023
441b084
add tmp default cog file
alexeh Feb 27, 2023
e180aa5
tmp workaround to k8s deployment
alexeh Feb 27, 2023
1218577
rollback k8s deployment workflow
alexeh Feb 27, 2023
3769250
tiler refactor
alexeh Feb 27, 2023
c495105
using env production for client test
davidsingal Feb 28, 2023
44a76be
fix impact test
alexeh Mar 1, 2023
7efeb6b
use string vs bool, according to schema
hotzevzl Feb 27, 2023
46274fd
update to actions/checkout@v3 (from v2)
hotzevzl Feb 27, 2023
d7c470a
switch from stdout to $GITHUB_OUTPUT file for set-output steps
hotzevzl Feb 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-database-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml.bck
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Fetch Code Climate reporter CLI
run: curl -L $CC_TEST_REPORTER_URL > ${{github.workspace}}/cc-test-reporter
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/deploy-to-kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
paths:
- 'api/**'
- 'client/**'
- 'tiler/**'
- '.github/**'
workflow_dispatch:

Expand Down Expand Up @@ -41,7 +42,7 @@ jobs:
needs: wait_for_image_push
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v1
Expand Down Expand Up @@ -90,18 +91,20 @@ jobs:
- name: Extract branch name
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "##[set-output name=branch-upper;]$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch-upper=$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )" >> $GITHUB_OUTPUT
id: extract_branch

- name: Redeploy production pods
if: ${{ steps.extract_branch.outputs.branch == 'main' }}
run: |
kubectl rollout restart deployment api -n production
kubectl rollout restart deployment tiler -n production
kubectl rollout restart deployment client -n production

- name: Redeploy pods for other branches
if: ${{ steps.extract_branch.outputs.branch != 'main' }}
run: |
kubectl rollout restart deployment api -n ${{ steps.extract_branch.outputs.branch }}
kubectl rollout restart deployment tiler -n ${{ steps.extract_branch.outputs.branch }}
kubectl rollout restart deployment client -n ${{ steps.extract_branch.outputs.branch }}
61 changes: 51 additions & 10 deletions .github/workflows/publish-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ on:
- 'api/**'
- 'client/**'
- 'marketing/**'
- 'tiler/**'
- 'data/**'
- '.github/**'
workflow_dispatch:
inputs:
waitForTest:
description: 'Set to "false" to skip waiting for the test to pass.'
required: true
default: true
default: 'true'

jobs:
wait_for_tests:
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:
needs: wait_for_tests
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -74,8 +75,8 @@ jobs:
- name: Extract branch name
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "##[set-output name=branch-upper;]$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch-upper=$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )" >> $GITHUB_OUTPUT
id: extract_branch

- name: Build API Docker image
Expand All @@ -100,7 +101,7 @@ jobs:
needs: wait_for_tests
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -116,8 +117,8 @@ jobs:
- name: Extract branch name
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "##[set-output name=branch-upper;]$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch-upper=$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )" >> $GITHUB_OUTPUT
id: extract_branch

- name: Build Client Docker image
Expand Down Expand Up @@ -151,7 +152,7 @@ jobs:
needs: wait_for_tests
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -167,8 +168,8 @@ jobs:
- name: Extract branch name
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "##[set-output name=branch-upper;]$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch-upper=$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )" >> $GITHUB_OUTPUT
id: extract_branch

- name: Build Data Import Docker image
Expand All @@ -187,3 +188,43 @@ jobs:
run: |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG

push_tiler_to_registry:
name: Push Tiler Docker image to AWS ECR
runs-on: ubuntu-20.04
needs: wait_for_tests
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Get ECR Registry
id: ecr-login
uses: aws-actions/amazon-ecr-login@v1

- name: Extract branch name
shell: bash
run: |
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch-upper=$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )" >> $GITHUB_OUTPUT
id: extract_branch

- name: Build Tiler Docker image
env:
ECR_REGISTRY: ${{ steps.ecr-login.outputs.registry }}
ECR_REPOSITORY: tiler
IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG tiler
- name: Push Tiler Docker image to AWS ECR
env:
ECR_REGISTRY: ${{ steps.ecr-login.outputs.registry }}
ECR_REPOSITORY: tiler
IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
run: |
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
4 changes: 2 additions & 2 deletions .github/workflows/publish-marketing-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
- name: Extract branch name
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "##[set-output name=branch-upper;]$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )"
echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "branch-upper=$(echo ${GITHUB_REF#refs/heads/} | tr a-z A-Z )" >> $GITHUB_OUTPUT
id: extract_branch

- name: Build Marketing site Docker image
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testing-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js 18.12
uses: actions/setup-node@v2
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js 18.12
uses: actions/setup-node@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/testing-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
paths:
- 'client/**'
- '.github/workflows/testing-client.yml'

workflow_dispatch:

Expand Down
21 changes: 8 additions & 13 deletions .github/workflows/testing-tiler.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
name: Tiler Tests

on:

push:
paths:
- 'tiler/**'

workflow_dispatch:

jobs:
test:

testing-tiler:
name: Tiler Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10"W
- name: Install dependencies
working-directory: tiler
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements.txt
- name: Tiler tests
env:
# add environment variables for tests
working-directory: tiler/app
run: |
pytest
Loading