Skip to content

remove previous rest-poller-lorawan dc,add tr lorawan #5

remove previous rest-poller-lorawan dc,add tr lorawan

remove previous rest-poller-lorawan dc,add tr lorawan #5

Workflow file for this run

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