Skip to content

Commit b11ca0e

Browse files
authored
Pr@master@add ci (#28)
* fix: 修复升级的多次提问问题和redis mysql测试连接问题 * feat: 添加支持ci
1 parent 654e6c1 commit b11ca0e

File tree

8 files changed

+179
-0
lines changed

8 files changed

+179
-0
lines changed

.github/ISSUE_TEMPLATE/----.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: 需求建议
3+
about: 提出针对本项目的想法和建议
4+
title: "[Feature] "
5+
labels: 类型:需求
6+
assignees: ibuler
7+
8+
---
9+
10+
**请描述您的需求或者改进建议.**

.github/ISSUE_TEMPLATE/bug---.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Bug 提交
3+
about: 提交产品缺陷帮助我们更好的改进
4+
title: "[Bug] "
5+
labels: 类型:bug
6+
assignees: wojiushixiaobai
7+
8+
---
9+
10+
**JumpServer 版本(v1.5.9以下不再支持)**
11+
12+
13+
**浏览器版本**
14+
15+
16+
**Bug 描述**
17+
18+
19+
**Bug 重现步骤(有截图更好)**
20+
1.
21+
2.
22+
3.

.github/ISSUE_TEMPLATE/question.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: 问题咨询
3+
about: 提出针对本项目安装部署、使用及其他方面的相关问题
4+
title: "[Question] "
5+
labels: 类型:提问
6+
assignees: wojiushixiaobai
7+
8+
---
9+
10+
**请描述您的问题.**

.github/release-config.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name-template: 'v$RESOLVED_VERSION'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
- title: '🌱 新功能 Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- 'feat'
9+
- '新功能'
10+
- title: '🚀 性能优化 Optimization'
11+
labels:
12+
- 'perf'
13+
- 'opt'
14+
- 'refactor'
15+
- 'Optimization'
16+
- '优化'
17+
- title: '🐛 Bug修复 Bug Fixes'
18+
labels:
19+
- 'fix'
20+
- 'bugfix'
21+
- 'bug'
22+
- title: '🧰 其它 Maintenance'
23+
labels:
24+
- 'chore'
25+
- 'docs'
26+
exclude-labels:
27+
- 'no'
28+
- '无需处理'
29+
- 'wontfix'
30+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
31+
version-resolver:
32+
major:
33+
labels:
34+
- 'major'
35+
minor:
36+
labels:
37+
- 'minor'
38+
patch:
39+
labels:
40+
- 'patch'
41+
default: patch
42+
template: |
43+
## 版本变化 What’s Changed
44+
$CHANGES
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on: [push, pull_request, release]
2+
3+
name: JumpServer repos generic handler
4+
5+
jobs:
6+
generic_handler:
7+
name: Run generic handler
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: jumpserver/action-generic-handler@master
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}

.github/workflows/release-drafter.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: Create Release And Upload assets
8+
9+
jobs:
10+
create-realese:
11+
name: Create Release
12+
runs-on: ubuntu-latest
13+
outputs:
14+
upload_url: ${{ steps.create_release.outputs.upload_url }}
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
- name: Get version
19+
id: get_version
20+
run: |
21+
TAG=$(basename ${GITHUB_REF})
22+
VERSION=${TAG/v/}
23+
echo "::set-output name=TAG::$TAG"
24+
echo "::set-output name=VERSION::$VERSION"
25+
- name: Create Release
26+
id: create_release
27+
uses: release-drafter/release-drafter@v5
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
with:
31+
config-name: release-config.yml
32+
version: ${{ steps.get_version.outputs.TAG }}
33+
tag: ${{ steps.get_version.outputs.TAG }}
34+
35+
build-and-release:
36+
needs: create-realese
37+
name: Build and Release
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- name: Build it and upload
42+
uses: jumpserver/action-build-upload-assets@master
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
with:
46+
upload_url: ${{ needs.create-realese.outputs.upload_url }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ cofnig.link
1313
.env
1414
.bak
1515
config.link
16+
release/*

utils/build.sh

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash -i
2+
#
3+
# 该build基于registry.fit2cloud.com/public/python:3
4+
utils_dir=$(pwd)
5+
project_dir=$(dirname "$utils_dir")
6+
release_dir=${project_dir}/release
7+
8+
# 打开alias
9+
shopt -s expand_aliases
10+
# 打包
11+
cd "${project_dir}" || exit 3
12+
rm -rf "${release_dir:?}"/*
13+
to_dir="${release_dir}/jumpserver-installer"
14+
mkdir -p "${to_dir}"
15+
16+
if [[ -d '.git' ]];then
17+
command -v git || yum -y install git
18+
git archive --format tar HEAD | tar x -C "${to_dir}"
19+
else
20+
cp -R . /tmp/jumpserver
21+
mv /tmp/jumpserver/* "${to_dir}"
22+
fi
23+
24+
if [[ $(uname) == 'Darwin' ]];then
25+
alias sedi='sed -i ""'
26+
else
27+
alias sedi='sed -i'
28+
fi
29+
30+
# 修改版本号文件
31+
if [[ -n ${VERSION} ]]; then
32+
sedi "s@VERSION=.*@VERSION=\"${VERSION}\"@g" "${to_dir}/static.env"
33+
fi
34+

0 commit comments

Comments
 (0)