-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial implementation using Perun dumps and capabilities #2
Open
mesemus
wants to merge
3
commits into
main
Choose a base branch
from
initial
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Copyright (C) 2024 CESNET z.s.p.o. | ||
|
||
oarepo-oidc-einfra is free software; you can redistribute it and/or | ||
modify it under the terms of the MIT License; see LICENSE file for more | ||
details. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2023 CESNET. | ||
# | ||
# CESNET-OpenID-Remote is free software; you can redistribute it and/or | ||
# modify it under the terms of the MIT License; see LICENSE file for more | ||
# details. | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
# Python files | ||
[*.py] | ||
indent_size = 4 | ||
# isort plugin configuration | ||
known_first_party = cesnet_openid_remote | ||
multi_line_output = 2 | ||
default_section = THIRDPARTY | ||
skip = .eggs | ||
|
||
# RST files (used by sphinx) | ||
[*.rst] | ||
indent_size = 4 | ||
|
||
# CSS, HTML, JS, JSON, YML | ||
[*.{css,html,js,json,yml}] | ||
indent_size = 2 | ||
|
||
# Matches the exact files either package.json or .github/workflows/*.yml | ||
[{package.json,.github/workflows/*.yml}] | ||
indent_size = 2 | ||
|
||
# Dockerfile | ||
[Dockerfile] | ||
indent_size = 4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Build and test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
oarepo: | ||
description: OARepo version (11, 12, ...) | ||
required: true | ||
default: "12" | ||
type: string | ||
|
||
env: | ||
OAREPO_VERSION: ${{ inputs.oarepo }} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- name: Show oarepo version | ||
run: | | ||
echo "OAREPO_VERSION: >>>$OAREPO_VERSION<<< >>>${{ inputs.oarepo }}<<<" | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.12" | ||
- name: Cache pip | ||
uses: actions/cache@v3 | ||
with: | ||
# This path is specific to Ubuntu | ||
path: ~/.cache/pip | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
|
||
- name: Configure sysctl limits | ||
run: | | ||
sudo swapoff -a | ||
sudo sysctl -w vm.swappiness=1 | ||
sudo sysctl -w fs.file-max=262144 | ||
sudo sysctl -w vm.max_map_count=262144 | ||
|
||
- name: Runs Opensearch | ||
uses: ankane/setup-opensearch@v1 | ||
with: | ||
plugins: analysis-icu | ||
|
||
- name: Start Redis | ||
uses: supercharge/redis-github-action@1.7.0 | ||
with: | ||
redis-version: ${{ matrix.redis-version }} | ||
|
||
- name: Run tests | ||
run: | | ||
./run-tests.sh | ||
|
||
|
||
- name: Build package to publish | ||
run: | | ||
.venv/bin/python setup.py sdist bdist_wheel | ||
|
||
- name: Freeze packages | ||
run: | | ||
.venv/bin/pip freeze > requirements.txt | ||
|
||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: Archive production artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: requirements.txt | ||
path: requirements.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Dispatch | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
oarepo: | ||
description: OARepo version (11, 12, ...) | ||
required: true | ||
default: 12 | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yaml | ||
with: | ||
oarepo: ${{ github.event.inputs.oarepo }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build, test and publish | ||
|
||
on: push | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
|
||
build12: | ||
uses: ./.github/workflows/build.yaml | ||
with: | ||
oarepo: "12" | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: build12 | ||
steps: | ||
- name: Use built artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: List files | ||
run: | | ||
ls -la | ||
ls -la dist | ||
|
||
- name: Publish package | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
skip_existing: true | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# Idea software family | ||
.idea/ | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Vim swapfiles | ||
.*.sw? | ||
.venv/ | ||
.env | ||
|
||
.DS_Store | ||
|
||
.perun_passwd |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.. | ||
Copyright (C) 2023 CESNET. | ||
CESNET-OpenID-Remote is free software; you can redistribute it and/or | ||
modify it under the terms of the MIT License; see LICENSE file for more | ||
details. | ||
|
||
Authors | ||
======= | ||
|
||
CESNET OIDC Auth backend for OARepo | ||
|
||
- Miroslav Bauer <bauer@cesnet.cz> | ||
- Juraj Trappl <trappl@cesnet.cz> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. | ||
Copyright (C) 2023 CESNET. | ||
|
||
CESNET-OpenID-Remote is free software; you can redistribute it and/or | ||
modify it under the terms of the MIT License; see LICENSE file for more | ||
details. | ||
|
||
Changes | ||
======= | ||
|
||
Version 0.1.0 (released TBD) | ||
|
||
- Initial public release. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to add yourself to authors :)