Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
OCamlPro
osh
Commits
a023a657
Unverified
Commit
a023a657
authored
Sep 23, 2021
by
zapashcanon
Browse files
add CI and missing dep on crunch
parent
44d1d4cd
Pipeline
#15550
canceled with stages
in 1 minute and 51 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
0 deletions
+73
-0
.gitlab-ci.yml
.gitlab-ci.yml
+70
-0
dune-project
dune-project
+2
-0
osh.opam
osh.opam
+1
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
a023a657
stages
:
-
build
-
image
-
deploy
# Define some conditions to run the whole pipeline
workflow
:
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
# Run on MRs
-
if
:
$CI_COMMIT_TAG
# Run on tags
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# Run on master
# Customize the build rules and the artifacts here. You probably want to adjust
# "opam.locked"
# We define a cache in order to keep the switch with the dependencies installed,
# unless the opam.locked file has changed.
build
:
stage
:
build
image
:
debian:buster
before_script
:
-
apt update
-
apt install -yqq --no-install-recommends ca-certificates curl opam git pkg-config m4
-
opam init --disable-sandboxing --bare -ya
-
opam switch create ocaml-base-compiler.4.12.0
-
eval "$(opam env)"
-
opam pin add . -y --no-action
-
opam install opam-depext
-
opam depext -y osh
-
opam install ./*.opam -y --deps-only --with-test --with-doc
script
:
-
opam exec -- dune build --profile release @all
-
opam exec -- dune runtest
-
mv _build/default/src/server.exe .
artifacts
:
paths
:
-
server.exe
include
:
-
project
:
'
OCamlPro/gitlab-deployments'
ref
:
master
file
:
deploy.yml
# Builds and pushes the Docker image using Kaniko
make-image
:
extends
:
.make-image
# defined in deploy.yml
variables
:
DOCKERFILE
:
/kaniko/Dockerfile
# don't need a local 'git clone'
GIT_STRATEGY
:
"
none"
before_script
:
# Write the Dockerfile for the image we want to generate
# Here we inherit from nginx and just add the contents of our web-app
-
|
echo "\
FROM bitnami/nginx:latest
ADD server.exe /opt/bitnami/nginx/sbin/nginx
USER 0
RUN apt update && apt install -yqq libev4
USER 1001
" > $DOCKERFILE
# Deployments are pre-defined in the "dev" environment; they will be stopped
# after 3 days unless they are on the default branch (master).
# To define production deployments, ensure the domain name is correct, and set
# the corresponding DNS record as "CNAME" to "a.ocaml.pro"
deploy-prod
:
extends
:
.deploy-prod
variables
:
PUBLIC_HOST
:
osh.ocamlpro.com
dune-project
View file @
a023a657
...
...
@@ -28,6 +28,8 @@
(>= 1.0.0~alpha2))
(ocb
(>= 0.1))
(crunch
(>= 3.2.0))
(bisect_ppx
(and
:with-test
...
...
osh.opam
View file @
a023a657
...
...
@@ -13,6 +13,7 @@ depends: [
"ocaml" {>= "4.08"}
"dream" {>= "1.0.0~alpha2"}
"ocb" {>= "0.1"}
"crunch" {>= "3.2.0"}
"bisect_ppx" {with-test & >= "2.6" & dev}
"odoc" {with-doc}
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment