[Git][NTPsec/ntpsec][master] Add CI jobs to build/store our docker images in our project container registry
Matt Selsky
gitlab at mg.gitlab.com
Mon Apr 27 00:15:09 UTC 2020
Matt Selsky pushed to branch master at NTPsec / ntpsec
Commits:
47b3a231 by Matt Selsky at 2020-04-26T15:43:21-04:00
Add CI jobs to build/store our docker images in our project container registry
This insulates us from the following failures:
- Docker Hub failures
- Various distribution update infrastructure
- Various distribution package errors
We're still at the mercy of GitLab's container registry, but we're already
dependent on GitLab for our build/CI infrastructure.
- - - - -
25 changed files:
- + .dockerfiles/alpine
- + .dockerfiles/alpine-edge
- + .dockerfiles/alpine-pages
- + .dockerfiles/alpine-seccomp
- + .dockerfiles/centos-latest
- + .dockerfiles/clang
- + .dockerfiles/debian-oldstable
- + .dockerfiles/debian-stable
- + .dockerfiles/debian-stable-i386
- + .dockerfiles/debian-stable-mdns
- + .dockerfiles/debian-testing
- + .dockerfiles/debian-unstable
- + .dockerfiles/fedora-latest
- + .dockerfiles/fedora-rawhide
- + .dockerfiles/fedora-rawhide-gpsd
- + .dockerfiles/gentoo
- + .dockerfiles/gentoo-hardened
- + .dockerfiles/opensuse-leap
- + .dockerfiles/opensuse-tumbleweed
- + .dockerfiles/python3-rc
- + .dockerfiles/ubuntu-devel
- + .dockerfiles/ubuntu-latest
- + .dockerfiles/ubuntu-rolling
- + .gitlab-ci-docker-images.yml
- .gitlab-ci.yml
Changes:
=====================================
.dockerfiles/alpine
=====================================
@@ -0,0 +1,4 @@
+FROM alpine
+
+RUN apk update
+RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
=====================================
.dockerfiles/alpine-edge
=====================================
@@ -0,0 +1,4 @@
+FROM alpine:edge
+
+RUN apk update
+RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
=====================================
.dockerfiles/alpine-pages
=====================================
@@ -0,0 +1,4 @@
+FROM alpine
+
+RUN apk update
+RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev asciidoctor findutils gzip
=====================================
.dockerfiles/alpine-seccomp
=====================================
@@ -0,0 +1,4 @@
+FROM alpine
+
+RUN apk update
+RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev libseccomp-dev
=====================================
.dockerfiles/centos-latest
=====================================
@@ -0,0 +1,3 @@
+FROM centos:latest
+
+RUN dnf -y install bison gcc openssl-devel libcap-devel python3-devel
=====================================
.dockerfiles/clang
=====================================
@@ -0,0 +1,4 @@
+FROM debian:testing-slim
+
+RUN apt-get update
+RUN apt-get install -y netbase bison libssl-dev libcap-dev pps-tools python-dev clang
=====================================
.dockerfiles/debian-oldstable
=====================================
@@ -0,0 +1,4 @@
+FROM debian:oldstable-slim
+
+RUN apt-get update
+RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
=====================================
.dockerfiles/debian-stable
=====================================
@@ -0,0 +1,4 @@
+FROM debian:stable-slim
+
+RUN apt-get update
+RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
=====================================
.dockerfiles/debian-stable-i386
=====================================
@@ -0,0 +1,4 @@
+FROM i386/debian:stable-slim
+
+RUN apt-get update
+RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev
=====================================
.dockerfiles/debian-stable-mdns
=====================================
@@ -0,0 +1,4 @@
+FROM debian:stable-slim
+
+RUN apt-get update
+RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev libavahi-compat-libdnssd-dev
=====================================
.dockerfiles/debian-testing
=====================================
@@ -0,0 +1,4 @@
+FROM debian:testing-slim
+
+RUN apt-get update
+RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
=====================================
.dockerfiles/debian-unstable
=====================================
@@ -0,0 +1,4 @@
+FROM debian:unstable-slim
+
+RUN apt-get update
+RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
=====================================
.dockerfiles/fedora-latest
=====================================
@@ -0,0 +1,3 @@
+FROM fedora:latest
+
+RUN dnf -y install bison gcc openssl-devel libcap-devel python3-devel
=====================================
.dockerfiles/fedora-rawhide
=====================================
@@ -0,0 +1,3 @@
+FROM registry.fedoraproject.org/fedora:rawhide
+
+RUN dnf -y install bison gcc openssl-devel libcap-devel python3-devel
=====================================
.dockerfiles/fedora-rawhide-gpsd
=====================================
@@ -0,0 +1,3 @@
+FROM registry.fedoraproject.org/fedora:rawhide
+
+RUN dnf -y install bison gcc openssl-devel libcap-devel python3-devel python3-gpsd
=====================================
.dockerfiles/gentoo
=====================================
@@ -0,0 +1,4 @@
+FROM gentoo/stage3-amd64
+
+RUN emerge-webrsync
+RUN emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
=====================================
.dockerfiles/gentoo-hardened
=====================================
@@ -0,0 +1,4 @@
+FROM gentoo/stage3-amd64-hardened
+
+RUN emerge-webrsync
+RUN emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
=====================================
.dockerfiles/opensuse-leap
=====================================
@@ -0,0 +1,3 @@
+FROM opensuse/leap
+
+RUN zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses
=====================================
.dockerfiles/opensuse-tumbleweed
=====================================
@@ -0,0 +1,3 @@
+FROM opensuse/tumbleweed
+
+RUN zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses
=====================================
.dockerfiles/python3-rc
=====================================
@@ -0,0 +1,4 @@
+FROM python:rc
+
+RUN apt-get update -qq
+RUN apt-get install -y -qq bison libcap-dev pps-tools
=====================================
.dockerfiles/ubuntu-devel
=====================================
@@ -0,0 +1,4 @@
+FROM ubuntu:devel
+
+RUN apt-get update
+RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
=====================================
.dockerfiles/ubuntu-latest
=====================================
@@ -0,0 +1,4 @@
+FROM ubuntu:latest
+
+RUN apt-get update
+RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
=====================================
.dockerfiles/ubuntu-rolling
=====================================
@@ -0,0 +1,4 @@
+FROM ubuntu:rolling
+
+RUN apt-get update
+RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
=====================================
.gitlab-ci-docker-images.yml
=====================================
@@ -0,0 +1,93 @@
+.build_template: &build_definition
+ variables:
+ # Try to save some time by only grabbing the most recent commit
+ GIT_DEPTH: '1'
+ stage: build
+ image: docker:stable
+ services:
+ - docker:stable-dind
+ script:
+ - IMAGE_NAME=${CI_JOB_NAME/build-/}
+ - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+ - docker pull $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest || true
+ - >
+ docker build
+ --pull
+ --cache-from $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest
+ --rm=false
+ --tag $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest .
+ --file .dockerfiles/$IMAGE_NAME
+ - docker push $CI_REGISTRY_IMAGE/$IMAGE_NAME:latest
+ allow_failure: true
+ retry: 2
+ only:
+ - schedules
+
+build-alpine:
+ <<: *build_definition
+
+build-alpine-edge:
+ <<: *build_definition
+
+build-alpine-pages:
+ <<: *build_definition
+
+build-alpine-seccomp:
+ <<: *build_definition
+
+build-centos-latest:
+ <<: *build_definition
+
+build-clang:
+ <<: *build_definition
+
+build-debian-oldstable:
+ <<: *build_definition
+
+build-debian-stable:
+ <<: *build_definition
+
+build-debian-stable-i386:
+ <<: *build_definition
+
+build-debian-stable-mdns:
+ <<: *build_definition
+
+build-debian-testing:
+ <<: *build_definition
+
+build-debian-unstable:
+ <<: *build_definition
+
+build-fedora-latest:
+ <<: *build_definition
+
+build-fedora-rawhide:
+ <<: *build_definition
+
+build-fedora-rawhide-gpsd:
+ <<: *build_definition
+
+build-gentoo:
+ <<: *build_definition
+
+build-gentoo-hardened:
+ <<: *build_definition
+
+build-opensuse-leap:
+ <<: *build_definition
+
+build-opensuse-tumbleweed:
+ <<: *build_definition
+
+build-python3-rc:
+ <<: *build_definition
+
+build-ubuntu-latest:
+ <<: *build_definition
+
+build-ubuntu-rolling:
+ <<: *build_definition
+
+build-ubuntu-devel:
+ <<: *build_definition
=====================================
.gitlab-ci.yml
=====================================
@@ -24,6 +24,7 @@ include:
- template: SAST.gitlab-ci.yml
- template: License-Scanning.gitlab-ci.yml
- local: '.gitlab-opttest-ci.yml'
+ - local: '.gitlab-ci-docker-images.yml'
.job_template: &job_definition
stage: build
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/47b3a23160551a502285ccb31ee3a019587120b1
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/47b3a23160551a502285ccb31ee3a019587120b1
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20200427/2e0c689a/attachment-0001.htm>
More information about the vc
mailing list