From 38943c28080331bb86d59a17b7655b23e2c940b2 Mon Sep 17 00:00:00 2001 From: Alex Kuhrt Date: Sat, 16 Dec 2017 21:35:52 +0100 Subject: [PATCH 1/2] Keep Python source files --- 3.4/alpine3.4/Dockerfile | 5 ++--- 3.5/alpine3.4/Dockerfile | 5 ++--- 3.6/alpine3.4/Dockerfile | 5 ++--- 3.6/alpine3.6/Dockerfile | 5 ++--- 3.7-rc/alpine3.6/Dockerfile | 5 ++--- Dockerfile-alpine.template | 5 ++--- 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/3.4/alpine3.4/Dockerfile b/3.4/alpine3.4/Dockerfile index 886c44534..c332e0ae5 100644 --- a/3.4/alpine3.4/Dockerfile +++ b/3.4/alpine3.4/Dockerfile @@ -30,7 +30,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ @@ -88,8 +88,7 @@ RUN set -ex \ \( -type d -a \( -name test -o -name tests \) \) \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + \) -exec rm -rf '{}' + # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.5/alpine3.4/Dockerfile b/3.5/alpine3.4/Dockerfile index 2235ad5e4..efdb48299 100644 --- a/3.5/alpine3.4/Dockerfile +++ b/3.5/alpine3.4/Dockerfile @@ -30,7 +30,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ @@ -88,8 +88,7 @@ RUN set -ex \ \( -type d -a \( -name test -o -name tests \) \) \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + \) -exec rm -rf '{}' + # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.6/alpine3.4/Dockerfile b/3.6/alpine3.4/Dockerfile index 466a834c8..e293dc29c 100644 --- a/3.6/alpine3.4/Dockerfile +++ b/3.6/alpine3.4/Dockerfile @@ -30,7 +30,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ @@ -88,8 +88,7 @@ RUN set -ex \ \( -type d -a \( -name test -o -name tests \) \) \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + \) -exec rm -rf '{}' + # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.6/alpine3.6/Dockerfile b/3.6/alpine3.6/Dockerfile index dfbfeec46..a9fef423a 100644 --- a/3.6/alpine3.6/Dockerfile +++ b/3.6/alpine3.6/Dockerfile @@ -30,7 +30,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ @@ -88,8 +88,7 @@ RUN set -ex \ \( -type d -a \( -name test -o -name tests \) \) \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + \) -exec rm -rf '{}' + # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.7-rc/alpine3.6/Dockerfile b/3.7-rc/alpine3.6/Dockerfile index ff4b9302b..dac1abf10 100644 --- a/3.7-rc/alpine3.6/Dockerfile +++ b/3.7-rc/alpine3.6/Dockerfile @@ -30,7 +30,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ @@ -88,8 +88,7 @@ RUN set -ex \ \( -type d -a \( -name test -o -name tests \) \) \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + \) -exec rm -rf '{}' + # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index ba32dd119..b9e10250f 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -24,7 +24,7 @@ RUN set -ex \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ && rm -rf "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ @@ -82,8 +82,7 @@ RUN set -ex \ \( -type d -a \( -name test -o -name tests \) \) \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ - \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + \) -exec rm -rf '{}' + # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ From 2320d4d4d252d86414cedd672868849101c17191 Mon Sep 17 00:00:00 2001 From: Alex Kuhrt Date: Fri, 29 Jun 2018 21:09:57 +0200 Subject: [PATCH 2/2] Add .gitlab-ci.yml --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..b6e5faae6 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,27 @@ +image: docker:latest + +services: + - docker:dind + +variables: + CI_PROJECT_DIR: 3.7/alpine3.7 + +before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + +build-master: + stage: build + script: + - docker build --pull -t "$CI_REGISTRY_IMAGE" . + - docker push "$CI_REGISTRY_IMAGE" + only: + - master + +build: + stage: build + script: + - docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" . + - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" + except: + - master +