From 8d1b68157fa7237c7a1bf4423468401f06047438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Tue, 24 Oct 2023 19:40:17 +0800 Subject: [PATCH] feat: init --- .github/workflows/jms-build-test.yml | 37 +++++++++++++ .../workflows/jms-generic-action-handler.yml | 12 ++++ Dockerfile | 55 +++++++++++++++++++ README.md | 10 ++++ 4 files changed, 114 insertions(+) create mode 100644 .github/workflows/jms-build-test.yml create mode 100644 .github/workflows/jms-generic-action-handler.yml create mode 100644 Dockerfile create mode 100644 README.md diff --git a/.github/workflows/jms-build-test.yml b/.github/workflows/jms-build-test.yml new file mode 100644 index 0000000..6f5e92c --- /dev/null +++ b/.github/workflows/jms-build-test.yml @@ -0,0 +1,37 @@ +name: "Run Build Test" +on: + push: + branches: + - pr@* + - repr@* + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - run: | + mkdir -p release/lina release/luna release/applets + + - uses: docker/setup-qemu-action@v2 + + - uses: docker/setup-buildx-action@v2 + + - uses: docker/build-push-action@v3 + with: + context: . + push: false + tags: jumpserver/web-static:test + build-args: | + APT_MIRROR=http://deb.debian.org + file: Dockerfile + cache-from: type=gha + cache-to: type=gha,mode=max + + - uses: LouisBrunner/checks-action@v1.5.0 + if: always() + with: + token: ${{ secrets.GITHUB_TOKEN }} + name: Check Build + conclusion: ${{ job.status }} diff --git a/.github/workflows/jms-generic-action-handler.yml b/.github/workflows/jms-generic-action-handler.yml new file mode 100644 index 0000000..3f499cf --- /dev/null +++ b/.github/workflows/jms-generic-action-handler.yml @@ -0,0 +1,12 @@ +on: [push, pull_request, release] + +name: JumpServer repos generic handler + +jobs: + generic_handler: + name: Run generic handler + runs-on: ubuntu-latest + steps: + - uses: jumpserver/action-generic-handler@master + env: + GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..958bbff --- /dev/null +++ b/Dockerfile @@ -0,0 +1,55 @@ +FROM debian:bullseye-slim +ARG TARGETARCH + +ARG APT_MIRROR=http://mirrors.ustc.edu.cn +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=web \ + sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \ + && rm -f /etc/cron.daily/apt-compat \ + && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ + && apt-get update \ + && apt-get install -y --no-install-recommends wget \ + && echo "no" | dpkg-reconfigure dash \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /opt/download/applets + +ARG PYTHON_VERSION=3.11.6 +RUN set -ex \ + && wget -q https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-amd64.exe + +ARG CHROME_VERSION=114.0.5735.134 +RUN set -ex \ + && wget -q https://github.com/wojiushixiaobai/Chrome-Portable-Win64/releases/download/${CHROME_VERSION}/chromedriver_win32.zip \ + && wget -q https://github.com/wojiushixiaobai/Chrome-Portable-Win64/releases/download/${CHROME_VERSION}/chrome-win.zip + +ARG DBEAVER_VERSION=22.3.4 +RUN set -ex \ + && wget -q ${DOWNLOAD_URL}/public/dbeaver-ce-${DBEAVER_VERSION}-x86_64-setup.exe \ + && wget -qO dbeaver-patch.msi ${DOWNLOAD_URL}/public/dbeaver-patch-${DBEAVER_VERSION}-x86_64-setup.msi + +ARG TINKER_VERSION=v0.1.3 +RUN set -ex \ + && wget -qO Tinker_Installer.exe ${DOWNLOAD_URL}/public/Tinker_Installer_${TINKER_VERSION}.exe + +WORKDIR /opt/download/public +ARG MRD_VERSION=10.6.7 +RUN set -ex \ + && wget -q ${DOWNLOAD_URL}/public/Microsoft_Remote_Desktop_${MRD_VERSION}_installer.pkg + +ARG VIDEO_PLAYER_VERSION=0.1.9 +RUN set -ex \ + && wget -qO JumpServer-Video-Player.dmg https://github.com/jumpserver/VideoPlayer/releases/download/v0.1.9/JumpServer.Video.Player-${VIDEO_PLAYER_VERSION}.dmg \ + && wget -qO JumpServer-Video-Player.exe https://github.com/jumpserver/VideoPlayer/releases/download/v0.1.9/JumpServer.Video.Player.Setup.${VIDEO_PLAYER_VERSION}.exe + +ARG OPENSSH_VERSION=v9.4.0.0 +RUN set -ex \ + && wget -qO OpenSSH-Win64.msi https://github.com/PowerShell/Win32-OpenSSH/releases/download/${OPENSSH_VERSION}p1-Beta/OpenSSH-Win64-${OPENSSH_VERSION}.msi + +ARG Client_VERSION=v2.0.2 +RUN set -ex \ + && wget -qO JumpServer-Client-Installer-x86_64.msi https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-${Client_VERSION}-x86_64.msi \ + && wget -qO JumpServer-Client-Installer-x86_64.exe https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-${Client_VERSION}-x86_64.exe \ + && wget -qO JumpServer-Client-Installer-amd64.dmg https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-${Client_VERSION}-amd64.dmg \ + && wget -qO JumpServer-Client-Installer-arm64.dmg https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-${Client_VERSION}-arm64.dmg \ + && wget -qO JumpServer-Client-Installer-amd64.deb https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-${Client_VERSION}-amd64.deb \ + && wget -qO JumpServer-Client-Installer-arm64.deb https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-${Client_VERSION}-arm64.deb \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb89dbf --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# JumpServer Web STATIC + +JumpServer Web 项目,包含一些静态安装包文件 + +## Docker 构建 + +```bash +VERSION=dev +docker buildx build --build-arg VERSION=${VERSION} -t jumpserver/web-static:${VERSION} . --load +```