From a697edfd44b6d8fdbfc935ad04533de5627022ab Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Mon, 22 Feb 2021 20:15:54 +0100 Subject: [PATCH 1/3] fix: runtime error in Docker packaging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add missing Alpine package href: https://pkgs.alpinelinux.org/package/v3.7/main/x86_64/openssl * Avoid runtime errors: Error loading shared library libssl.so.1.0.0: No such file or directory (needed by /usr/bin/learn-ocaml) Error loading shared library libcrypto.so.1.0.0: No such file or directory (needed by /usr/bin/learn-ocaml) […] * Ensure this patch is future-proof (instead of adding "libssl1.0"), see: https://github.com/eclipse/mosquitto/issues/1711#issuecomment-637987176 --- Dockerfile | 4 ++-- Dockerfile.test-client | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e71e23173..05529e16f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ RUN opam install . --destdir /home/opam/install-prefix --locked FROM alpine:3.7 as client RUN apk update \ - && apk add ncurses-libs libev dumb-init \ + && apk add ncurses-libs libev dumb-init openssl \ && addgroup learn-ocaml \ && adduser learn-ocaml -DG learn-ocaml @@ -53,7 +53,7 @@ LABEL org.opencontainers.image.vendor="The OCaml Software Foundation" FROM alpine:3.7 as program RUN apk update \ - && apk add ncurses-libs libev dumb-init git \ + && apk add ncurses-libs libev dumb-init git openssl \ && addgroup learn-ocaml \ && adduser learn-ocaml -DG learn-ocaml diff --git a/Dockerfile.test-client b/Dockerfile.test-client index 6e7480ef7..2d8a757da 100644 --- a/Dockerfile.test-client +++ b/Dockerfile.test-client @@ -51,7 +51,7 @@ LABEL org.label-schema.build-date="${BUILD_DATE}" \ org.label-schema.schema-version="1.0" RUN apk update \ - && apk add ncurses-libs libev dumb-init \ + && apk add ncurses-libs libev dumb-init openssl \ && addgroup learn-ocaml \ && adduser learn-ocaml -DG learn-ocaml From 7766698707759739f3893173aa3b876540c344c4 Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Fri, 16 Apr 2021 09:55:16 +0200 Subject: [PATCH 2/3] fix: Bump alpine version & Use ocaml/opam instead of ocaml/opam2 --- Dockerfile | 6 +++--- Dockerfile.test-client | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 05529e16f..bd280f5ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ocaml/opam2:alpine-3.7 as compilation +FROM ocaml/opam:alpine-3.13-ocaml-4.05 as compilation LABEL Description="learn-ocaml building" Vendor="OCamlPro" WORKDIR learn-ocaml @@ -28,7 +28,7 @@ RUN cat /proc/cpuinfo /proc/meminfo RUN opam install . --destdir /home/opam/install-prefix --locked -FROM alpine:3.7 as client +FROM alpine:3.13 as client RUN apk update \ && apk add ncurses-libs libev dumb-init openssl \ @@ -50,7 +50,7 @@ LABEL org.opencontainers.image.url="https://ocaml-sf.org/" LABEL org.opencontainers.image.vendor="The OCaml Software Foundation" -FROM alpine:3.7 as program +FROM alpine:3.13 as program RUN apk update \ && apk add ncurses-libs libev dumb-init git openssl \ diff --git a/Dockerfile.test-client b/Dockerfile.test-client index 2d8a757da..ee7c49a13 100644 --- a/Dockerfile.test-client +++ b/Dockerfile.test-client @@ -1,7 +1,7 @@ # This Dockerfile is useful for testing purposes # to ensure learn-ocaml-client can be built alone from learn-ocaml-client.opam -FROM ocaml/opam2:alpine-3.7 as compilation +FROM ocaml/opam:alpine-3.13-ocaml-4.05 as compilation LABEL Description="learn-ocaml building" Vendor="OCamlPro" WORKDIR learn-ocaml @@ -34,7 +34,7 @@ RUN opam install learn-ocaml-client --destdir /home/opam/install-prefix \ && ls -l /home/opam/install-prefix/bin/learn-ocaml-client -FROM alpine:3.7 as client +FROM alpine:3.13 as client ARG BUILD_DATE ARG VCS_BRANCH From 63903f277e6eaa1b08580cbf4e0bb289996f85de Mon Sep 17 00:00:00 2001 From: Erik Martin-Dorel Date: Fri, 16 Apr 2021 10:59:01 +0200 Subject: [PATCH 3/3] chore: Add a weekly build href: https://crontab.guru/#0_8_*_*_6 --- .github/workflows/build-and-test.yml | 3 +++ .github/workflows/deploy-master.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e5fce43f1..e8eb4c299 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -7,6 +7,9 @@ on: pull_request: branches: - '**' + schedule: + # test master every Saturday at 08:00 UTC + - cron: '0 8 * * 6' jobs: build_test_server: diff --git a/.github/workflows/deploy-master.yml b/.github/workflows/deploy-master.yml index 4ba802e03..8bf488427 100644 --- a/.github/workflows/deploy-master.yml +++ b/.github/workflows/deploy-master.yml @@ -4,6 +4,9 @@ on: push: branches: - master + schedule: + # deploy master every Saturday at 08:00 UTC + - cron: '0 8 * * 6' jobs: push_server: name: Push learn-ocaml image to Docker Hub