Skip to content

Commit

Permalink
Merge pull request #480 from jumpserver/dev
Browse files Browse the repository at this point in the history
v4.1.0
  • Loading branch information
BaiJiangJie committed Aug 15, 2024
2 parents e8a9d3d + 6695e21 commit a43b9ce
Show file tree
Hide file tree
Showing 22 changed files with 1,361 additions and 1,375 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,41 @@ on:
name: Create Release And Upload assets

jobs:
create-realese:
create-release: # 修正了拼写错误
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get version
id: get_version
run: |
TAG=$(basename ${GITHUB_REF})
VERSION=${TAG/v/}
echo "::set-output name=TAG::$TAG"
echo "::set-output name=VERSION::$VERSION"
echo "TAG=$TAG" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: release-drafter/release-drafter@v5
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
config-name: release-config.yml
version: ${{ steps.get_version.outputs.TAG }}
tag: ${{ steps.get_version.outputs.TAG }}

build-and-release:
needs: create-realese
name: Build and Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build it and upload
uses: jumpserver/action-build-upload-assets@master

- name: Create Upload Assets
run: |
mkdir -p build jumpserver-installer-${{ steps.get_version.outputs.TAG }}
git archive --format tar HEAD | tar x -C jumpserver-installer-${{ steps.get_version.outputs.TAG }}
tar -czf build/jumpserver-installer-${{ steps.get_version.outputs.TAG }}.tar.gz jumpserver-installer-${{ steps.get_version.outputs.TAG }}
cd build
md5sum jumpserver-installer-${{ steps.get_version.outputs.TAG }}.tar.gz > jumpserver-installer-${{ steps.get_version.outputs.TAG }}.tar.gz.md5
- name: Release Upload Assets
run: |
gh release upload ${{ steps.get_version.outputs.TAG }} build/* -R $GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create-realese.outputs.upload_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ jumpserver-release/compose
*.rpm
*.zip
*.tar.gz
scripts/docker/
scripts/docker/*
!scripts/docker/docker.service
scripts/images/
backup
config.txt
Expand Down
1 change: 0 additions & 1 deletion cn-quick_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ function get_installer() {

function config_installer() {
cd /opt/jumpserver-installer-${VERSION} || exit 1
sed -i "s/VERSION=.*/VERSION=${VERSION}/g" /opt/jumpserver-installer-${VERSION}/static.env
sed -i "s/# DOCKER_IMAGE_MIRROR=1/DOCKER_IMAGE_MIRROR=1/g" /opt/jumpserver-installer-${VERSION}/config-example.txt
./jmsctl.sh install
./jmsctl.sh start
Expand Down
2 changes: 1 addition & 1 deletion compose/init-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
image: ${REGISTRY:-docker.io}/jumpserver/core:${VERSION}
container_name: jms_core
hostname: jms_core
command: "tail -f /dev/null"
command: sleep
env_file:
- ${CONFIG_FILE}
volumes:
Expand Down
2 changes: 1 addition & 1 deletion compose/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
volumes:
- ${VOLUME_DIR}/postgresql/data:/var/lib/postgresql/data
healthcheck:
test: "pg_isready"
test: "pg_isready -q -U $$POSTGRES_USER"
interval: 10s
timeout: 5s
retries: 3
Expand Down
1 change: 1 addition & 0 deletions config-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,5 @@ USE_LB=1
# The current running version number of JumpServer, automatically generated after installation and upgrade
#
TZ=Asia/Shanghai
TIME_ZONE=Asia/Shanghai
CURRENT_VERSION=
21 changes: 1 addition & 20 deletions jmsctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function usage() {
echo
echo "Installation Commands: "
echo " install $(gettext 'Install JumpServer')"
echo " upgrade $(gettext 'Upgrade JumpServer')"
echo
echo "Management Commands: "
echo " config $(gettext 'Configuration Tools')"
Expand Down Expand Up @@ -124,26 +125,6 @@ function check_update() {
else
exit 1
fi
echo -e "$(gettext 'The current version is'): ${current_version}"
Install_DIR="$(cd "$(dirname "${PROJECT_DIR}")" &>/dev/null && pwd)"
if [[ ! -d "${Install_DIR}/jumpserver-installer-${latest_version}" ]]; then
if [[ ! -f "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz" ]]; then
timeout 60s wget -qO "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz" "https://github.com/jumpserver/installer/releases/download/${latest_version}/jumpserver-installer-${latest_version}.tar.gz" || {
rm -f "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz"
timeout 60s wget -qO "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz" "https://demo.jumpserver.org/download/installer/${latest_version}/jumpserver-installer-${latest_version}.tar.gz" || {
rm -f "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz"
exit 1
}
}
fi
tar -xf "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz" -C "${Install_DIR}" || {
rm -rf "${Install_DIR}/jumpserver-installer-${latest_version}" "${Install_DIR}/jumpserver-installer-${latest_version}.tar.gz"
exit 1
}
fi
cd "${Install_DIR}/jumpserver-installer-${latest_version}" || exit 1
echo
./jmsctl.sh upgrade "${latest_version}"
}

function video-worker() {
Expand Down
Loading

0 comments on commit a43b9ce

Please sign in to comment.