From 5de57ea0e3735615dda4d7e5e1e474236e079855 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@inrae.fr>
Date: Tue, 23 Aug 2022 16:20:51 +0200
Subject: [PATCH] Add pres (test)

---
 .gitlab-ci.yml | 39 +++++++++++++++++++++++++++++++++++++++
 otbtf_pres     |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 .gitlab-ci.yml
 create mode 120000 otbtf_pres

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..a707c8d
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,39 @@
+image: docker:latest
+services:
+- docker:dind
+
+stages:
+  - build
+  - pages
+
+.dind_base:
+  tags: [dind]
+  image: docker/compose:1.29.2
+  variables:
+    DOCKER_TLS_CERTDIR: ""
+    DOCKER_HOST: tcp://docker:2375
+  services:
+    - name: docker:dind
+      command: [dockerd, '-H', 'tcp://0.0.0.0:2375']
+  before_script:
+    # docker login asks for the password to be passed through stdin for security
+    # we use $CI_REGISTRY_PASSWORD here which is a special variable provided by GitLab
+    # https://docs.gitlab.com/ce/ci/variables/predefined_variables.html
+    - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
+
+build-image:
+  extends: .dind_base
+  stage: build
+  script:
+    - docker build -t $CI_REGISTRY_IMAGE otbtf_pres/.
+    - docker push $CI_REGISTRY_IMAGE
+
+pages:
+  image: $CI_REGISTRY_IMAGE
+  stage: pages
+  script:
+    - cp -r /public public
+    - cp -r otbtf_pres/* public
+  artifacts:
+    paths:
+      - public
diff --git a/otbtf_pres b/otbtf_pres
new file mode 120000
index 0000000..2919cce
--- /dev/null
+++ b/otbtf_pres
@@ -0,0 +1 @@
+/home/remi/Documents/otb/otbtf_pres
\ No newline at end of file
-- 
GitLab