Skip to content

deprecate: resync v0 #34

deprecate: resync v0

deprecate: resync v0 #34

Workflow file for this run

name: Resync Plan "v1"
on:
pull_request:
branches:
- main
paths:
- "cognite/powerops/resync/v1/**.py"
- "cognite/powerops/cli.py"
- "tests/data/demo/v1/**.yaml"
- "tests/data/demo/v1/**.yml"
env:
PYTHON_VERSION: "3.11"
CONFIGURATION_FILE: "tests/data/demo/v1/resync_configuration.yaml"
jobs:
resync-plan:
name: Resync Plan "v1" to CDF project ${{ vars.PROJECT }}
environment:
name: CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip poetry==1.*
poetry config virtualenvs.create false
poetry install
- name: Run resync plan
env:
SETTINGS__COGNITE__CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
SETTINGS__COGNITE__CLIENT_ID: ${{ vars.CLIENT_ID }}
SETTINGS__COGNITE__PROJECT: ${{ vars.PROJECT }}
SETTINGS__COGNITE__CDF_CLUSTER: ${{ vars.CLUSTER }}
SETTINGS__COGNITE__TENANT_ID: ${{ vars.TENANT_ID }}
SETTINGS__COGNITE__LOGIN_FLOW: "client_credentials"
run: |
echo Running resync plan in CDF environment $SETTINGS__COGNITE__PROJECT
powerops plan_v1 $CONFIGURATION_FILE