Skip to content

Commit

Permalink
add basic github pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mwinkens committed May 28, 2024
1 parent b4b5dfa commit 43e98fe
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
max-line-length = 120
exclude = dist
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on: [push, pull_request]

jobs:
build-and-lint:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.10", "3.11"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r requirements.txt
- name: Build project
run: make

- name: Lint with flake8
run: flake8 .

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: '*.tar.gz'
if-no-file-found: 'error'
5 changes: 4 additions & 1 deletion check_b2access.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ def getInfoCert(param):
cert_txt = subprocess.check_output(["openssl", "x509", "-subject", "-noout", "-in", param.certificate])
sub = str(cert_txt).replace("subject= ", "")
dn = getLdapName(sub)
""" url = param.url+"/rest-admin/v1/resolve/x500Name/CN=Ahmed Shiraz Memon,OU=IAS-JSC,OU=Forschungszentrum Juelich GmbH,O=GridGermany,C=DE" """
"""
url = param.url+"/rest-admin/v1/resolve/x500Name/CN=Ahmed Shiraz Memon,OU=IAS-JSC,\
OU=Forschungszentrum Juelich GmbH,O=GridGermany,C=DE"
"""
url = f"{param.url}/rest-admin/v1/resolve/x500Name/{dn}"

print(f"url: {url}")
Expand Down

0 comments on commit 43e98fe

Please sign in to comment.