parent
741c36bd07
commit
6af1f376c2
17
Dockerfile
17
Dockerfile
@ -1,5 +1,6 @@
|
|||||||
FROM ubuntu:focal AS deploy-env
|
FROM ubuntu:focal AS deploy-env
|
||||||
RUN apt-get update && apt-get --yes --no-install-recommends install libsqlite3-0 zlib1g libreadline8 libssl1.1 wget libvncclient1 libjpeg-turbo8 openssh-client
|
ARG tag
|
||||||
|
RUN apt-get update && apt-get --yes --no-install-recommends install libsqlite3-0 zlib1g libreadline8 libssl1.1 wget libvncclient1 libjpeg-turbo8 openssh-client tar tree
|
||||||
RUN apt clean && rm -rf /var/lib/apt/lists/*
|
RUN apt clean && rm -rf /var/lib/apt/lists/*
|
||||||
RUN mkdir /ulib
|
RUN mkdir /ulib
|
||||||
RUN cp -rf /lib/*-linux-*/libsqlite3*.so* /ulib
|
RUN cp -rf /lib/*-linux-*/libsqlite3*.so* /ulib
|
||||||
@ -45,11 +46,14 @@ RUN cp -rf /lib/*-linux-*/libcom_err*.so* /ulib
|
|||||||
RUN cp -rf /lib/*-linux-*/libkrb5support*.so* /ulib
|
RUN cp -rf /lib/*-linux-*/libkrb5support*.so* /ulib
|
||||||
RUN cp -rf /lib/*-linux-*/libkeyutils*.so* /ulib
|
RUN cp -rf /lib/*-linux-*/libkeyutils*.so* /ulib
|
||||||
|
|
||||||
|
|
||||||
|
# antos
|
||||||
RUN mkdir /platform
|
RUN mkdir /platform
|
||||||
COPY antos/ /
|
COPY antos-release/ /
|
||||||
RUN cp /backend/$(uname -m)/* /platform -rf
|
RUN tar -xzf /build/$tag/AntOS_$(uname -m).tar.gz -C /platform/
|
||||||
|
RUN tree /platform
|
||||||
|
|
||||||
FROM busybox:stable-glibc
|
FROM busybox:stable-glibc
|
||||||
ARG tag
|
|
||||||
#copy all necessary libraries
|
#copy all necessary libraries
|
||||||
COPY --from=deploy-env /ulib/ /lib/
|
COPY --from=deploy-env /ulib/ /lib/
|
||||||
COPY --from=deploy-env /bin/wget /bin/
|
COPY --from=deploy-env /bin/wget /bin/
|
||||||
@ -61,15 +65,12 @@ COPY profile /etc/profile
|
|||||||
RUN chmod a+x /bin/bash
|
RUN chmod a+x /bin/bash
|
||||||
# copy backend
|
# copy backend
|
||||||
COPY --from=deploy-env /platform/ /
|
COPY --from=deploy-env /platform/ /
|
||||||
RUN rm /etc/systemd -rf
|
|
||||||
# copy frontend
|
# copy frontend
|
||||||
COPY antd-config.ini /opt/www/antd-config.ini
|
COPY antd-config.ini /opt/www/antd-config.ini
|
||||||
COPY runner.ini /opt/www/runner.ini
|
COPY runner.ini /opt/www/runner.ini
|
||||||
RUN chmod 744 /opt/www/antd-config.ini
|
RUN chmod 744 /opt/www/antd-config.ini
|
||||||
RUN chmod 744 /opt/www/runner.ini
|
RUN chmod 744 /opt/www/runner.ini
|
||||||
COPY antos/frontend/$tag/ /
|
|
||||||
RUN chown -R root:root /opt/www/htdocs/
|
|
||||||
RUN rm -rf /etc/systemd
|
|
||||||
COPY start.sh /start.sh
|
COPY start.sh /start.sh
|
||||||
RUN chmod 700 /start.sh
|
RUN chmod 700 /start.sh
|
||||||
ENTRYPOINT /start.sh
|
ENTRYPOINT /start.sh
|
||||||
|
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
@ -1,17 +1,5 @@
|
|||||||
def remote = [:]
|
|
||||||
remote.name = 'workstation'
|
|
||||||
remote.host = 'workstation'
|
|
||||||
remote.user = 'dany'
|
|
||||||
remote.identityFile = '/var/jenkins_home/.ssh/id_rsa'
|
|
||||||
remote.allowAnyHosts = true
|
|
||||||
remote.agent = false
|
|
||||||
remote.logLevel = 'INFO'
|
|
||||||
pipeline{
|
pipeline{
|
||||||
agent { node{ label'master' }}
|
agent { node{ label'workstation' }}
|
||||||
//parameters {
|
|
||||||
// string(defaultValue: "xsangle", name: 'dockerhub_user', description: 'Docker hub username')
|
|
||||||
// string(defaultValue: "", name: 'dockerhub_pat', description: 'Docker hub Personal Access Token')
|
|
||||||
//}
|
|
||||||
options {
|
options {
|
||||||
// Limit build history with buildDiscarder option:
|
// Limit build history with buildDiscarder option:
|
||||||
// daysToKeepStr: history is only kept up to this many days.
|
// daysToKeepStr: history is only kept up to this many days.
|
||||||
@ -32,16 +20,13 @@ pipeline{
|
|||||||
{
|
{
|
||||||
stage('Build all') {
|
stage('Build all') {
|
||||||
steps {
|
steps {
|
||||||
sshCommand remote: remote, command: '''
|
copyArtifacts(projectName: 'gitea-sync/antos-appimage/master', target: 'antos-release');
|
||||||
|
sh'''#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
export WORKSPACE=$(realpath "./jenkins/workspace/antosaio-docker")
|
|
||||||
cd $WORKSPACE
|
cd $WORKSPACE
|
||||||
[ -d antos ] && rm -rf antos
|
tree antos-release
|
||||||
mkdir antos
|
|
||||||
cp /var/jenkins_home/workspace/nightly-antosaio/build/* antos -rf
|
|
||||||
tree antos
|
|
||||||
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
|
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
|
||||||
for dir in antos/frontend/* ; do
|
for dir in antos-release/build/* ; do
|
||||||
tag=$(basename $dir)
|
tag=$(basename $dir)
|
||||||
echo "BUILD TAG $tag"
|
echo "BUILD TAG $tag"
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[vterm]
|
[vterm]
|
||||||
exec = /opt/www/bin/vterm
|
exec = /opt/www/bin/vterm
|
||||||
param = /opt/www/tmp/channels/antd_hotline.sock
|
param = /app/data/tmp/channels/antd_hotline.sock
|
||||||
debug = 0
|
debug = 0
|
10
start.sh
10
start.sh
@ -20,9 +20,9 @@ unset ANTOS_PASSWORD
|
|||||||
[ ! -f "/app/antd-config.ini" ] && cp /opt/www/antd-config.ini /app/antd-config.ini
|
[ ! -f "/app/antd-config.ini" ] && cp /opt/www/antd-config.ini /app/antd-config.ini
|
||||||
[ ! -f "/app/runner.ini" ] && cp /opt/www/runner.ini /app/runner.ini
|
[ ! -f "/app/runner.ini" ] && cp /opt/www/runner.ini /app/runner.ini
|
||||||
|
|
||||||
/usr/bin/antd /app/antd-config.ini >/dev/null 2>&1 | \
|
# start syslog
|
||||||
|
syslogd -O /tmp/messages
|
||||||
|
|
||||||
|
usr/bin/antd /app/antd-config.ini >/dev/null 2>&1 | \
|
||||||
( sleep 2 && /opt/www/bin/runner /app/runner.ini >/dev/null 2>&1 &)
|
( sleep 2 && /opt/www/bin/runner /app/runner.ini >/dev/null 2>&1 &)
|
||||||
#/usr/bin/antd /app/antd-config.ini &
|
# /bin/sh
|
||||||
#sleep 2
|
|
||||||
#[ -f /app/runner.ini ] && /opt/www/bin/runner /app/runner.ini &
|
|
||||||
#wait
|
|
Loading…
Reference in New Issue
Block a user