-
Notifications
You must be signed in to change notification settings - Fork 0
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 #29 from alkem-io/develop
Notifications + Templates
- Loading branch information
Showing
70 changed files
with
2,048 additions
and
359 deletions.
There are no files selected for viewing
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,44 @@ | ||
name: Build & Deploy to Dev on AWS | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
|
||
env: | ||
ECR_REGISTRY: ${{ secrets.ECR_DEV_TEST_REGISTRY }} | ||
ECR_REPOSITORY: alkemio-notifications | ||
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA_DEV }} | ||
IMAGE_TAG: ${{ github.sha }} | ||
|
||
jobs: | ||
deploy: | ||
name: deploy to cluster | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_DEV_TEST_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_DEV_TEST_SECRET_ACCESS_KEY }} | ||
aws-region: eu-west-2 | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v1 | ||
|
||
- run: | | ||
docker build -f Dockerfile . -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
- name: deploy to cluster | ||
uses: kodermax/kubectl-aws-eks@master | ||
with: | ||
args: set image deployment/$ECR_REPOSITORY-deployment $ECR_REPOSITORY=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG | ||
|
||
- name: verify deployment | ||
uses: kodermax/kubectl-aws-eks@master | ||
with: | ||
args: rollout status deployment/$ECR_REPOSITORY-deployment |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ Alkemio out-of-band notifications service. | |
[![Build Status](https://app.travis-ci.com/alkem-io/notifications.svg?branch=develop)](https://app.travis-ci.com/alkem-io/notifications.svg?branch=develop) | ||
[![Coverage Status](https://coveralls.io/repos/github/alkem-io/notifications/badge.svg?branch=develop)](https://coveralls.io/github/alkem-io/notifications?branch=develop) | ||
[![BCH compliance](https://bettercodehub.com/edge/badge/alkem-io/notifications?branch=develop)](https://bettercodehub.com/) | ||
[![Deploy to DockerHub](https://github.com/alkem-io/notifications/actions/workflows/build-release-docker-hub.yml/badge.svg?branch=master)](https://github.com/alkem-io/notifications/actions/workflows/build-release-docker-hub.yml) | ||
[![Deploy to DockerHub](https://github.com/alkem-io/notifications/actions/workflows/build-release-docker-hub.yml/badge.svg)](https://github.com/alkem-io/notifications/actions/workflows/build-release-docker-hub.yml) | ||
|
||
## To test | ||
|
||
|
@@ -55,12 +55,55 @@ To test the welcome (sample) template, you can use the following payload in Rabb | |
|
||
```json | ||
{ | ||
"pattern": "communityApplicationCreated", | ||
"data": { | ||
"emailFrom": "[email protected]", | ||
"user": { | ||
"firstname": "Valentin", | ||
"email": "[email protected]" | ||
"applicantionCreatorID": "f0a47bad-eca5-4942-84ac-4dc9f085b7b8", | ||
"applicantID": "f0a47bad-eca5-4942-84ac-4dc9f085b7b8", | ||
"community": { | ||
"name": "02 Zero Hunger", | ||
"type": "challenge" | ||
}, | ||
"hub": { | ||
"id": "32818605-ef2f-4395-bb49-1dc2835c23de", | ||
"challenge": { | ||
"id": "7b86f954-d8c3-4fac-a652-b922c80e5c20", | ||
"opportunity": { | ||
"id": "636be60f-b64a-4742-8b50-69e608601935" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Note: replace applicantionCreatorID, applicantID, and hub + challenge + opportunity IDs with IDs you have in your database. You can run the following gql queries to find them: | ||
|
||
```gql | ||
query { | ||
ecoverses { | ||
id | ||
displayName | ||
challenges { | ||
id | ||
displayName | ||
nameID | ||
community { | ||
id | ||
displayName | ||
} | ||
opportunities { | ||
displayName | ||
id | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
```gql | ||
query { | ||
me { | ||
id | ||
} | ||
} | ||
``` |
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 |
---|---|---|
|
@@ -67,8 +67,37 @@ notification_providers: | |
# The hosting configuration for the Alkemio Server | ||
hosting: | ||
# The type of environment is used in multiple places to determine whether dev tooling is enabled. | ||
# The tyoe of environment can also be used for monitoring / logging / analysis in an ELK cluster / ElasticCloud instance. | ||
# The type of environment can also be used for monitoring / logging / analysis in an ELK cluster / ElasticCloud instance. | ||
# For production deployments it should be set to Prod. | ||
# | ||
# Options: Dev, Prod | ||
environment: ${ENVIRONMENT}:Dev | ||
|
||
alkemio: | ||
endpoint: ${ALKEMIO_SERVER_ENDPOINT}:http://localhost:3000/admin/graphql | ||
service_account: | ||
username: ${SERVICE_ACCOUNT_USERNAME}:[email protected] | ||
password: ${SERVICE_ACCOUNT_PASSWORD}:obichamazis | ||
|
||
kratos: | ||
public_endpoint: ${KRATOS_API_PUBLIC_ENDPOINT}:http://localhost:3000/identity/ory/kratos/public | ||
|
||
recipients: | ||
application_created: | ||
admin: | ||
- rule: | ||
type: CHALLENGE_ADMIN | ||
resource_id: <challengeID> | ||
- rule: | ||
type: OPPORTUNITY_ADMIN | ||
resource_id: <opportunityID> | ||
- rule: | ||
type: ECOVERSE_ADMIN | ||
resource_id: <ecoverseID> | ||
- rule: | ||
type: GLOBAL_ADMIN | ||
resource_id: <> | ||
applicant: | ||
- rule: | ||
type: USER_SELF_MANAGEMENT | ||
resource_id: <applicantID> |
Oops, something went wrong.