Skip to content

Commit

Permalink
Merge pull request #925 from longguikeji/v2-dev
Browse files Browse the repository at this point in the history
2.1.0
  • Loading branch information
notevery committed Jun 9, 2022
2 parents 79b87a2 + fcb87dc commit 6ca3df7
Show file tree
Hide file tree
Showing 81 changed files with 1,582 additions and 1,174 deletions.
29 changes: 23 additions & 6 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
sed -i "s@https://mirrors.aliyun.com/pypi/simple@https://pypi.python.org/simple@g" requirements.txt;
sed -i "s@https://mirrors.aliyun.com/pypi/simple@https://pypi.python.org/simple@g" requirements-dev.txt;
- name: Build and push
- name: Build and push dockerhub
uses: docker/build-push-action@v2
with:
context: .
Expand All @@ -51,17 +51,34 @@ jobs:
PIP="-i https://pypi.python.org/simple"
push: true
tags: |
${{ secrets.ARK_DEV }}/arkid:v2dev-${{ github.run_number }}-${{steps.get-short-id.outputs.id}}
${{ secrets.ARK_DEV }}/arkid:v2dev-${{ github.run_number }}
${{ secrets.ARK_DEV }}/arkid:v2dev
longguikeji/arkid:v2dev-${{ github.run_number }}-${{steps.get-short-id.outputs.id}}
longguikeji/arkid:v2dev-${{ github.run_number }}
longguikeji/arkid:v2dev
- name: deploy to cluster
- name: deploy to cluster dockerhub
uses: steebchen/kubectl@v2.0.0
with: # defaults to latest kubectl binary version
config: ${{ secrets.KUBE_CONFIG_HW }}
command: -n demo-arkidv2 --insecure-skip-tls-verify=true set image --record deployment/demo-arkidv2-be cpextensionroot=longguikeji/arkid:v2dev-${{ github.run_number }} arkid-be=longguikeji/arkid:v2dev-${{ github.run_number }}
- name: Build and push harbor
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
build-args: |
DEBIAN=http://deb.debian.org/debian
DEBIANSRT=http://security.debian.org/debian-security
PIP="-i https://pypi.python.org/simple"
push: true
tags: |
${{ secrets.ARK_DEV }}/arkid:v2dev-${{ github.run_number }}-${{steps.get-short-id.outputs.id}}
${{ secrets.ARK_DEV }}/arkid:v2dev-${{ github.run_number }}
${{ secrets.ARK_DEV }}/arkid:v2dev
longguikeji/arkid
- name: deploy to cluster harbor
uses: steebchen/kubectl@v2.0.0
with: # defaults to latest kubectl binary version
config: ${{ secrets.KUBE_CONFIG_HW }}
command: -n dev-arkidv2 --insecure-skip-tls-verify=true set image --record deployment/dev-arkidv2-be cpextensionroot=${{ secrets.ARK_DEV }}/arkid:v2dev-${{ github.run_number }} arkid-be=${{ secrets.ARK_DEV }}/arkid:v2dev-${{ github.run_number }}
command: -n demo-arkidv2 --insecure-skip-tls-verify=true set image --record deployment/demo-arkidv2-be cpextensionroot=${{ secrets.ARK_DEV }}/arkid:v2dev-${{ github.run_number }} arkid-be=${{ secrets.ARK_DEV }}/arkid:v2dev-${{ github.run_number }}
- name: Feishu 报忧
if: ${{ failure() }}
uses: wangsijie/feishu-bot@v1
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/dev25.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: arkid v2.5 cicd

on:
workflow_dispatch:
push:
branches:
- v2.5-dev
paths-ignore:
- 'docs/**'
- 'kustomize/**'
- 'README.md'
- '.github/**'
jobs:
dev2test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login harbor
uses: docker/login-action@v1
with:
registry: harbor.longguikeji.com
username: ${{ secrets.HARBORUSER }}
password: ${{ secrets.HARBORPWD }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUBUSERNAME }}
password: ${{ secrets.DOCKERHUBPWD }}
- id: get-short-id
run: |
id=$(echo ${{github.sha}})
echo "::set-output name=id::${id: 0 :8}"
- run: echo "${{steps.get-short-id.outputs.id}}"
- id: set-pip
run: |
sed -i "s@https://mirrors.aliyun.com/pypi/simple@https://pypi.python.org/simple@g" requirements.txt;
sed -i "s@https://mirrors.aliyun.com/pypi/simple@https://pypi.python.org/simple@g" requirements-dev.txt;
- name: Build and push to dockerhub
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
build-args: |
DEBIAN=http://deb.debian.org/debian
DEBIANSRT=http://security.debian.org/debian-security
PIP="https://pypi.python.org/simple"
push: true
tags: |
longguikeji/arkid:v25dev-${{ github.run_number }}-${{steps.get-short-id.outputs.id}}
longguikeji/arkid:v25dev-${{ github.run_number }}
longguikeji/arkid:v25dev
- name: deploy to cluster dockerhub
uses: steebchen/kubectl@v2.0.0
with: # defaults to latest kubectl binary version
config: ${{ secrets.KUBE_CONFIG_HW }}
command: -n dev-arkidv2 --insecure-skip-tls-verify=true set image --record deployment/dev-arkidv2-be arkid-be=longguikeji/arkid:v25dev-${{ github.run_number }}
- name: Build and push to harbor
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64
build-args: |
DEBIAN=http://deb.debian.org/debian
DEBIANSRT=http://security.debian.org/debian-security
PIP="https://pypi.python.org/simple"
push: true
tags: |
${{ secrets.ARK_DEV }}/arkid:v25dev-${{ github.run_number }}-${{steps.get-short-id.outputs.id}}
${{ secrets.ARK_DEV }}/arkid:v25dev-${{ github.run_number }}
${{ secrets.ARK_DEV }}/arkid:v25dev
- name: deploy to cluster harbor
uses: steebchen/kubectl@v2.0.0
with: # defaults to latest kubectl binary version
config: ${{ secrets.KUBE_CONFIG_HW }}
command: -n dev-arkidv2 --insecure-skip-tls-verify=true set image --record deployment/dev-arkidv2-be arkid-be=${{ secrets.ARK_DEV }}/arkid:v25dev-${{ github.run_number }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ MANIFEST
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
.devcontainer

# Installer logs
pip-log.txt
Expand Down Expand Up @@ -163,7 +164,6 @@ key

# demo
pysaml2/
djangosaml2config/saml2_config/*.xml

# sql
test/data/test_*.sql
Expand Down Expand Up @@ -193,5 +193,6 @@ package-lock.json

db.sqlite3-journal
results.sqlite
djangosaml2idp/saml2_config/*.xml

certificates/
metadatas/
2 changes: 1 addition & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# QuickStart

## docker-compose启动
## docker-compose 启动

## arkid v2.0

Expand Down
4 changes: 2 additions & 2 deletions api/v1/serializers/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ def update(self, instance, validated_data):
provider_cls: AppTypeProvider = r.app_type_providers.get(protocol_type, None)
assert provider_cls is not None
provider = provider_cls()
instance.__dict__.update(validated_data)
instance.save()
data = provider.update(app=app, data=protocol_data)
if data is not None:
app.data = data
app.save()
instance.__dict__.update(validated_data)
instance.save()
transaction.on_commit(
lambda: WebhookManager.app_updated(self.context['tenant'].uuid, instance)
)
Expand Down
5 changes: 3 additions & 2 deletions arkid/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
# 'extension_root.app_market_manage',
'django_scim',
# 'extension_root.miniprogram',
'djangosaml2idp',
'login_register_config',
'config',
'log',
Expand Down Expand Up @@ -126,7 +125,9 @@
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'DIRS': [
os.path.join(BASE_DIR,'templates')
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
Expand Down
2 changes: 0 additions & 2 deletions djangosaml2idp/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion djangosaml2idp/certificates/.gitignore

This file was deleted.

57 changes: 0 additions & 57 deletions djangosaml2idp/idpsettings.py

This file was deleted.

1 change: 0 additions & 1 deletion djangosaml2idp/saml2_config/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion djangosaml2idp/saml2_config/sp_cert/.gitignore

This file was deleted.

25 changes: 0 additions & 25 deletions djangosaml2idp/scripts/idpclear.py

This file was deleted.

56 changes: 0 additions & 56 deletions djangosaml2idp/scripts/idpinit.py

This file was deleted.

19 changes: 0 additions & 19 deletions djangosaml2idp/tests/test_error_views.py

This file was deleted.

Loading

0 comments on commit 6ca3df7

Please sign in to comment.