Skip to content

Commit

Permalink
Merge pull request #267 from TencentBlueKing/development
Browse files Browse the repository at this point in the history
update master to 2.3.2
  • Loading branch information
IMBlues authored Feb 10, 2022
2 parents 85b0fbf + 3158062 commit d39373a
Show file tree
Hide file tree
Showing 723 changed files with 77,628 additions and 3,798 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ jobs:
DB_DATABASE: bk_user_api_test
DB_USER: root
DB_PASSWORD: root
DB_PORT: 3306

steps:
- uses: actions/checkout@v2
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
- uses: samin/[email protected]
with:
mysql version: '5.7'
mysql database: ${{ env.DB_DATABASE }}
mysql root password: ${{ env.DB_PASSWORD }}
mysql user: ${{ env.DB_USER }}
mysql password: ${{ env.DB_PASSWORD }}
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand All @@ -38,7 +42,7 @@ jobs:
- name: Install dependencies
run: |
cd src/api/
poetry config virtualenvs.create false && poetry install
poetry config virtualenvs.create false && bash bin/install_ci_dependencies.sh
- name: Run api unittest
env:
DJANGO_SETTINGS_MODULE: "bkuser_core.config.overlays.unittest"
Expand All @@ -52,7 +56,7 @@ jobs:
DB_USER: ${{ env.DB_USER }}
DB_PASSWORD: ${{ env.DB_PASSWORD }}
DB_HOST: "127.0.0.1"
DB_PORT: "3306"
DB_PORT: ${{ env.DB_PORT }}
run: |
make link
cd src/api
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ src/pages/index-dev.html
# ignore global code
src/api/bkuser_global
src/saas/bkuser_global
src/login/bkuser_global
# sdk
src/saas/bkuser_sdk

Expand All @@ -220,12 +221,15 @@ src/pages/dist/
/poetry.lock

# helm
deploy/helm/*/charts/
deploy/helm/bk-user/charts/api/charts/
deploy/helm/bk-user/charts/saas/charts/
deploy/helm/bk-user/charts/login/charts/
deploy/helm/local_values.yaml
deploy/helm/dist/

deploy/helm/api/templates/c_*.*
deploy/helm/saas/templates/c_*.*
deploy/helm/login/templates/c_*.*
deploy/helm/bk-user-stack/templates/c_*.*

# local hooks
Expand Down
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
version ?= "development"
login_version ?= "development"
values ?=
image_repo ?= "ccr.ccs.tencentyun.com/bk.io"
chart_repo ?=
namespace ?= "bk-user"
test_release_name ?= "bk-user-test"

generate-release-md:
cd src/saas/ && poetry run python manage.py generate_release_md > release.md
rm docs/changelogs/*.md || true
cd src/saas/ && mkdir -p changelogs/ && poetry run python manage.py generate_release_md
mv src/saas/changelogs docs/
mv src/saas/release.md docs/

link:
rm src/api/bkuser_global || true
rm src/saas/bkuser_global || true
rm src/login/bkuser_global || true
rm src/saas/bkuser_sdk || true

ln -s ${PWD}/src/bkuser_global src/api || true
ln -s ${PWD}/src/bkuser_global src/saas || true
ln -s ${PWD}/src/bkuser_global src/login || true
ln -s ${PWD}/src/sdk/bkuser_sdk src/saas || true

generate-sdk:
Expand All @@ -23,17 +32,23 @@ build-api:
build-saas:
docker build -f src/saas/Dockerfile . -t ${image_repo}/bk-user-saas:${version}

build-all: build-api build-saas
build-login:
docker build -f src/login/Dockerfile . -t ${image_repo}/bk-login:${login_version}

build-all: build-api build-saas build-login

push:
docker push ${image_repo}/bk-user-api:${version}
docker push ${image_repo}/bk-user-saas:${version}
docker push ${image_repo}/bk-login:${login_version}

helm-sync:
mkdir -p deploy/helm/api/templates/
mkdir -p deploy/helm/saas/templates/
mkdir -p deploy/helm/login/templates/
ln -s ${PWD}/deploy/helm/chartty/* deploy/helm/api/templates/ || true
ln -s ${PWD}/deploy/helm/chartty/* deploy/helm/saas/templates/ || true
ln -s ${PWD}/deploy/helm/chartty/* deploy/helm/login/templates/ || true

ln -s ${PWD}/deploy/helm/chartty/c_*.tpl deploy/helm/bk-user-stack/templates/ || true

Expand Down
6 changes: 0 additions & 6 deletions deploy/helm/api/Chart.yaml

This file was deleted.

240 changes: 0 additions & 240 deletions deploy/helm/api/values.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions deploy/helm/bk-user-stack/Chart.lock

This file was deleted.

Loading

0 comments on commit d39373a

Please sign in to comment.