Skip to content

Commit

Permalink
Merge pull request #271 from alkem-io/develop
Browse files Browse the repository at this point in the history
Release: Fixes
  • Loading branch information
valentinyanakiev authored Nov 8, 2023
2 parents 3fdeddd + 78376d1 commit 336ded7
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 135 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/build-deploy-k8s-dev-aws.yml

This file was deleted.

19 changes: 9 additions & 10 deletions .github/workflows/build-deploy-k8s-dev-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: 'Checkout GitHub Action'
uses: actions/checkout@master
- name: "Checkout GitHub Action"
uses: actions/checkout@v3.0.2

- name: 'Login via Azure CLI'
uses: azure/login@v1
- name: "Login via Azure CLI"
uses: azure/login@v1.4.7
with:
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}

- name: 'Build and push image'
uses: azure/docker-login@v1
- name: "Build and push image"
uses: azure/docker-login@v1.0.1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
Expand All @@ -27,20 +27,19 @@ jobs:
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-notifications:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-notifications:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-notifications:${{ github.sha }}
- uses: Azure/aks-set-context@v1
- uses: Azure/aks-set-context@v3.2
with:
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}
cluster-name: ${{ secrets.CLUSTER_NAME }}
resource-group: ${{ secrets.RESOURCE_GROUP_K8S }}

- uses: Azure/k8s-create-secret@v1
- uses: Azure/k8s-create-secret@v4.0
with:
container-registry-url: ${{ secrets.REGISTRY_LOGIN_SERVER }}
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
secret-name: alkemio-notifications-secret

- uses: Azure/k8s-deploy@v1
- uses: Azure/k8s-deploy@v4.10
with:
manifests: |
service/manifests/25-notifications-deployment-dev.yaml
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/build-deploy-k8s-sandbox-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,35 @@ jobs:
steps:
# checkout the repo
- name: "Checkout github Action"
uses: actions/checkout@master
uses: actions/checkout@v3.0.2

- name: "Login via Azure CLI"
uses: azure/login@v1
uses: azure/login@v1.4.7
with:
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}

- name: "Build and push image"
uses: azure/docker-login@v1
uses: azure/docker-login@v1.0.1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-notifications:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-notifications:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-notifications:${{ github.sha }}
- uses: Azure/aks-set-context@v1
- uses: Azure/aks-set-context@v3.2
with:
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}
cluster-name: k8s-sandbox
resource-group: res-grp-k8s-sandbox

- uses: Azure/k8s-create-secret@v1
- uses: Azure/k8s-create-secret@v4.0
with:
container-registry-url: ${{ secrets.REGISTRY_LOGIN_SERVER }}
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
secret-name: alkemio-notifications-secret

- uses: Azure/k8s-deploy@v1
- uses: Azure/k8s-deploy@v4.10
with:
manifests: |
service/manifests/25-notifications-deployment-dev.yaml
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/build-deploy-k8s-test-aws.yml

This file was deleted.

19 changes: 9 additions & 10 deletions .github/workflows/build-deploy-k8s-test-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,36 @@ jobs:
runs-on: ubuntu-latest
steps:
# checkout the repo
- name: 'Checkout GitHub Action'
uses: actions/checkout@master
- name: "Checkout GitHub Action"
uses: actions/checkout@v3.0.2

- name: 'Login via Azure CLI'
uses: azure/login@v1
- name: "Login via Azure CLI"
uses: azure/login@v1.4.7
with:
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}

- name: 'Build and push image'
uses: azure/docker-login@v1
- name: "Build and push image"
uses: azure/docker-login@v1.0.1
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: |
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-notifications:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-notifications:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-notifications:${{ github.sha }}
- uses: Azure/aks-set-context@v1
- uses: Azure/aks-set-context@v3.2
with:
creds: ${{ secrets.AZURE_CRED_K8S_NEW }}
cluster-name: k8s-test
resource-group: res-grp-k8s-test

- uses: Azure/k8s-create-secret@v1
- uses: Azure/k8s-create-secret@v4.0
with:
container-registry-url: ${{ secrets.REGISTRY_LOGIN_SERVER }}
container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
secret-name: alkemio-notifications-secret

- uses: Azure/k8s-deploy@v1
- uses: Azure/k8s-deploy@v4.10
with:
manifests: |
service/manifests/25-notifications-deployment-dev.yaml
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-release-docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3.0.2
- name: Prepare
id: prep
run: |
Expand All @@ -35,13 +35,13 @@ jobs:
elif [ "${{ github.event_name }}" = "push" ]; then
TAGS="$TAGS,${DOCKER_IMAGE}:sha-${GITHUB_SHA::8}"
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=tags::${TAGS}
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "created={$(date -u +'%Y-%m-%dT%H:%M:%SZ')}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3.0.0
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
Expand All @@ -50,7 +50,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5.0.0
with:
context: .
file: ./Dockerfile
Expand All @@ -65,4 +65,4 @@ jobs:
org.opencontainers.image.version=${{ steps.prep.outputs.version }}
org.opencontainers.image.created=${{ steps.prep.outputs.created }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
org.opencontainers.image.licenses=${{ github.event.repository.license.spdx_id }}
18 changes: 9 additions & 9 deletions service/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alkemio-notifications",
"version": "0.14.3",
"version": "0.15.0",
"description": "Alkemio notifications service",
"author": "Alkemio Foundation",
"private": false,
Expand Down Expand Up @@ -35,7 +35,7 @@
"validate-connection": "ts-node src/utils/validate-connection.ts"
},
"dependencies": {
"@alkemio/client-lib": "^0.23.0",
"@alkemio/client-lib": "^0.25.0",
"@alkemio/notifications-lib": "^0.6.0",
"@nestjs/common": "^8.0.5",
"@nestjs/config": "^1.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Inject, Injectable, LoggerService } from '@nestjs/common';
import { AlkemioClient } from '@alkemio/client-lib';
import { AlkemioClient, PlatformFeatureFlagName } from '@alkemio/client-lib';
import { ALKEMIO_CLIENT_PROVIDER, LogContext } from '@common/enums';
import { IFeatureFlagProvider } from '@core/contracts';
import { CredentialCriterion, User } from '@core/models';
Expand All @@ -17,7 +17,10 @@ export class AlkemioClientAdapter implements IFeatureFlagProvider {
async areNotificationsEnabled(): Promise<boolean> {
const featureFlags = await this.alkemioClient.featureFlags();
if (
featureFlags?.find(x => x.name === 'notifications' && x.enabled === true)
featureFlags?.find(
x =>
x.name === PlatformFeatureFlagName.Notifications && x.enabled === true
)
) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = () => ({
{% block content %}Hi {{applicant.name}},<br><br>
We have received your application for the {{journey.type}} <a style="color:#065F6B; text-decoration: none;" href="{{journey.url}}">{{journey.displayName}}</a>.
Please view the status of your application on your <a href="{{applicant.profile}}">profile</a>.
Once your application is accepted, you will find this {{journey.type}} on your <a href="{{applicant.profile}}">profile</a> and homepage. As long as your application is pending, you can find it under "Pending Memberships" in your platform menu.
<br><br>
{% endblock %}
${templates.footerBlock}`,
Expand Down

0 comments on commit 336ded7

Please sign in to comment.