Skip to content
New issue

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

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

Already on GitHub? # to your account

Medication changes #8

Open
wants to merge 91 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
1a80605
Fixed npm audit errors
kiran-kharade-inflection Apr 22, 2023
0ff9189
Updated entrypoint.sh
kiran-kharade-inflection Apr 25, 2023
651f14b
Create dev-ci-cd.yml
rf-opssupport Apr 25, 2023
ee9b76f
Update dev-ci-cd.yml
rf-opssupport Apr 25, 2023
87e8050
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
ffca47c
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
80deb7e
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
9433e5a
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
cf8995c
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
cc8b356
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
5ba4235
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
de47cd4
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
4e93fa3
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
e3815ea
Update dev-ci-cd.yml
rf-opssupport Apr 26, 2023
e9d1c6b
Added a step to create facts database if it does not exist.l
kiran-kharade-inflection Apr 28, 2023
ffff5cb
Merge pull request #3 from REAN-Foundation/master
rf-opssupport Apr 28, 2023
eb2e612
Config-changes
kiran-kharade-inflection May 9, 2023
322baf3
Merge pull request #11 from REAN-Foundation/config-changes
tabbasum-rean May 9, 2023
7e21653
Made prefix allownull in person model
vinay-debug May 11, 2023
0402708
Merge pull request #12 from REAN-Foundation/change_person_model
tabbasum-rean May 11, 2023
c68d8a2
participant badges classification response
kiran-kharade-inflection May 17, 2023
82e3570
Merge pull request #13 from REAN-Foundation/participant_badge_classif…
tabbasum-rean May 17, 2023
e03e147
Corrected Occurrence Spell
tabbasum-rean May 17, 2023
6590869
Merge pull request #14 from REAN-Foundation/feature/spell_check
tabbasum-rean May 17, 2023
6410c4a
award exercise pipeline
vinay-debug May 24, 2023
01c774a
Postman collection with exercise schema
vinay-debug May 25, 2023
a2e46d6
Merge pull request #15 from REAN-Foundation/award_exercise_pipeline
vinay-debug May 25, 2023
a2e982f
Get badge images API and added badge images in S3 through seeder
tabbasum-rean May 31, 2023
d193bb9
vital award pipeline
vinay-debug Jun 2, 2023
c72eab0
Mental health badge pipeline
tabbasum-rean Jun 5, 2023
c6dd3c7
Added Vitals images of correct size
tabbasum-rean Jun 5, 2023
72100c8
Change badge name
tabbasum-rean Jun 5, 2023
48a375c
Merge pull request #16 from REAN-Foundation/feature/add_badge_images
kiran-rean Jun 6, 2023
1fa3748
postman for vitals award
vinay-debug Jun 6, 2023
e7a00f4
Merge pull request #18 from REAN-Foundation/feature/mental_health_badge
tabbasum-rean Jun 6, 2023
92d2ff9
Merge branch 'develop' into vital_fact_pipeline
vinay-debug Jun 6, 2023
323d22f
Merge pull request #17 from REAN-Foundation/vital_fact_pipeline
vinay-debug Jun 6, 2023
ec7eae7
Fixed issue with PublicUrl of badges
tabbasum-rean Jun 7, 2023
c0600c4
Merge pull request #19 from REAN-Foundation/feature/fixed_file_resour…
tabbasum-rean Jun 7, 2023
3370c57
Fixed file resource API route
tabbasum-rean Jun 7, 2023
3edaa5f
Merge pull request #20 from REAN-Foundation/feature/api_fixes
tabbasum-rean Jun 7, 2023
d53db84
Fixed issue with badge image upload
tabbasum-rean Jun 7, 2023
307bb7c
Merge pull request #21 from REAN-Foundation/feature/api_fixes
tabbasum-rean Jun 7, 2023
5a5bfa6
Merge pull request #22 from inflection-zone/master
kiran-rean Jun 11, 2023
e6037c4
Fixing file resource and badge image upload related issues.
kiran-kharade-inflection Jun 11, 2023
745fa5b
Reverting response for some client controller actions
kiran-kharade-inflection Jun 12, 2023
c3ca54f
Merge pull request #23 from REAN-Foundation/add_remove_participants
tabbasum-rean Jun 13, 2023
778fda5
Fixed issues with calculate contnuity - applying unique key check.
kiran-kharade-inflection Jun 15, 2023
08ccdf9
Added uat-ci-cd workflow
rf-opssupport Jun 15, 2023
403bc3d
Added uat-ci-cd workflow
rf-opssupport Jun 15, 2023
074aa7a
Merge pull request #25 from REAN-Foundation/feature/add_uat_cicd
rf-opssupport Jun 15, 2023
83f9816
Updated uat-ci-cd.yml file
rf-opssupport Jun 15, 2023
4672cf1
Merge pull request #26 from REAN-Foundation/feature/add_uat_cicd
rf-opssupport Jun 15, 2023
9f13f3c
Added DNS prefix in uat-cicd
rf-opssupport Jun 15, 2023
8ce1175
Merge pull request #27 from REAN-Foundation/feature/add_uat_cicd
rf-opssupport Jun 15, 2023
8fde223
Changes medication from any to all
vinay-debug Jun 16, 2023
4aa27da
Removed eslint error
vinay-debug Jun 16, 2023
dfb65d9
Merge pull request #24 from REAN-Foundation/continuity_fix
tabbasum-rean Jun 16, 2023
5ab5d5a
Corrected the postman collection
vinay-debug Jun 18, 2023
d774536
Merge pull request #28 from REAN-Foundation/change_medication_anyToAll
vinay-debug Jun 18, 2023
cbf6676
WIP - get how to earn badge content API
tabbasum-rean Jun 19, 2023
9d14d14
Added pr-ci-cd workflow
rf-opssupport Jun 20, 2023
6c3e390
Added pr-ci-cd workflow
rf-opssupport Jun 20, 2023
310e237
Merge pull request #29 from REAN-Foundation/feature/add-pr-cicd-workflow
rf-opssupport Jun 20, 2023
a185b38
Fixed number of batches issue
vinay-debug Jun 20, 2023
b0bf624
Fixed linting issue
vinay-debug Jun 20, 2023
b6e45d7
Merge pull request #30 from REAN-Foundation/fixed_batch_count
tabbasum-rean Jun 21, 2023
33d7642
Create prod.yml
rf-opssupport Jun 21, 2023
1b06ead
Update prod.yml
rf-opssupport Jun 21, 2023
5df6077
Create release-drafter.yml
rf-opssupport Jun 21, 2023
166a4f4
Update prod.yml
rf-opssupport Jun 21, 2023
c6c1077
Update prod.yml
rf-opssupport Jun 21, 2023
93d1fff
Update prod.yml
rf-opssupport Jun 21, 2023
53259d8
Update prod.yml
rf-opssupport Jun 21, 2023
f579143
Update prod.yml
rf-opssupport Jun 21, 2023
1c26d3b
Update prod.yml
rf-opssupport Jun 21, 2023
9a31b6b
Update prod.yml
rf-opssupport Jun 21, 2023
00a79d1
Update prod.yml
rf-opssupport Jun 21, 2023
9623b01
Get how to earn badge content API
tabbasum-rean Jun 22, 2023
778d479
Update prod.yml
rf-opssupport Jun 22, 2023
fd86956
Create aha-uat-ci-cd.yml
rf-opssupport Jun 23, 2023
d540190
Create aha-prod-ci-cd.yml
rf-opssupport Jun 23, 2023
b517194
Update aha-uat-ci-cd.yml
rf-opssupport Jun 23, 2023
a6d06c4
Merge pull request #35 from REAN-Foundation/feature/add_aha_workflows
rf-opssupport Jun 23, 2023
0875640
Added how to earn badge content
tabbasum-rean Jun 27, 2023
688bac7
Fixed linting errors
tabbasum-rean Jun 27, 2023
0c4f505
Merge pull request #36 from REAN-Foundation/feature/how_to_earn_badge…
tabbasum-rean Jun 27, 2023
47abdbd
Updated how to earn badge content
tabbasum-rean Jun 27, 2023
b8ae578
Merge pull request #37 from REAN-Foundation/feature/change_content
tabbasum-rean Jun 27, 2023
af90d9b
Medication award fact model updated
vinay-debug Jul 6, 2023
eacecbb
added time zone column in all badge fact model
vinay-debug Jul 7, 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
46 changes: 46 additions & 0 deletions .github/codeql/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@


name: "CodeQL"

on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
# workflow_dispatch:

jobs:
analyze-codeql:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["typescript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
51 changes: 51 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
change-template: "* $TITLE (#$NUMBER) by @$AUTHOR"
name-template: '$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '⚡ Breaking Changes'
labels:
- 'breaking-change'
- title: '🌟New features and non-breaking changes'
labels:
- 'major'
- 'feature'
- title: '🌟 Minor Changes'
labels:
- 'enhancement'
- title: '📜 Documentation updates'
labels:
- 'documentation'
- title: '🐛 Bug and hot fixes'
labels:
- 'bug'
- 'fix'
- title: '🚒 Deprecations'
labels:
- 'deprecated'
- title: '🔧 Maintenance'
labels:
- 'internal'
- 'dependencies'
exclude-labels:
- 'skip-changelog'
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: major
template: |
## Summary

## Changes

$CHANGES

## This release was made possible by the following contributors:

$CONTRIBUTORS
136 changes: 136 additions & 0 deletions .github/workflows/aha-prod-ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: AHA-PROD-CI-CD

# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the develop branch
workflow_dispatch:
inputs:
Tag_name:
description: Tag name of your release(please include "v" if needed)
required: true

jobs:


Github-ECR-Tag-Check:
runs-on: ubuntu-latest

steps:
- name: check tag
uses: mukunku/tag-exists-action@v1.2.0
id: checkTag
with:
tag: ${{ github.event.inputs.Tag_name }}

- name: Get release
if: ${{ steps.checkTag.outputs.exists == 'true' }}
id: result_release
uses: cardinalby/git-get-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
with:
tag: ${{ github.event.inputs.Tag_name }}
repo: REAN-Foundation/awards-service

- name: Configure AWS credentials
if: ${{ steps.checkTag.outputs.exists == 'true' }}
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 Image Tag
if: ${{ steps.checkTag.outputs.exists == 'true' }}
id: imageidvar
run: |
image_tag+=${{ steps.result_release.outputs.tag_name }} && image_tag+=_ && image_tag+=${{ steps.result_release.outputs.id }}
echo "imagetag_value=$(aws ecr-public describe-image-tags --repository-name awards-service --region us-east-1 --query "imageTagDetails[?imageTag=='$image_tag'].imageTag" --output text)" >> $GITHUB_OUTPUT

- name: ECR Image and Github Tag Check
run: |
if [[ ${{ steps.checkTag.outputs.exists }} == 'false' ]]; then exit 1; fi
if [[ -z "${{ steps.imageidvar.outputs.imagetag_value }}" ]]; then exit 1; fi

outputs:
release_name: ${{ steps.result_release.outputs.tag_name }}
release_id: ${{ steps.result_release.outputs.id }}



Deploy-ECS:
needs: Github-ECR-Tag-Check
environment: aha-prod
runs-on: ubuntu-latest

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

- name: Get release
id: result_release
uses: cardinalby/git-get-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
with:
tag: ${{ github.event.inputs.Tag_name }}
repo: REAN-Foundation/awards-service

- 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: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Amazon ECR
run: |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition ${{ secrets.TASK_DEFINTION_NAME }} \
--query taskDefinition > task-definition.json

- name: New image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: default
image: public.ecr.aws/i9y2d4u3/awards-service:${{ needs.Github-ECR-Tag-Check.outputs.release_name }}_${{ needs.Github-ECR-Tag-Check.outputs.release_id }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
wait-for-service-stability: true

- name: Task Definition Variable
id: taskdefintionvar
shell: bash
run: |
echo "task_definition_arn=$(aws ecs describe-task-definition --task-definition ${{ secrets.TASK_DEFINTION_NAME }} | jq '.[] | .taskDefinitionArn')" >> $GITHUB_OUTPUT

- name: Task Defintion ARN
run: |
echo "Task Defintion: ${{ steps.taskdefintionvar.outputs.task_definition_arn }}"

- name: Deploy Amazon ECS task definition using Duplo API
uses: fjogeleit/http-request-action@master
with:
url: 'https://reanfoundation.duplocloud.net/subscriptions/${{ secrets.DUPLO_ID }}/UpdateEcsService'
method: 'POST'
data: '{"TaskDefinition":${{ steps.taskdefintionvar.outputs.task_definition_arn }},"Name": "${{ secrets.SERVICE_NAME }}","Replicas":1, "HealthCheckGracePeriodSeconds": 1200, "DnsPrfx": ""}'
bearerToken: ${{ secrets.DUPLOCLOUD_TOKEN }}
141 changes: 141 additions & 0 deletions .github/workflows/aha-uat-ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: AHA-UAT-CI-CD

# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the develop branch
workflow_dispatch:
inputs:
Tag_name:
description: Tag name of your release(please include "v")
required: true

jobs:

CodeScan-ESLint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Lint Code Base
uses: github/super-linter@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: /
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json
VALIDATE_TYPESCRIPT_ES: true


Github-ECR-Tag-Check:
runs-on: ubuntu-latest
steps:
- name: check tag
uses: mukunku/tag-exists-action@v1.2.0
id: checkTag
with:
tag: ${{ github.event.inputs.Tag_name }}

- name: Get release
if: ${{ steps.checkTag.outputs.exists == 'true' }}
id: result_release
uses: cardinalby/git-get-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
with:
tag: ${{ github.event.inputs.Tag_name }}
repo: REAN-Foundation/awards-service

- name: Configure AWS credentials
if: ${{ steps.checkTag.outputs.exists == 'true' }}
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 Image Tag
if: ${{ steps.checkTag.outputs.exists == 'true' }}
id: imageidvar
run: |
image_tag+=${{ steps.result_release.outputs.tag_name }} && image_tag+=_ && image_tag+=${{ steps.result_release.outputs.id }}
echo "imagetag_value=$(aws ecr-public describe-image-tags --repository-name awards-service --region us-east-1 --query "imageTagDetails[?imageTag=='$image_tag'].imageTag" --output text)" >> $GITHUB_OUTPUT

- name: ECR Image and Github Tag Check
run: |
if [[ ${{ steps.checkTag.outputs.exists }} == 'false' ]]; then exit 1; fi
if [[ -z "${{ steps.imageidvar.outputs.imagetag_value }}" ]]; then exit 1; fi

outputs:
release_name: ${{ steps.result_release.outputs.tag_name }}
release_id: ${{ steps.result_release.outputs.id }}

Deploy-ECS:
needs: Github-ECR-Tag-Check
environment: aha-uat
runs-on: ubuntu-latest

steps:

- name: Checkout
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: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Amazon ECR
run: |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Download task definition
run: |
aws ecs describe-task-definition --task-definition ${{ secrets.TASK_DEFINTION_NAME }} \
--query taskDefinition > task-definition.json

- name: New image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: task-definition.json
container-name: default
image: public.ecr.aws/i9y2d4u3/awards-service:${{ needs.Github-ECR-Tag-Check.outputs.release_name }}_${{ needs.Github-ECR-Tag-Check.outputs.release_id }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
wait-for-service-stability: true

- name: Task Definition Variable
id: taskdefintionvar
shell: bash
run: |
echo "task_definition_arn=$(aws ecs describe-task-definition --task-definition ${{ secrets.TASK_DEFINTION_NAME }} | jq '.[] | .taskDefinitionArn')" >> $GITHUB_OUTPUT

- name: Task Defintion ARN
run: |
echo "Task Defintion: ${{ steps.taskdefintionvar.outputs.task_definition_arn }}"

- name: Deploy Amazon ECS task definition using Duplo API
uses: fjogeleit/http-request-action@master
with:
url: 'https://reanfoundation.duplocloud.net/subscriptions/${{ secrets.DUPLO_ID }}/UpdateEcsService'
method: 'POST'
data: '{"TaskDefinition":${{ steps.taskdefintionvar.outputs.task_definition_arn }},"Name": "${{ secrets.SERVICE_NAME }}","Replicas":1, "HealthCheckGracePeriodSeconds": 1200, "DnsPrfx": ""}'
bearerToken: ${{ secrets.DUPLOCLOUD_TOKEN }}
Loading