diff --git a/Dockerfile b/Dockerfile index f72d8f3..302af2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ RUN mkdir /platform COPY antos/ / RUN cp /backend/$(uname -m)/* /platform -rf FROM busybox:stable-glibc - +ARG tag #copy all necessary libraries COPY --from=deploy-env /ulib/* /lib/ COPY --from=deploy-env /bin/wget /bin/ @@ -67,7 +67,7 @@ COPY antd-config.ini /opt/www/antd-config.ini COPY runner.ini /opt/www/runner.ini RUN chmod 744 /opt/www/antd-config.ini RUN chmod 744 /opt/www/runner.ini -COPY antos/frontend/ / +COPY antos/frontend/$tag/ / RUN chown -R root:root /opt/www/htdocs/ RUN rm -rf /etc/systemd COPY start.sh /start.sh diff --git a/Jenkinsfile b/Jenkinsfile index 1c631ab..6d7f420 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ pipeline{ } stages { - stage('Build') { + stage('Build latest') { steps { sshCommand remote: remote, command: ''' set -e @@ -43,10 +43,30 @@ pipeline{ docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 docker buildx build \ --push \ + --build-arg tag=latest \ --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \ --tag xsangle/antosaio:latest . ''' } } + stage('Build devel') { + steps { + sshCommand remote: remote, command: ''' + set -e + export WORKSPACE=$(realpath "./jenkins/workspace/antosaio-docker") + cd $WORKSPACE + [ -d antos ] && rm antos + mkdir antos + cp /var/jenkins_home/workspace/nightly-antosaio/build/* antos -rf + tree antos + docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64 + docker buildx build \ + --push \ + --build-arg tag=devel \ + --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \ + --tag xsangle/antosaio:devel . + ''' + } + } } } \ No newline at end of file