-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from OpenG2P/1.0
1.0
- Loading branch information
Showing
15 changed files
with
197 additions
and
46 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: SR BG Tasks Beat Producers Tag Workflow | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
branches-ignore: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-to-pypi: | ||
name: Publish to PyPI For Beat Producers Tag | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: actions/checkout@v3 | ||
- name: Install build dependencies | ||
run: pip install build | ||
- name: Build distribution | ||
run: python -m build ./openg2p-sr-celery-beat-producers | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
packages-dir: ./openg2p-sr-celery-beat-producers/dist/ | ||
|
||
docker-build-for-tag: | ||
name: Docker Build and Push For Beat Producers Tag | ||
needs: publish-to-pypi | ||
runs-on: ubuntu-latest | ||
env: | ||
NAMESPACE: ${{ secrets.docker_hub_organisation || 'openg2p' }} | ||
SERVICE_NAME: openg2p-sr-celery-beat-producers | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Docker build | ||
run: | | ||
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | ||
# Change all uppercase to lowercase | ||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | ||
VERSION=$TAG_NAME | ||
echo IMAGE_ID=$IMAGE_ID | ||
echo VERSION=$VERSION | ||
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV | ||
echo VERSION=$VERSION >> $GITHUB_ENV | ||
docker build ./openg2p-sr-celery-beat-producers -f ./openg2p-sr-celery-beat-producers/Dockerfile-pypi \ | ||
--tag $IMAGE_ID:$VERSION | ||
if [[ '${{ secrets.docker_hub_token }}' != '' && '${{ secrets.docker_hub_actor }}' != '' ]]; then | ||
export DOCKER_PUSH="true" | ||
echo DOCKER_PUSH=$DOCKER_PUSH >> $GITHUB_ENV | ||
fi | ||
- name: Docker push | ||
if: env.DOCKER_PUSH == 'true' | ||
run: | | ||
echo "${{ secrets.docker_hub_token }}" | docker login -u ${{ secrets.docker_hub_actor }} --password-stdin | ||
docker push ${{ env.IMAGE_ID }}:${{ env.VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: SR BG Tasks Celery Worker Tag Workflow | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
branches-ignore: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-to-pypi: | ||
name: Publish to PyPI For Workers Tag | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: actions/checkout@v3 | ||
- name: Install build dependencies | ||
run: pip install build | ||
- name: Build distribution | ||
run: python -m build ./openg2p-sr-celery-workers | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
packages-dir: ./openg2p-sr-celery-workers/dist/ | ||
|
||
|
||
docker-build-for-tag: | ||
name: Docker Build and Push For Workers Tag | ||
needs: publish-to-pypi | ||
runs-on: ubuntu-latest | ||
env: | ||
NAMESPACE: ${{ secrets.docker_hub_organisation || 'openg2p' }} | ||
SERVICE_NAME: openg2p-sr-celery-workers | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Docker build | ||
run: | | ||
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | ||
# Change all uppercase to lowercase | ||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | ||
VERSION=$TAG_NAME | ||
echo IMAGE_ID=$IMAGE_ID | ||
echo VERSION=$VERSION | ||
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV | ||
echo VERSION=$VERSION >> $GITHUB_ENV | ||
docker build ./openg2p-sr-celery-workers -f ./openg2p-sr-celery-workers/Dockerfile-pypi \ | ||
--tag $IMAGE_ID:$VERSION | ||
if [[ '${{ secrets.docker_hub_token }}' != '' && '${{ secrets.docker_hub_actor }}' != '' ]]; then | ||
export DOCKER_PUSH="true" | ||
echo DOCKER_PUSH=$DOCKER_PUSH >> $GITHUB_ENV | ||
fi | ||
- name: Docker push | ||
if: env.DOCKER_PUSH == 'true' | ||
run: | | ||
echo "${{ secrets.docker_hub_token }}" | docker login -u ${{ secrets.docker_hub_actor }} --password-stdin | ||
docker push ${{ env.IMAGE_ID }}:${{ env.VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ RUN python3 -m venv venv \ | |
RUN python3 -m pip install \ | ||
git+https://github.com/openg2p/[email protected]\#subdirectory=openg2p-fastapi-common \ | ||
git+https://github.com/openg2p/[email protected]\#subdirectory=openg2p-fastapi-auth \ | ||
git+https://github.com/OpenG2P/openg2p-social-registry-bg-tasks@develop\#subdirectory=openg2p-sr-models \ | ||
git+https://github.com/OpenG2P/openg2p-social-registry-bg-tasks@1.0\#subdirectory=openg2p-sr-models \ | ||
./src | ||
|
||
USER ${container_user} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
AUTH_URL=https://keycloak.openg2p.org/realms/master/protocol/openid-connect/token | ||
AUTH_CLIENT_ID=client_id | ||
AUTH_CLIENT_SECRET=client_secret | ||
AUTH_GRANT_TYPE=client_credentials | ||
SR_CELERY_WORKERS_DB_DBNAME: socialregistrydb | ||
SR_CELERY_WORKERS_DB_USERNAME: socialregistryuser | ||
SR_CELERY_WORKERS_DB_HOSTNAME: '172.29.8.235' | ||
SR_CELERY_WORKERS_DB_PORT: 5432 | ||
SR_CELERY_WORKERS_CELERY_BROKER_URL: redis://{{ .Release.Name }}-redis-master:6379/0 | ||
SR_CELERY_WORKERS_CELERY_BACKEND_URL: redis://{{ .Release.Name }}-redis-master:6379/0 | ||
SR_CELERY_WORKERS_AUTH_URL: https://keycloak.openg2p.net/realms/master/protocol/openid-connect/token | ||
SR_CELERY_WORKERS_AUTH_CLIENT_ID: openg2p-sr-loadtest | ||
SR_CELERY_WORKERS_AUTH_CLIENT_SECRET: "" | ||
SR_CELERY_WORKERS_AUTH_GRANT_TYPE: client_credentials | ||
SR_CELERY_WORKERS_MOSIP_GET_UIN_URL: https://idgenerator.loadtest.openg2p.net/v1/idgenerator/uin | ||
SR_CELERY_WORKERS_MOSIP_UPDATE_UIN_URL: https://idgenerator.loadtest.openg2p.net/v1/idgenerator/uin | ||
SR_CELERY_WORKERS_MAX_ID_GENERATION_REQUEST_ATTEMPTS: 3 | ||
SR_CELERY_WORKERS_MAX_ID_GENERATION_UPDATE_ATTEMPTS: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ RUN python3 -m venv venv \ | |
RUN python3 -m pip install \ | ||
git+https://github.com/openg2p/[email protected]\#subdirectory=openg2p-fastapi-common \ | ||
git+https://github.com/openg2p/[email protected]\#subdirectory=openg2p-fastapi-auth \ | ||
git+https://github.com/OpenG2P/openg2p-social-registry-bg-tasks@develop\#subdirectory=openg2p-sr-models \ | ||
git+https://github.com/OpenG2P/openg2p-social-registry-bg-tasks@1.0\#subdirectory=openg2p-sr-models \ | ||
./src | ||
|
||
USER ${container_user} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.