Skip to content

Commit

Permalink
feat(acls): adding hostedExtractorAcl (#107)
Browse files Browse the repository at this point in the history
* feat(acls): adding hostedExtractorAcl
- minor README fixes how to run buildpack/docker
- blocked from deployment due to "organization secrets" migration needed (for ACR push)

* fix(gh-workflow): using CD environment
- to access org-secrets for DOCKERHUB
- ref: [cognitedata/terraform PR#9528](cognitedata/terraform#9528)

* fix(renovate): update list of deps from #65
- pyproject
- gh-actions
  • Loading branch information
spex66 authored May 14, 2024
1 parent fd10cae commit 711c5f1
Show file tree
Hide file tree
Showing 8 changed files with 495 additions and 577 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ on:
# manually triggered only
inputs:
version:
description: 'image version (tag)'
description: "image version (tag)"

jobs:
printInputs:
runs-on: ubuntu-latest
steps:
- run: |
echo "Version: ${{ inputs.version }}"
- run: |
echo "Version: ${{ inputs.version }}"
build:
environment: main
environment: CD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# https://github.com/docker/login-action#docker-hub
- name: Docker login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ on:
pull_request:

env:
PYTHON_VERSION: '3.11'
POETRY_VERSION: '1.5.1'
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.5.1"

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Set up cache
uses: actions/cache@v3.2.5
uses: actions/cache@v3.3.2
with:
path: .venv
key: venv-${{ hashFiles('poetry.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1074,11 +1074,11 @@ With v3-release we switched from `docker build` to use Buildpacks
- Adopt the following `docker run` example
- to mount your config-file to `/etc/config.yaml`
- to use your `.env` file
- to choose the commansd and parameters you want to test locally
- set the commands and parameters you want to test locally

```bash
# emulating github-actions run, with envvar and /github/workspace mounted
➟ docker run --workdir /github/workspace -v "$(pwd)":"/github/workspace" -e GITHUB_ACTIONS=true --env-file=.env bootstrap-cli:latest deploy ./configs/config-deploy-example-v3.yml
➟ docker run --workdir /github/workspace -v ${PWD}:"/github/workspace" -v ${PWD}/configs:/configs -e GITHUB_ACTIONS=true --env-file=.env bootstrap-cli:latest --dry-run deploy ./configs/config-deploy-example-v3.yml
```

### Run locally with Docker (v2)
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ inputs:

runs:
using: "docker"
image: docker://cognite/bootstrap-cli:v3.3.0
image: docker://cognite/bootstrap-cli:v3.4.0
env:
BOOTSTRAP_TOKEN_URL: ${{ inputs.token-url }}
BOOTSTRAP_PROJECT: ${{ inputs.cdf-project-name }}
Expand Down
1,019 changes: 468 additions & 551 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "inso-bootstrap-cli"
# 230802 pa: switched to keep manually in sync with
# 1. src/bootstrap/__init__.py => __version__ = "3.0.6"
# 2. action.yml => image: docker://cognite/bootstrap-cli:v3.0.6
version = "3.3.0"
version = "3.4.0"
description = "A CLI to deploy a CDF Project to bootstrap CDF Groups scoped with Data Sets and RAW DBs"
authors = ["Peter Arwanitis <[email protected]>", "Tugce Ozgur Oztetik <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -20,13 +20,13 @@ python-dotenv = "^0.21.1"
pydantic-settings = "^2"
dependency-injector = {version = "^4.41.0", extras = ["yaml"]}
click = "^8.1.6"
cognite-sdk = {version = "^6.14", extras = ["pandas"]}
rich = "^13.5"
cognite-sdk = {version = "^6.39", extras = ["pandas"]}
rich = "^13"

[tool.poetry.dev-dependencies]
autopep8 = "^2.0.1"
mypy = "^1.5"
pre-commit = "^3.3"
mypy = "^1"
pre-commit = "^3"
pytest = "^7.4"

[tool.black]
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# 230301 pa: automated by adding it to pyproject.toml > [tool.semantic_release] > version_variable

# 230802 pa: switched to manual updates, after issues with semver gh-actions
__version__ = "3.3.0"
__version__ = "3.4.0"
13 changes: 7 additions & 6 deletions src/bootstrap/app_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class RoleType(str, ReprEnum):
"geospatial",
"geospatialCrs",
"groups",
"hostedExtractors",
"labels",
"projects",
"raw",
Expand Down Expand Up @@ -80,22 +81,22 @@ def getAllAclTypes(with_undocumented_capabilities: bool = False):
[
"annotations",
"digitalTwin",
"documentFeedback", # undocumented acls
"documentPipelines", # undocumented acls
"entitymatching",
"functions",
"geospatial",
"geospatialCrs",
"hostedExtractors",
"monitoringTasks", # undocumented acls
"notifications", # undocumented acls
"projects",
"seismic",
"sessions",
"timeSeriesSubscriptions",
"types",
"wells",
# undocumented alcls
"documentFeedback",
"documentPipelines",
"monitoringTasks",
"notifications",
"workflowOrchestration",
"workflowOrchestration", # undocumented acls
]
)

Expand Down

0 comments on commit 711c5f1

Please sign in to comment.