-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.74 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Deploy modules to prod project
on:
push:
branches:
- main # run when this branch changes (following a Pull Request)
paths:
- modules/** # run when changes in modules
- config.test.yaml # run when changes in config.test.yaml
# Allow manual triggering of the workflow
workflow_dispatch:
env:
PYTHON_VERSION: '3.11'
jobs:
build-modules:
runs-on: ubuntu-latest
environment: test
env:
CDF_PROJECT: ${{ vars.CDF_PROJECT }}
IDP_CLIENT_ID: ${{ vars.IDP_CLIENT_ID }}
IDP_TOKEN_URL: ${{ vars.IDP_TOKEN_URL }}
DATA_DEVELOPER_OBJECT_ID: ${{ vars.DATA_DEVELOPER_OBJECT_ID }}
DATA_PIPELINE_OEE_OBJECT_ID: ${{ vars.DATA_PIPELINE_OEE_OBJECT_ID }}
ICAPI_EXTRACTORS_OBJECT_ID: ${{ vars.ICAPI_EXTRACTORS_OBJECT_ID }}
DATA_PIPELINE_OEE_CLIENT_ID: ${{ vars.DATA_PIPELINE_OEE_CLIENT_ID }}
ICAPI_EXTRACTORS_CLIENT_ID: ${{ vars.ICAPI_EXTRACTORS_CLIENT_ID }}
CDF_CLUSTER: ${{ vars.CDF_CLUSTER }}
IDP_TENANT_ID: ${ vars.IDP_TENANT_ID }
IDP_CLIENT_SECRET: ${{ secrets.IDP_CLIENT_SECRET }}
DATA_PIPELINE_OEE_CLIENT_SECRET: ${{ secrets.DATA_PIPELINE_OEE_CLIENT_SECRET }}
ICAPI_EXTRACTORS_CLIENT_SECRET: ${{ secrets.ICAPI_EXTRACTORS_CLIENT_SECRET }}
name: Deploy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install cdf-tk
run: pip install cognite-toolkit
- name: "Build the templates"
run: cdf-tk build --build-dir=./build --env=test
- name: "Deploy"
run: echo "Deploying to ${CDF_PROJECT} with ${CDF_CLUSTER}"
- name: "Deploy the templates"
run: |
cdf-tk deploy --env=test