Skip to content

Commit

Permalink
feat: 更新 v3.10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Mar 25, 2024
1 parent 1bcfddb commit 56c9802
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 90 deletions.
77 changes: 75 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,62 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
component: [core, koko, lion, kael, chen, magnus, web]
component: [koko, lion, kael, chen, magnus, web]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: actions/setup-python@v4

- name: Get Version
run: |
echo "version=$(basename ${GITHUB_REF})" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.component }}/Dockerfile
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
${{ github.repository_owner }}/jms_${{ matrix.component }}:${{ env.version }}
${{ github.repository_owner }}/jms_${{ matrix.component }}:latest
ghcr.io/${{ github.repository_owner }}/jms_${{ matrix.component }}:${{ env.version }}
ghcr.io/${{ github.repository_owner }}/jms_${{ matrix.component }}:latest
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
cache-from: type=gha
cache-to: type=gha,mode=max

core:
runs-on: ubuntu-latest
strategy:
matrix:
component: [core]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
Expand Down Expand Up @@ -43,6 +98,8 @@ jobs:
if: matrix.component == 'core'
run: |
wget https://github.com/jumpserver/jumpserver/raw/${{ env.version }}/pyproject.toml
cryptography_version=$(awk -F'"' '/cryptography/{print $2}' pyproject.toml)
echo "cryptography_version=${cryptography_version}" >> $GITHUB_ENV
sed -i 's@^cython =@# cython =@g' pyproject.toml
sed -i 's@^certifi =@# certifi =@g' pyproject.toml
sed -i 's@^cffi =@# cffi =@g' pyproject.toml
Expand All @@ -67,6 +124,22 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push Cache Image
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.component }}/Dockerfile.base
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
build-args:
CRYPTOGRAPHY_VERSION=${{ env.cryptography_version }}
tags: |
${{ github.repository_owner }}/${{ matrix.component }}:base-bookworm
ghcr.io/${{ github.repository_owner }}/${{ matrix.component }}:base-bookworm
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and Push Image
uses: docker/build-push-action@v5
with:
Expand All @@ -84,7 +157,7 @@ jobs:
cache-to: type=gha,mode=max

allinone:
needs: build
needs: core
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/cache.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ vi .env
```
```vim
# 版本号可以自己根据项目的版本修改
VERSION=v3.10.3
VERSION=v3.10.4
# 构建参数, 支持 amd64/arm64/ppc64le/s390x...
TARGETARCH=amd64
Expand Down
4 changes: 2 additions & 2 deletions allinone/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM redis:7.0-bookworm as redis
FROM jumpserver/guacd:1.5.3-bookworm as guacd
FROM jumpserver/web-static:v1.0.6-bookworm as static
FROM wojiushixiaobai/jms_core:v3.10.3
FROM jumpserver/web-static:v1.0.7-bookworm as static
FROM wojiushixiaobai/jms_core:v3.10.4
ARG TARGETARCH

ARG TOOLS=" \
Expand Down
6 changes: 3 additions & 3 deletions allinone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ docker run --name jms_all -d \
-v /opt/jumpserver/kael/data:/opt/kael/data \
-v /opt/jumpserver/chen/data:/opt/chen/data \
-v /opt/jumpserver/web/log:/var/log/nginx \
wojiushixiaobai/jms_all:v3.10.3
wojiushixiaobai/jms_all:v3.10.4
```

**升级**
Expand All @@ -119,7 +119,7 @@ mysqldump -h$DB_HOST -p$DB_PORT -u$DB_USER -p$DB_PASSWORD $DB_NAME > /opt/jumpse
# 例: mysqldump -h192.168.100.11 -p3306 -ujumpserver -pnu4x599Wq7u0Bn8EABh3J91G jumpserver > /opt/jumpserver-v2.12.0.sql

# 拉取新版本镜像
docker pull wojiushixiaobai/jms_all:v3.10.3
docker pull wojiushixiaobai/jms_all:v3.10.4

# 删掉旧版本容器
docker rm jms_all
Expand Down Expand Up @@ -147,4 +147,4 @@ docker run --name jms_all -d \
-v /opt/jumpserver/kael/data:/opt/kael/data \
-v /opt/jumpserver/chen/data:/opt/chen/data \
-v /opt/jumpserver/web/log:/var/log/nginx \
wojiushixiaobai/jms_all:v3.10.3
wojiushixiaobai/jms_all:v3.10.4
2 changes: 1 addition & 1 deletion allinone/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ The Installation is Complete.
╚█████╔╝╚██████╔╝██║ ╚═╝ ██║██║ ███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
╚════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝

VERSION: v3.10.3
VERSION: v3.10.4
4 changes: 2 additions & 2 deletions chen/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN set -ex \

WORKDIR /opt/chen

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down Expand Up @@ -69,7 +69,7 @@ COPY --from=stage-1 /opt/chen /opt/chen

WORKDIR /opt/chen

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

VOLUME /opt/chen/data
Expand Down
2 changes: 1 addition & 1 deletion config_example.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 版本号可以自己根据项目的版本修改
VERSION=v3.10.3
VERSION=v3.10.4

# 构建参数, 支持 amd64/arm64/ppc64le/s390x
TARGETARCH=amd64
Expand Down
4 changes: 2 additions & 2 deletions core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN set -ex \
&& chmod 755 /usr/local/bin/check \
&& rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=$VERSION

RUN set -ex \
Expand Down Expand Up @@ -90,7 +90,7 @@ COPY --from=stage-1 /opt/jumpserver/release/jumpserver /opt/jumpserver

WORKDIR /opt/jumpserver

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

VOLUME /opt/jumpserver/data
Expand Down
4 changes: 2 additions & 2 deletions kael/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN set -ex \

WORKDIR /opt/kael

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down Expand Up @@ -69,7 +69,7 @@ COPY --from=stage-1 /opt/kael /opt/kael

WORKDIR /opt/kael

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

VOLUME /opt/kael/data
Expand Down
4 changes: 2 additions & 2 deletions koko/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ RUN set -ex \

WORKDIR /opt/koko

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down Expand Up @@ -122,7 +122,7 @@ COPY --from=stage-2 /opt/kubectl-aliases /opt/kubectl-aliases

WORKDIR /opt/koko

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

VOLUME /opt/koko/data
Expand Down
4 changes: 2 additions & 2 deletions lion/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN set -ex \

WORKDIR /opt/lion

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down Expand Up @@ -62,7 +62,7 @@ COPY lion/supervisord.conf /etc/supervisor/conf.d/lion.conf

WORKDIR /opt/lion

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

VOLUME /opt/lion/data
Expand Down
4 changes: 2 additions & 2 deletions magnus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN set -ex \

WORKDIR /opt/magnus

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down Expand Up @@ -68,7 +68,7 @@ COPY --from=stage-1 /opt/magnus /opt/magnus

WORKDIR /opt/magnus

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

VOLUME /opt/magnus/data
Expand Down
6 changes: 3 additions & 3 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jumpserver/web-static:v1.0.6-bookworm as stage-1
FROM jumpserver/web-static:v1.0.7-bookworm as stage-1
FROM debian:bookworm-slim as stage-2
ARG TARGETARCH

Expand All @@ -24,7 +24,7 @@ RUN set -ex \
&& chmod 755 /usr/local/bin/check \
&& rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

RUN set -ex \
Expand Down Expand Up @@ -64,7 +64,7 @@ COPY web/nginx.conf /etc/nginx/

WORKDIR /opt

ARG VERSION=v3.10.3
ARG VERSION=v3.10.4
ENV VERSION=${VERSION}

VOLUME /var/log/nginx
Expand Down

0 comments on commit 56c9802

Please sign in to comment.