Skip to content

Commit

Permalink
Merge branch 'main' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
clezag committed Jan 7, 2025
2 parents f829023 + 18e04de commit 16a64c9
Show file tree
Hide file tree
Showing 71 changed files with 2,138 additions and 248 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/dc-lorawan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI/CD dc-lorawan

on:
push:
paths:
- "collectors/lorawan/**"
- "!collectors/lorawan/infrastructure/helm/*"
- "collectors/lorawan/infrastructure/helm/values.yaml"
- ".github/workflows/dc-lorawan.yml"

env:
WORKING_DIRECTORY: collectors/lorawan
DOCKER_IMAGE: ghcr.io/noi-techpark/opendatahub-collectors/dc-lorawan
DOCKER_TAG: ${{ github.sha }}
KUBERNETES_NAMESPACE: collector
VALUES_YAML: infrastructure/helm/values.yaml
K8S_NAME: dc-lorawan

jobs:
build:
runs-on: ubuntu-22.04
concurrency: dc-lorawan-build
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Build and push images
uses: noi-techpark/github-actions/docker-build-and-push@v2
with:
working-directory: ${{ env.WORKING_DIRECTORY }}/infrastructure
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.GITHUB_TOKEN }}

deploy-lorawan-test:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-22.04
concurrency: dc-lorawan-test
environment: test
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Customize values.yaml
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
yq -i '.image.repository = "${{ env.DOCKER_IMAGE }}"' ${{ env.VALUES_YAML }}
yq -i '.image.tag = "${{ env.DOCKER_TAG }}"' ${{ env.VALUES_YAML }}
yq -i '.image.pullPolicy = "IfNotPresent"' ${{ env.VALUES_YAML }}
yq -i '.envSecret.LORAWAN_PASSWORD = "${{ secrets.LORAWAN_PASSWORD }}"' ${{ env.VALUES_YAML }}

- name: Deploy on cluster
uses: noi-techpark/github-actions/helm-deploy@v2
with:
k8s-name: dc-lorawan
k8s-namespace: collector
chart-path: helm/generic-collector
values-file: ${{ env.WORKING_DIRECTORY}}/${{ env.VALUES_YAML }}
aws-access-key-id: ${{ secrets[vars.AWS_KEY_ID] }}
aws-secret-access-key: ${{ secrets[vars.AWS_KEY_SECRET] }}
aws-eks-cluster-name: aws-main-eu-01
aws-region: eu-west-1
10 changes: 6 additions & 4 deletions .github/workflows/dc-parking-valgardena-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "collectors/valgardena-parking-data/**"
- "!collectors/valgardena-parking-data/infrastructure/helm/*"
- "collectors/valgardena-parking-data/infrastructure/helm/values.yaml"
- ".github/workflows/dc-valgardena-parking-data.yml"
- ".github/workflows/dc-parking-valgardena-data.yml"

env:
WORKING_DIRECTORY: collectors/valgardena-parking-data
Expand Down Expand Up @@ -44,9 +44,11 @@ jobs:
- name: Customize values.yaml
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
yq -i '.image.repository="${{ env.DOCKER_IMAGE }}"' ${{ env.VALUES_YAML}}
yq -i '.image.tag="${{ env.DOCKER_TAG }}"' ${{ env.VALUES_YAML }}
yq -i '.image.pullPolicy="IfNotPresent"' ${{ env.VALUES_YAML }}
yq -i '.image.repository = "${{ env.DOCKER_IMAGE }}"' ${{ env.VALUES_YAML }}
yq -i '.image.tag = "${{ env.DOCKER_TAG }}"' ${{ env.VALUES_YAML }}
yq -i '.image.pullPolicy = "IfNotPresent"' ${{ env.VALUES_YAML }}
yq -i '.envSecret.HTTP_HEADER_AUTHORIZATION = "Authorization: Basic ${{ secrets.HTTP_HEADER_AUTHORIZATION_VALGARDENA }}"' ${{ env.VALUES_YAML }}

- name: Deploy on cluster
uses: noi-techpark/github-actions/helm-deploy@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ jobs:
- name: Customize values.yaml
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
yq -i '.image.repository="${{ env.DOCKER_IMAGE }}"' ${{ env.VALUES_YAML}}
yq -i '.image.tag="${{ env.DOCKER_TAG }}"' ${{ env.VALUES_YAML }}
yq -i '.image.pullPolicy="IfNotPresent"' ${{ env.VALUES_YAML }}
yq -i '.image.repository = "${{ env.DOCKER_IMAGE }}"' ${{ env.VALUES_YAML }}
yq -i '.image.tag = "${{ env.DOCKER_TAG }}"' ${{ env.VALUES_YAML }}
yq -i '.image.pullPolicy = "IfNotPresent"' ${{ env.VALUES_YAML }}
yq -i '.envSecret.HTTP_HEADER_AUTHORIZATION = "Authorization: Basic ${{ secrets.HTTP_HEADER_AUTHORIZATION_VALGARDENA }}"' ${{ env.VALUES_YAML }}

- name: Deploy on cluster
uses: noi-techpark/github-actions/helm-deploy@v2
Expand Down
90 changes: 0 additions & 90 deletions .github/workflows/dc-rest-poller-roomsensor-noi.yml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/dc-rest-poller-traffic-event-prov-bz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI/CD dc-rest-poller traffic-event-prov-bz

on:
push:
paths:
- "collectors/rest-poller/**"
- "!collectors/rest-poller/infrastructure/helm/*"
- "collectors/rest-poller/infrastructure/helm/traffic-event-prov-bz.yaml"
- ".github/workflows/dc-rest-poller-traffic-event-prov-bz.yml"

env:
WORKING_DIRECTORY: collectors/rest-poller
DOCKER_IMAGE: ghcr.io/noi-techpark/opendatahub-collectors/dc-rest-poller
DOCKER_TAG: ${{ github.sha }}
KUBERNETES_NAMESPACE: collector
VALUES_YAML: infrastructure/helm/traffic-event-prov-bz.yaml
K8S_NAME: dc-rest-poller-traffic-event-prov-bz

jobs:
build:
runs-on: ubuntu-24.04
concurrency: dc-rest-poller-traffic-event-prov-bz-build
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Build and push images
uses: noi-techpark/github-actions/docker-build-and-push@v2
with:
working-directory: ${{ env.WORKING_DIRECTORY }}/infrastructure
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.GITHUB_TOKEN }}

deploy-traffic-event-prov-bz-test:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-24.04
concurrency: dc-rest-poller-traffic-event-prov-bz-test
environment: test
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Customize values.yaml
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
yq -i '.image.repository="${{ env.DOCKER_IMAGE }}"' ${{ env.VALUES_YAML}}
yq -i '.image.tag="${{ env.DOCKER_TAG }}"' ${{ env.VALUES_YAML }}
yq -i '.image.pullPolicy="IfNotPresent"' ${{ env.VALUES_YAML }}
- name: Deploy on cluster
uses: noi-techpark/github-actions/helm-deploy@v2
with:
k8s-name: dc-rest-poller-traffic-event-prov-bz
k8s-namespace: collector
chart-path: helm/generic-collector
values-file: ${{ env.WORKING_DIRECTORY}}/${{ env.VALUES_YAML }}
aws-access-key-id: ${{ secrets[vars.AWS_KEY_ID] }}
aws-secret-access-key: ${{ secrets[vars.AWS_KEY_SECRET] }}
aws-eks-cluster-name: aws-main-eu-01
aws-region: eu-west-1
70 changes: 70 additions & 0 deletions .github/workflows/tr-lorawan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI/CD tr-lorawan

on:
push:
paths:
- "transformers/lorawan/infrastructure/**"
- "transformers/lorawan/src/**"
- ".github/workflows/tr-lorawan.yml"


env:
PROJECT_NAME: tr-lorawan
WORKING_DIRECTORY: transformers/lorawan
DOCKER_IMAGE: ghcr.io/noi-techpark/opendatahub-collectors/tr-lorawan
DOCKER_TAG: ${{ github.sha }}
KUBERNETES_NAMESPACE: collector

jobs:
build:
runs-on: ubuntu-22.04
concurrency: tr-lorawan-build
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Build and push images
uses: noi-techpark/github-actions/docker-build-and-push@v2
with:
working-directory: ${{ env.WORKING_DIRECTORY }}/infrastructure
docker-username: ${{ github.actor }}
docker-password: ${{ secrets.GITHUB_TOKEN }}

deploy-test:
if: github.ref == 'refs/heads/main'
needs:
- build
runs-on: ubuntu-22.04
concurrency: tr-lorawan-deploy-test
environment: test
env:
VALUES_YAML: infrastructure/helm/values.yaml
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Customize values.yaml
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
yq -i '
.image.repository="${{ env.DOCKER_IMAGE }}" |
.image.tag="${{ env.DOCKER_TAG }}" |
.image.pullPolicy="IfNotPresent" |
.env.BDP_PROVENANCE_NAME="${{ env.PROJECT_NAME }}" |
.env.BDP_PROVENANCE_VERSION="${{ github.sha}}"
' ${{ env.VALUES_YAML }}
- name: Deploy on cluster
uses: noi-techpark/github-actions/helm-deploy@v2
with:
k8s-name: ${{ env.PROJECT_NAME }}
k8s-namespace: collector
chart-path: helm/generic-collector
values-file: ${{ env.WORKING_DIRECTORY }}/${{ env.VALUES_YAML }}
aws-access-key-id: ${{ secrets.AWS_DEV_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_DEV_ACCESS_KEY_SECRET }}
aws-eks-cluster-name: aws-main-eu-01
aws-region: eu-west-1

Loading

0 comments on commit 16a64c9

Please sign in to comment.