-
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.
new data collector traffic events prov bz
- Loading branch information
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
.github/workflows/dc-rest-poller-traffic-event-prov-bz.yml
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,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 |
16 changes: 16 additions & 0 deletions
16
collectors/rest-poller/infrastructure/helm/traffic-event-prov-bz.yaml
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,16 @@ | ||
image: | ||
repository: ghcr.io/noi-techpark/opendatahub-collectors/rest-poller | ||
pullPolicy: IfNotPresent | ||
tag: "0.2.0" # Set this when upgrading chart with --set-value | ||
|
||
env: | ||
MQ_CLIENT: dc-traffic-event-prov-bz | ||
PROVIDER: traffic-event/prov-bz | ||
|
||
CRON: "0 */10 * * * *" | ||
HTTP_URL: "https://www.provinz.bz.it/vmz/traffic.json" | ||
|
||
envSecretRef: | ||
- name: MQ_URI | ||
secret: rabbitmq-svcbind | ||
key: uri |