Skip to content

Commit

Permalink
Merge pull request #45 from moyodiallo/update-dockerfile
Browse files Browse the repository at this point in the history
Upgrade Dockerfile to debian-12
  • Loading branch information
tmcgilchrist committed Oct 11, 2023
2 parents 68f09ca + 7643a9b commit 5271cb3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ocaml/opam:debian-11-ocaml-4.14@sha256:5ce947a2707d3cfe0d2a8918ef41c8b5f88ccddfcace11871c5f553afac189ed AS build
FROM ocaml/opam:debian-12-ocaml-4.14@sha256:45b04e2a4c933c57549382045dfac12cb7e872cace0456f92f4b022066e48111 AS build
RUN sudo ln -f /usr/bin/opam-2.1 /usr/bin/opam && opam init --reinit -ni
RUN sudo apt-get update && sudo apt-get install libev-dev capnproto graphviz m4 pkg-config libsqlite3-dev libgmp-dev -y --no-install-recommends
RUN cd ~/opam-repository && git pull origin master && git reset --hard 030450cdf268a0cf6cbe6f3d309dd320345b40c0 && opam update
Expand All @@ -8,10 +8,10 @@ RUN opam install -y --deps-only .
ADD --chown=opam . .
RUN --mount=type=cache,target=./_build/,uid=1000,gid=1000 opam config exec -- dune build ./_build/install/default/bin/mirage-ci ./_build/install/default/bin/mirage-ci-solver && cp ./_build/install/default/bin/mirage-ci ./_build/install/default/bin/mirage-ci-solver .

FROM debian:11
FROM debian:12
RUN apt-get update && apt-get install libev4 openssh-client curl gnupg2 dumb-init git graphviz libsqlite3-dev ca-certificates netbase gzip bzip2 xz-utils unzip tar -y --no-install-recommends
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN echo 'deb [arch=amd64] https://download.docker.com/linux/debian buster stable' >> /etc/apt/sources.list
RUN echo 'deb [arch=amd64] https://download.docker.com/linux/debian bookworm stable' >> /etc/apt/sources.list
RUN apt-get update && apt-get install docker-ce docker-buildx-plugin -y --no-install-recommends
RUN git config --global user.name "mirage" && git config --global user.email "ci"
WORKDIR /var/lib/ocurrent
Expand Down
1 change: 1 addition & 0 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
current_git
current_github
(current_ocluster (>= 0.2))
(ocluster-api (>= 0.2))
current_rpc
current_docker
current-web-pipelines
Expand Down
1 change: 1 addition & 0 deletions mirage-ci.opam
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ depends: [
"current_git"
"current_github"
"current_ocluster" {>= "0.2"}
"ocluster-api" {>= "0.2"}
"current_rpc"
"current_docker"
"current-web-pipelines"
Expand Down
6 changes: 4 additions & 2 deletions src/mirage_ci.ml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ let main current_config github mode auth config
let state =
let state_active =
Current_web_pipelines.Task.state prs
|> Current.map (List.map (fun v -> v.Current_web_pipelines.State.metadata) )
|> Current.map
(List.map (fun v -> v.Current_web_pipelines.State.metadata))
|> Website.set_active_sources website
in
let input = Current_web_pipelines.Task.state prs in
Expand All @@ -70,7 +71,8 @@ let main current_config github mode auth config
end)
(Website.update_state website)
input
|> Current.pair state_active |> Current.map ignore
|> Current.pair state_active
|> Current.map ignore
|> Current.collapse ~key:"current-web-pipeline-internals" ~value:""
~input:
(Current.return ~label:"current-web-pipelines internals" ())
Expand Down
6 changes: 4 additions & 2 deletions src/mirage_ci_local.ml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ let main current_config mode config
let state =
let state_active =
Current_web_pipelines.Task.state main_ci
|> Current.map (List.map (fun v -> v.Current_web_pipelines.State.metadata) )
|> Current.map
(List.map (fun v -> v.Current_web_pipelines.State.metadata))
|> Website.set_active_sources website
in
Current.list_iter ~collapse_key:"update-web-state"
Expand All @@ -45,7 +46,8 @@ let main current_config mode config
end)
(Website.update_state website)
(Current_web_pipelines.Task.state main_ci)
|> Current.pair state_active |> Current.map ignore
|> Current.pair state_active
|> Current.map ignore
in
[ ("mirage-main-ci", current); ("mirage-state", state) ]
|> Current.all_labelled)
Expand Down

0 comments on commit 5271cb3

Please sign in to comment.