From 6d97aebc503ab4626de066e32e4c7606392a64f5 Mon Sep 17 00:00:00 2001 From: Emmanuel Bruno <emmanuel.bruno@univ-tln.fr> Date: Tue, 28 Mar 2023 15:56:12 +0200 Subject: [PATCH] cleans CI. --- .github/workflows/ci.yml | 2 ++ Dockerfile | 4 ++++ build.sh | 13 +------------ env.sh | 11 ----------- push.sh | 12 ------------ 5 files changed, 7 insertions(+), 35 deletions(-) delete mode 100755 env.sh delete mode 100755 push.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bc42fe..c82de7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,8 @@ jobs: # uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + with: + driver: docker - name: Build and push uses: docker/build-push-action@v4 with: diff --git a/Dockerfile b/Dockerfile index aeb77ab..9bb874d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,10 @@ ARG DOCKER_CONFIG="/usr/local/lib/docker/cli-plugins" USER root +ARG TARGETPLATFORM +ARG BUILDPLATFORM +RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" + # Copy the list artefacts to install # Ubuntu and PIP packages, ... COPY Artefacts/ /tmp/Artefacts/ diff --git a/build.sh b/build.sh index 568ca2d..09c734d 100755 --- a/build.sh +++ b/build.sh @@ -1,12 +1 @@ -#!/bin/bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -. ${DIR}/env.sh - -#DOCKER_BUILDKIT=1 docker build \ -docker buildx build \ - --file Dockerfile \ - -t ${BASE}:$SHA \ - `[[ "$BRANCH" != "master" ]] && echo -t ${BASE}:$BRANCH` \ - `[[ "$BRANCH" == "master" ]] && echo -t ${BASE}:latest` $@ \ - . +docker build --progress=plain -t brunoe/jupyter-base:develop . diff --git a/env.sh b/env.sh deleted file mode 100755 index 8f244ee..0000000 --- a/env.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -REGISTRY=brunoe -IMAGE_NAME=${PWD##*/} - -CURRENT=`pwd` -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -cd $DIR -BASE=${REGISTRY}/${IMAGE_NAME} -BRANCH=`git rev-parse --abbrev-ref HEAD|tr '/' '_' ` -SHA=`git log -1 --pretty=%h` -cd $CURRENT diff --git a/push.sh b/push.sh deleted file mode 100755 index a62f4e7..0000000 --- a/push.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -echo $DIR -. ${DIR}/env.sh - -BASE=${REGISTRY}/${IMAGE_NAME} -BRANCH=`git rev-parse --abbrev-ref HEAD` - -echo Branche:$BRANCH -docker push ${BASE} --all-tags - -- GitLab