This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
128 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Build and Push Base Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'pr*' | ||
paths: | ||
- 'versions.txt' | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Extract date | ||
id: vars | ||
run: echo "IMAGE_TAG=$(date +'%Y%m%d_%H%M%S')" >> $GITHUB_ENV | ||
|
||
- name: Extract repository name | ||
id: repo | ||
run: echo "REPO=$(basename ${{ github.repository }})" >> $GITHUB_ENV | ||
|
||
- name: Build and push multi-arch image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: jumpserver/${{ env.REPO }}:${{ env.IMAGE_TAG }} | ||
file: Dockerfile | ||
|
||
- name: Get current branch name | ||
id: get_branch | ||
run: echo "current_branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | ||
|
||
- name: Set up Git | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Update docker-web dependencies applets | ||
run: | | ||
git clone https://github.com/jumpserver/docker-web.git | ||
cd docker-web | ||
git checkout -b ${{ env.current_branch }} | ||
sed -i 's|jumpserver/web-static:.* |jumpserver/web-static:${{ env.IMAGE_TAG }} |' Dockerfile-ee | ||
git add Dockerfile-ee | ||
git commit -m "perf: Update Dockerfile-ee web static version" | ||
- name: Push changes | ||
run: | | ||
cd docker-web | ||
git remote set-url origin https://${{ secrets.PRIVATE_TOKEN }}@github.com/jumpserver/docker-web.git | ||
git push origin ${{ env.current_branch }} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
FROM scratch | ||
ARG TARGETARCH | ||
COPY opt /opt | ||
FROM alpine:3.20.1 | ||
|
||
WORKDIR /opt | ||
|
||
COPY . . | ||
|
||
RUN set -ex \ | ||
&& apk add --no-cache bash \ | ||
&& bash /opt/prepare.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,51 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
PLAY_VERSION=1.1.0-1 | ||
PYTHON_VERSION=3.11.6 | ||
CHROME_VERSION=118.0.5993.118 | ||
CHROME_DRIVER_VERSION=118.0.5993.70 | ||
DBEAVER_VERSION=22.3.4 | ||
TINKER_VERSION=v0.1.6 | ||
MRD_VERSION=10.6.7 | ||
VIDEO_PLAYER_VERSION=0.1.9 | ||
OPENSSH_VERSION=v9.4.0.0 | ||
Client_VERSION=v2.1.3 | ||
MONGOSH_VERSION=2.2.12 | ||
echo "check_certificate = off | ||
no_clobber = on" > /tmp/.wgetrc | ||
export WGETRC=/tmp/.wgetrc | ||
|
||
PROJECT_DIR=$(cd `dirname $0`; pwd) | ||
|
||
. "${PROJECT_DIR}"/versions.txt | ||
|
||
DOWNLOAD_URL=https://download.jumpserver.org | ||
|
||
PROJECT_DIR=$(cd `dirname $0`; pwd) | ||
if [ -d "/opt/lina" ] && [ -d "/opt/luna" ]; then | ||
PROJECT_DIR=/ | ||
fi | ||
|
||
cd ${PROJECT_DIR} || exit 1 | ||
|
||
mkdir -p ${PROJECT_DIR}/opt/player | ||
cd ${PROJECT_DIR}/opt/player || exit 1 | ||
wget --no-clobber ${DOWNLOAD_URL}/public/glyptodon-enterprise-player-${PLAY_VERSION}.tar.gz | ||
wget ${DOWNLOAD_URL}/public/glyptodon-enterprise-player-${PLAY_VERSION}.tar.gz | ||
tar -xf glyptodon-enterprise-player-${PLAY_VERSION}.tar.gz -C ${PROJECT_DIR}/opt/player --strip-components 1 | ||
rm -f glyptodon-enterprise-player-${PLAY_VERSION}.tar.gz | ||
|
||
mkdir -p ${PROJECT_DIR}/opt/download/applets | ||
cd ${PROJECT_DIR}/opt/download/applets | ||
wget --no-clobber -O chromedriver-${CHROME_DRIVER_VERSION}-win64.zip https://github.com/jumpserver-dev/Chrome-Portable-Win64/releases/download/${CHROME_DRIVER_VERSION}/chromedriver-win64.zip | ||
wget --no-clobber -O chrome-${CHROME_VERSION}-win.zip https://github.com/jumpserver-dev/Chrome-Portable-Win64/releases/download/${CHROME_VERSION}/chrome-win.zip | ||
wget --no-clobber https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-amd64.exe | ||
wget --no-clobber ${DOWNLOAD_URL}/public/dbeaver-ce-${DBEAVER_VERSION}-x86_64-setup.exe | ||
wget --no-clobber ${DOWNLOAD_URL}/public/dbeaver-patch-${DBEAVER_VERSION}-x86_64-setup.msi | ||
wget --no-clobber ${DOWNLOAD_URL}/public/Tinker_Installer_${TINKER_VERSION}.exe | ||
|
||
mkdir -p ${PROJECT_DIR}/opt/download/public | ||
cd ${PROJECT_DIR}/opt/download/public || exit 1 | ||
wget --no-clobber ${DOWNLOAD_URL}/public/Microsoft_Remote_Desktop_${MRD_VERSION}_installer.pkg | ||
wget --no-clobber https://github.com/jumpserver/VideoPlayer/releases/download/v0.1.9/JumpServer.Video.Player-${VIDEO_PLAYER_VERSION}.dmg | ||
wget --no-clobber https://github.com/jumpserver/VideoPlayer/releases/download/v0.1.9/JumpServer.Video.Player.Setup.${VIDEO_PLAYER_VERSION}.exe | ||
wget --no-clobber https://github.com/PowerShell/Win32-OpenSSH/releases/download/${OPENSSH_VERSION}p1-Beta/OpenSSH-Win64-${OPENSSH_VERSION}.msi | ||
wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-win-${Client_VERSION}-x64.msi | ||
wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-win-${Client_VERSION}-x64.exe | ||
wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-mac-${Client_VERSION}-x64.dmg | ||
wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-mac-${Client_VERSION}-arm64.dmg | ||
wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-linux-${Client_VERSION}-amd64.deb | ||
wget --no-clobber https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-linux-${Client_VERSION}-arm64.deb | ||
|
||
if [ "${USE_XPACK}" = "0" ]; then | ||
for arch in x64 arm64 ppc64le s390x; do | ||
wget --no-clobber https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VERSION}-linux-${arch}.tgz | ||
done | ||
fi | ||
DOWNLOAD_DIR=${PROJECT_DIR}/opt/download | ||
mkdir -p ${DOWNLOAD_DIR}/applets | ||
cd ${DOWNLOAD_DIR}/applets || exit 1 | ||
wget -O chromedriver-${CHROME_DRIVER_VERSION}-win64.zip https://github.com/jumpserver-dev/Chrome-Portable-Win64/releases/download/${CHROME_DRIVER_VERSION}/chromedriver-win64.zip | ||
wget -O chrome-${CHROME_VERSION}-win.zip https://github.com/jumpserver-dev/Chrome-Portable-Win64/releases/download/${CHROME_VERSION}/chrome-win.zip | ||
wget https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-amd64.exe | ||
wget ${DOWNLOAD_URL}/public/dbeaver-ce-${DBEAVER_VERSION}-x86_64-setup.exe | ||
wget ${DOWNLOAD_URL}/public/dbeaver-patch-${DBEAVER_VERSION}-x86_64-setup.msi | ||
wget ${DOWNLOAD_URL}/public/Tinker_Installer_${TINKER_VERSION}.exe | ||
|
||
mkdir -p ${DOWNLOAD_DIR}/public | ||
cd ${DOWNLOAD_DIR}/public || exit 1 | ||
wget ${DOWNLOAD_URL}/public/Microsoft_Remote_Desktop_${MRD_VERSION}_installer.pkg | ||
wget https://github.com/jumpserver/VideoPlayer/releases/download/v0.1.9/JumpServer.Video.Player-${VIDEO_PLAYER_VERSION}.dmg | ||
wget https://github.com/jumpserver/VideoPlayer/releases/download/v0.1.9/JumpServer.Video.Player.Setup.${VIDEO_PLAYER_VERSION}.exe | ||
wget https://github.com/PowerShell/Win32-OpenSSH/releases/download/${OPENSSH_VERSION}p1-Beta/OpenSSH-Win64-${OPENSSH_VERSION}.msi | ||
|
||
clients=("win-${Client_VERSION}-x64.exe" "mac-${Client_VERSION}-x64.dmg" "mac-${Client_VERSION}-arm64.dmg" | ||
"linux-${Client_VERSION}-amd64.deb" "linux-${Client_VERSION}-arm64.deb") | ||
for client in "${clients[@]}"; do | ||
wget "https://github.com/jumpserver/clients/releases/download/${Client_VERSION}/JumpServer-Client-Installer-${client}" | ||
done | ||
|
||
for arch in x64 arm64; do | ||
wget https://downloads.mongodb.com/compass/mongosh-${MONGOSH_VERSION}-linux-${arch}.tgz | ||
done | ||
|
||
cp versions.txt /opt/download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
PLAY_VERSION=1.1.0-1 | ||
PYTHON_VERSION=3.11.6 | ||
CHROME_VERSION=118.0.5993.118 | ||
CHROME_DRIVER_VERSION=118.0.5993.70 | ||
DBEAVER_VERSION=22.3.4 | ||
MRD_VERSION=10.6.7 | ||
OPENSSH_VERSION=v9.4.0.0 | ||
MONGOSH_VERSION=2.2.12 | ||
TINKER_VERSION=v0.1.6 | ||
VIDEO_PLAYER_VERSION=0.1.9 | ||
Client_VERSION=v2.1.3 |