Deploy modules to test project #15
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
name: Deploy modules to test 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_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: ${{ secrets.IDP_TENANT_ID }} | |
data_developer_source_id: ${{ vars.DATA_DEVELOPER_OBJECT_ID }} | |
data_pipeline_oee_source_id: ${{ vars.DATA_PIPELINE_OEE_OBJECT_ID }} | |
icapi_extractors_source_id: ${{ vars.ICAPI_EXTRACTORS_OBJECT_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==0.3.2 | |
- 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 |