-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.25 KB
/
resync-apply.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
47
48
49
50
name: Resync Apply "v1"
on:
workflow_dispatch:
#push:
# 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"
CLIENT_CONFIG_FILE: "power_ops_config.yaml"
CONFIGURATION_FILE: "tests/data/demo/v1/resync_configuration.yaml"
jobs:
resync-apply:
name: Resync Apply "v1" to CDF project ${{ vars.PROJECT }}
environment:
name: CD
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 apply
env:
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
CLIENT_ID: ${{ vars.CLIENT_ID }}
PROJECT: ${{ vars.PROJECT }}
CLUSTER: ${{ vars.CLUSTER }}
TENANT_ID: ${{ vars.TENANT_ID }}
run: |
echo Running resync apply in CDF environment $PROJECT
powerops apply_v1 $CLIENT_CONFIG_FILE $CONFIGURATION_FILE