From 2cc5a837a0e45c223152313f8c1bb12c56e6fcd0 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 14:58:17 +0200
Subject: [PATCH 01/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 102 +++++++++++++++++++++++++++----------------------
 1 file changed, 57 insertions(+), 45 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5cfe0b9e..d1517df4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,96 +18,109 @@ stages:
   - Test
   - Applications Test
 
-.update_otbtf_src: &update_otbtf_src
-  - sudo rm -rf $OTBTF_SRC && sudo ln -s $PWD $OTBTF_SRC  # Replace local OTBTF source directory
-
-.compile_otbtf: &compile_otbtf
-  - cd $OTB_BUILD && sudo make install -j$(nproc --all)  # Rebuild OTB with new OTBTF sources
-  
-.install_pytest: &install_pytest
-  - pip3 install pytest pytest-cov pytest-order  # Install pytest stuff
-  
-before_script:
-  - *update_otbtf_src
-
-build:
-  stage: Build
+Build the docker image:
+  stage: Docker build cpu-basic-dev
   allow_failure: false
+  tags: [godzilla]
+  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
   script:
-    - *compile_otbtf
+    - docker info
+    - >
+      docker build
+      --pull
+      --cache-from $CI_REGISTRY_IMAGE:latest
+      --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
+      --label "org.opencontainers.image.url=$CI_PROJECT_URL"
+      --label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
+      --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
+      --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
+      --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
+      --build-arg BASE_IMAGE="ubuntu:20.04"
+      --build-arg BZL_CONFIGS=""
+      --build-arg KEEP_SRC_OTB=true
+      .
+    - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
+    - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
+    - docker push $CI_REGISTRY_IMAGE:cpu-basic-test
 
-flake8:
+.static_analysis_base:
+  image: $CI_REGISTRY_IMAGE:cpu-basic-test
   stage: Static Analysis
   allow_failure: true
+
+flake8:
+  extends: .static_analysis_base
   script:
     - sudo apt update && sudo apt install flake8 -y
     - python -m flake8 --max-line-length=120 $OTBTF_SRC/python
 
 pylint:
-  stage: Static Analysis
-  allow_failure: true
+  extends: .static_analysis_base
   script:
     - sudo apt update && sudo apt install pylint -y
     - pylint --disable=too-many-nested-blocks,too-many-locals,too-many-statements,too-few-public-methods,too-many-instance-attributes,too-many-arguments --ignored-modules=tensorflow --max-line-length=120 --logging-format-style=new $OTBTF_SRC/python
 
 codespell:
-  stage: Static Analysis
-  allow_failure: true
+  extends: .static_analysis_base
   script:
     - sudo pip install codespell && codespell
     
 cppcheck:
-  stage: Static Analysis
-  allow_failure: true
+  extends: .static_analysis_base
   script:
     - sudo apt update && sudo apt install cppcheck -y
     - cd $OTBTF_SRC/ && cppcheck --enable=all --error-exitcode=1 -I include/ --suppress=missingInclude --suppress=unusedFunction .
 
+.tests_base:
+  image: $CI_REGISTRY_IMAGE:cpu-basic-test
+  artifacts:
+    paths:
+      - $ARTIFACT_TEST_DIR/*.*
+    expire_in: 1 week
+    when: on_failure
+
 ctest:
+  extends: .tests_base
   stage: Test
   script:
-    - *compile_otbtf
-    - sudo rm -rf $OTB_TEST_DIR/*  # Empty testing temporary folder (old files here)
     - cd $OTB_BUILD/ && sudo ctest -L OTBTensorflow  # Run ctest
   after_script:
     - cp -r $OTB_TEST_DIR $ARTIFACT_TEST_DIR
-  artifacts:
-    paths:
-      - $ARTIFACT_TEST_DIR/*.*
-    expire_in: 1 week
-    when: on_failure
 
 .applications_test_base:
+  extends: .tests_base
   stage: Applications Test
   rules:
       # Only for MR targeting 'develop' and 'master' branches because applications tests are slow
     - if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'develop'
     - if: $CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'master'
-  artifacts:
-    when: on_failure
-    paths:
-      - $CI_PROJECT_DIR/report_*.xml
-      - $ARTIFACT_TEST_DIR/*.*
-    expire_in: 1 week
-          
+  before_script:
+    - pip3 install pytest pytest-cov pytest-order
+    - mkdir -p $ARTIFACT_TEST_DIR
+    - cd $CI_PROJECT_DIR
+
 crc_book:
   extends: .applications_test_base
   script:
-    - *compile_otbtf
-    - *install_pytest
-    - cd $CI_PROJECT_DIR
     - mkdir -p $CRC_BOOK_TMP
     - TMPDIR=$CRC_BOOK_TMP DATADIR=$CI_PROJECT_DIR/test/data python -m pytest --junitxml=$CI_PROJECT_DIR/report_tutorial.xml $OTBTF_SRC/test/tutorial_unittest.py
   after_script:
-    - mkdir -p $ARTIFACT_TEST_DIR
     - cp $CRC_BOOK_TMP/*.* $ARTIFACT_TEST_DIR/
     
 sr4rs:
   extends: .applications_test_base
   script:
-    - *compile_otbtf
-    - *install_pytest
-    - cd $CI_PROJECT_DIR
     - wget -O sr4rs_sentinel2_bands4328_france2020_savedmodel.zip
       https://nextcloud.inrae.fr/s/EZL2JN7SZyDK8Cf/download/sr4rs_sentinel2_bands4328_france2020_savedmodel.zip
     - unzip -o sr4rs_sentinel2_bands4328_france2020_savedmodel.zip
@@ -116,5 +129,4 @@ sr4rs:
     - rm -rf sr4rs
     - git clone https://github.com/remicres/sr4rs.git
     - export PYTHONPATH=$PYTHONPATH:$PWD/sr4rs
-    - python -m pytest --junitxml=$CI_PROJECT_DIR/report_sr4rs.xml $OTBTF_SRC/test/sr4rs_unittest.py
-
+    - python -m pytest --junitxml=$ARTIFACT_TEST_DIR/report_sr4rs.xml $OTBTF_SRC/test/sr4rs_unittest.py
-- 
GitLab


From e91d542127736540185107b8e4103830ed712c57 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 15:00:23 +0200
Subject: [PATCH 02/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d1517df4..79cccb82 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: gitlab-registry.irstea.fr/remi.cresson/otbtf:3.1-cpu-basic-testing
+image: $CI_REGISTRY_IMAGE:cpu-basic-test
 
 variables:
     OTB_BUILD: /src/otb/build/OTB/build  # Local OTB build directory
@@ -18,8 +18,8 @@ stages:
   - Test
   - Applications Test
 
-Build the docker image:
-  stage: Docker build cpu-basic-dev
+Build the cpu-basic-dev docker image:
+  stage: Build
   allow_failure: false
   tags: [godzilla]
   image: docker/compose:1.29.2
@@ -55,7 +55,6 @@ Build the docker image:
     - docker push $CI_REGISTRY_IMAGE:cpu-basic-test
 
 .static_analysis_base:
-  image: $CI_REGISTRY_IMAGE:cpu-basic-test
   stage: Static Analysis
   allow_failure: true
 
@@ -83,7 +82,6 @@ cppcheck:
     - cd $OTBTF_SRC/ && cppcheck --enable=all --error-exitcode=1 -I include/ --suppress=missingInclude --suppress=unusedFunction .
 
 .tests_base:
-  image: $CI_REGISTRY_IMAGE:cpu-basic-test
   artifacts:
     paths:
       - $ARTIFACT_TEST_DIR/*.*
-- 
GitLab


From e1a552bc292433432ce3106f64af4885d53b9638 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 15:06:30 +0200
Subject: [PATCH 03/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 79cccb82..45e250bb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,12 +22,12 @@ Build the cpu-basic-dev docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
-  image: docker/compose:1.29.2
+  image: docker:latest
   variables:
     DOCKER_TLS_CERTDIR: ""
-    DOCKER_HOST: tcp://docker:2375
+    DOCKER_HOST: tcp://localhost:2375/
   services:
-    - name: docker:dind
+    - name: docker:18.09.7-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
-- 
GitLab


From 57b58a39f33fc452ac7884f3a59ee89975726d0f Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 15:16:37 +0200
Subject: [PATCH 04/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 45e250bb..98d4dc8d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,7 +18,7 @@ stages:
   - Test
   - Applications Test
 
-Build the cpu-basic-dev docker image:
+Build the CI docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
-- 
GitLab


From 74bc99453336bd41fd8244773d9b4deaeb7e5514 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 15:21:26 +0200
Subject: [PATCH 05/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 98d4dc8d..e3b6a1e8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,7 +25,7 @@ Build the CI docker image:
   image: docker:latest
   variables:
     DOCKER_TLS_CERTDIR: ""
-    DOCKER_HOST: tcp://localhost:2375/
+    DOCKER_HOST: tcp://docker:2375/
   services:
     - name: docker:18.09.7-dind
       command: [dockerd, '-H', 'tcp://0.0.0.0:2375']
-- 
GitLab


From e77077d6dc1716bb4816ddf7974dc757c819b235 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 15:22:35 +0200
Subject: [PATCH 06/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e3b6a1e8..98d4dc8d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,7 +25,7 @@ Build the CI docker image:
   image: docker:latest
   variables:
     DOCKER_TLS_CERTDIR: ""
-    DOCKER_HOST: tcp://docker:2375/
+    DOCKER_HOST: tcp://localhost:2375/
   services:
     - name: docker:18.09.7-dind
       command: [dockerd, '-H', 'tcp://0.0.0.0:2375']
-- 
GitLab


From a65dfa9c45362723737b6458d647fa51cb503d61 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 15:32:14 +0200
Subject: [PATCH 07/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 98d4dc8d..b6a83be8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,11 +24,16 @@ Build the CI docker image:
   tags: [godzilla]
   image: docker:latest
   variables:
-    DOCKER_TLS_CERTDIR: ""
-    DOCKER_HOST: tcp://localhost:2375/
+    DOCKER_HOST: tcp://docker:2375/
+    DOCKER_DRIVER: overlay2
+    # See https://github.com/docker-library/docker/pull/166
+    DOCKER_TLS_CERTDIR: "
+
   services:
-    - name: docker:18.09.7-dind
-      command: [dockerd, '-H', 'tcp://0.0.0.0:2375']
+    - name: docker:dind
+      entrypoint: ["env", "-u", "DOCKER_HOST"]
+      command: ["dockerd-entrypoint.sh"]
+
   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
-- 
GitLab


From 41bc4fbbba393da2cee25a43110feae1dfef4e0c Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 15:33:03 +0200
Subject: [PATCH 08/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b6a83be8..bdacb6b1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,8 +27,7 @@ Build the CI docker image:
     DOCKER_HOST: tcp://docker:2375/
     DOCKER_DRIVER: overlay2
     # See https://github.com/docker-library/docker/pull/166
-    DOCKER_TLS_CERTDIR: "
-
+    DOCKER_TLS_CERTDIR: ""
   services:
     - name: docker:dind
       entrypoint: ["env", "-u", "DOCKER_HOST"]
-- 
GitLab


From 67aa195945ee2734b2f823dc44c2702380b7036e Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 15:49:04 +0200
Subject: [PATCH 09/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bdacb6b1..25355c11 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ Build the CI docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
-  image: docker:latest
+  image: docker:17.06.0-ce
   variables:
     DOCKER_HOST: tcp://docker:2375/
     DOCKER_DRIVER: overlay2
-- 
GitLab


From 087f404b7528f925f37c9da98577443029976fa2 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 15:52:37 +0200
Subject: [PATCH 10/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 25355c11..11dd9b0e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,17 +22,13 @@ Build the CI docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
-  image: docker:17.06.0-ce
+  image: docker/compose:1.29.2
   variables:
-    DOCKER_HOST: tcp://docker:2375/
-    DOCKER_DRIVER: overlay2
-    # See https://github.com/docker-library/docker/pull/166
     DOCKER_TLS_CERTDIR: ""
+    DOCKER_HOST: tcp://docker:2375
   services:
     - name: docker:dind
-      entrypoint: ["env", "-u", "DOCKER_HOST"]
-      command: ["dockerd-entrypoint.sh"]
-
+      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
-- 
GitLab


From 8d67b260e5ac4e9496f9bdca3cf8c9d38a1f4a57 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 16:01:20 +0200
Subject: [PATCH 11/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 11dd9b0e..ded529b7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,12 +23,16 @@ Build the CI docker image:
   allow_failure: false
   tags: [godzilla]
   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']
+      entrypoint: ["env", "-u", "DOCKER_HOST"]
+      command: ["dockerd-entrypoint.sh"]
+  variables:
+    DOCKER_HOST: tcp://docker:2375/
+    DOCKER_DRIVER: overlay2
+    # See https://github.com/docker-library/docker/pull/166
+    DOCKER_TLS_CERTDIR: ""
+
   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
-- 
GitLab


From 73919db73f0eb3220a2dafbda6b60c0dfaf6d668 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 16:07:24 +0200
Subject: [PATCH 12/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ded529b7..c11aabec 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,6 +37,7 @@ Build the CI docker image:
     # 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
+    - docker info
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
     - docker info
-- 
GitLab


From c220de6727b37688d7a341f656c1428d30d75430 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 16:16:37 +0200
Subject: [PATCH 13/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c11aabec..a3c32e6a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,14 +25,6 @@ Build the CI docker image:
   image: docker/compose:1.29.2
   services:
     - name: docker:dind
-      entrypoint: ["env", "-u", "DOCKER_HOST"]
-      command: ["dockerd-entrypoint.sh"]
-  variables:
-    DOCKER_HOST: tcp://docker:2375/
-    DOCKER_DRIVER: overlay2
-    # See https://github.com/docker-library/docker/pull/166
-    DOCKER_TLS_CERTDIR: ""
-
   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
-- 
GitLab


From 872022c5cbd811074cecfe170690910be12c76ed Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 16:28:09 +0200
Subject: [PATCH 14/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a3c32e6a..042b1bc5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,9 +22,8 @@ Build the CI docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
-  image: docker/compose:1.29.2
   services:
-    - name: docker:dind
+    - name: docker:17.06.0-ce-dind
   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
-- 
GitLab


From 50b2c2e1ac280077568f002fb89861844ddaf5f6 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 16:28:59 +0200
Subject: [PATCH 15/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 042b1bc5..17b869d7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,6 +22,7 @@ Build the CI docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
+  image: docker/compose:1.29.2
   services:
     - name: docker:17.06.0-ce-dind
   before_script:
-- 
GitLab


From 8dd609bfd31d8b5ac9c1cf718135201e0b3cebb4 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 17:05:08 +0200
Subject: [PATCH 16/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 17b869d7..8cf0092e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,6 +25,8 @@ Build the CI docker image:
   image: docker/compose:1.29.2
   services:
     - name: docker:17.06.0-ce-dind
+    alias: docker
+
   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
-- 
GitLab


From 4f051393032649d7ff1830ac85d66edcc7283e73 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 17:06:14 +0200
Subject: [PATCH 17/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8cf0092e..b967a042 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,7 +25,7 @@ Build the CI docker image:
   image: docker/compose:1.29.2
   services:
     - name: docker:17.06.0-ce-dind
-    alias: docker
+      alias: docker
 
   before_script:
     # docker login asks for the password to be passed through stdin for security
-- 
GitLab


From fa16bd9b49454f2573619c9ec6643ee3a1f19798 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 20:10:21 +0200
Subject: [PATCH 18/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b967a042..d12a4ea7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -45,9 +45,9 @@ Build the CI docker image:
       --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
       --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
       --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-      --build-arg BASE_IMAGE="ubuntu:20.04"
-      --build-arg BZL_CONFIGS=""
-      --build-arg KEEP_SRC_OTB=true
+      --build-arg "BASE_IMAGE=ubuntu:20.04"
+      --build-arg "BZL_CONFIGS="
+      --build-arg "KEEP_SRC_OTB=true"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From 0105b69365bd4c8f158997343e143c7919afec3b Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 20:54:22 +0200
Subject: [PATCH 19/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d12a4ea7..f60f4cf9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -45,9 +45,9 @@ Build the CI docker image:
       --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
       --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
       --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-      --build-arg "BASE_IMAGE=ubuntu:20.04"
-      --build-arg "BZL_CONFIGS="
-      --build-arg "KEEP_SRC_OTB=true"
+      --build-arg BASE_IMAGE=ubuntu:20.04
+      --build-arg BZL_CONFIGS=
+      --build-arg KEEP_SRC_OTB=true
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From c5b5bc1889e7b2fd0ca055c40243f2d27982442c Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 20:57:28 +0200
Subject: [PATCH 20/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f60f4cf9..2cce1c6d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,6 +35,7 @@ Build the CI docker image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
     - docker info
+    - ls $PWD
     - >
       docker build
       --pull
-- 
GitLab


From af5addeccb8118623f6fc9ac7a52693178d02ae5 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:10:09 +0200
Subject: [PATCH 21/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2cce1c6d..380420ab 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -46,9 +46,7 @@ Build the CI docker image:
       --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
       --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
       --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-      --build-arg BASE_IMAGE=ubuntu:20.04
-      --build-arg BZL_CONFIGS=
-      --build-arg KEEP_SRC_OTB=true
+      --build-arg "BASE_IMAGE=ubuntu:20.04"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From 4db77eb700eb4b910c6ad40de71343ff0135a45d Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:10:56 +0200
Subject: [PATCH 22/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 380420ab..b4e2cb66 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,15 +38,9 @@ Build the CI docker image:
     - ls $PWD
     - >
       docker build
-      --pull
-      --cache-from $CI_REGISTRY_IMAGE:latest
-      --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
-      --label "org.opencontainers.image.url=$CI_PROJECT_URL"
-      --label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
-      --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
-      --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
-      --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
       --build-arg "BASE_IMAGE=ubuntu:20.04"
+      --build-arg BZL_CONFIGS=
+      --build-arg KEEP_SRC_OTB=true
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From f7035e02acc8fdd9dc89c58cc01988d5be733302 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:12:22 +0200
Subject: [PATCH 23/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b4e2cb66..331d96e9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,7 +38,15 @@ Build the CI docker image:
     - ls $PWD
     - >
       docker build
-      --build-arg "BASE_IMAGE=ubuntu:20.04"
+      --pull
+      --cache-from $CI_REGISTRY_IMAGE:latest
+      --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
+      --label "org.opencontainers.image.url=$CI_PROJECT_URL"
+      --label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
+      --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
+      --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
+      --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
+      --build-arg "BASE_IMAGE=gitlab-registry.irstea.fr/remi.cresson/otbtf/otbtf3.0:cpu-basic-dev"
       --build-arg BZL_CONFIGS=
       --build-arg KEEP_SRC_OTB=true
       .
-- 
GitLab


From 1cd2ee72036f9b5320ee9416d0950bb671c8bac5 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:14:30 +0200
Subject: [PATCH 24/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 331d96e9..98b2a596 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,8 +47,6 @@ Build the CI docker image:
       --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
       --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
       --build-arg "BASE_IMAGE=gitlab-registry.irstea.fr/remi.cresson/otbtf/otbtf3.0:cpu-basic-dev"
-      --build-arg BZL_CONFIGS=
-      --build-arg KEEP_SRC_OTB=true
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From d563001a8f64cf2632b501b9a3fbdca3ce743c3c Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:16:21 +0200
Subject: [PATCH 25/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 98b2a596..0814e42c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,6 +36,8 @@ Build the CI docker image:
   script:
     - docker info
     - ls $PWD
+    - docker run ubuntu:20.04 bash -c "echo 'Hello'"
+    - docker build .
     - >
       docker build
       --pull
-- 
GitLab


From daf4fd1c0eb4e2c8217f365c3d7f0a1b8b0d2a15 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:19:16 +0200
Subject: [PATCH 26/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 -
 Dockerfile     | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0814e42c..0fe610f9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,7 +37,6 @@ Build the CI docker image:
     - docker info
     - ls $PWD
     - docker run ubuntu:20.04 bash -c "echo 'Hello'"
-    - docker build .
     - >
       docker build
       --pull
diff --git a/Dockerfile b/Dockerfile
index 28ee7875..0c0d401a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,7 @@ ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-FROM $BASE_IMG AS otbtf-base
+FROM ${BASE_IMG} AS otbtf-base
 WORKDIR /tmp
 
 ### System packages
-- 
GitLab


From e88d916b420a2617efd626399d4dd24513253623 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:23:43 +0200
Subject: [PATCH 27/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 3 +--
 Dockerfile     | 3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0fe610f9..53307fb7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,6 @@ Build the CI docker image:
   script:
     - docker info
     - ls $PWD
-    - docker run ubuntu:20.04 bash -c "echo 'Hello'"
     - >
       docker build
       --pull
@@ -47,7 +46,7 @@ Build the CI docker image:
       --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
       --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
       --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-      --build-arg "BASE_IMAGE=gitlab-registry.irstea.fr/remi.cresson/otbtf/otbtf3.0:cpu-basic-dev"
+      --build-arg BASE_IMAGE="ubuntu:20.04"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
diff --git a/Dockerfile b/Dockerfile
index 0c0d401a..fdb48b1d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,8 @@ ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-FROM ${BASE_IMG} AS otbtf-base
+RUN echo $BASE_IMG
+FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
 
 ### System packages
-- 
GitLab


From f0533d241f9936fc6da9adb17b3eb8dd18fa1a2a Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:32:42 +0200
Subject: [PATCH 28/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 Dockerfile     | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 53307fb7..a8aea358 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,6 +36,7 @@ Build the CI docker image:
   script:
     - docker info
     - ls $PWD
+    - docker build --build-arg BASE_IMAGE=ubuntu:20.04 .
     - >
       docker build
       --pull
diff --git a/Dockerfile b/Dockerfile
index fdb48b1d..28ee7875 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,6 @@ ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-RUN echo $BASE_IMG
 FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
 
-- 
GitLab


From 4d66c9648a57a1f148219829ebd6db8ab43e7478 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:54:06 +0200
Subject: [PATCH 29/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a8aea358..84b47b59 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,9 +36,9 @@ Build the CI docker image:
   script:
     - docker info
     - ls $PWD
-    - docker build --build-arg BASE_IMAGE=ubuntu:20.04 .
+    - echo docker build --build-arg BASE_IMAGE=ubuntu:20.04 .
     - >
-      docker build
+      echo docker build
       --pull
       --cache-from $CI_REGISTRY_IMAGE:latest
       --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
-- 
GitLab


From d5d717b516e130dca409a8a60cdacc3242572013 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 21:57:10 +0200
Subject: [PATCH 30/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 84b47b59..3833e72c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,9 +36,9 @@ Build the CI docker image:
   script:
     - docker info
     - ls $PWD
-    - echo docker build --build-arg BASE_IMAGE=ubuntu:20.04 .
+    - docker build --build-arg BASE_IMAGE=abbcdef .
     - >
-      echo docker build
+      docker build
       --pull
       --cache-from $CI_REGISTRY_IMAGE:latest
       --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
-- 
GitLab


From d610853dd5691037d5d3e2a95ae6308ba4b397a6 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 22:11:44 +0200
Subject: [PATCH 31/93] WIP: use godzilla runner

---
 Dockerfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 28ee7875..489ef7cc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,8 +4,9 @@ ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-FROM $BASE_IMG AS otbtf-base
+FROM ubuntu:20.04 AS otbtf-base
 WORKDIR /tmp
+RUN echo $BASE_IMG
 
 ### System packages
 COPY tools/docker/build-deps-*.txt ./
-- 
GitLab


From 67ca132f9c03d9c75384e6027a2931175cfbac23 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 22:17:43 +0200
Subject: [PATCH 32/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 Dockerfile     | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3833e72c..3b0deb84 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,7 @@ Build the CI docker image:
   script:
     - docker info
     - ls $PWD
-    - docker build --build-arg BASE_IMAGE=abbcdef .
+    - docker build --build-arg "BASE_IMAGE=abbcdef" .
     - >
       docker build
       --pull
diff --git a/Dockerfile b/Dockerfile
index 489ef7cc..28ee7875 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,9 +4,8 @@ ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-FROM ubuntu:20.04 AS otbtf-base
+FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
-RUN echo $BASE_IMG
 
 ### System packages
 COPY tools/docker/build-deps-*.txt ./
-- 
GitLab


From 840b154c236274f64a6a323b32c35ebf40bf0c32 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 22:28:35 +0200
Subject: [PATCH 33/93] WIP: use godzilla runner

---
 Dockerfile | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 28ee7875..c17f0d6d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,6 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
 ## Mandatory
 ARG BASE_IMG
-
-# ----------------------------------------------------------------------------
-# Init base stage - will be cloned as intermediate build env
 FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
 
-- 
GitLab


From 9a89a612e35f4c5fe71d291522e0a92610440f47 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 22:32:29 +0200
Subject: [PATCH 34/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 Dockerfile     | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3b0deb84..42483646 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,7 @@ Build the CI docker image:
   script:
     - docker info
     - ls $PWD
-    - docker build --build-arg "BASE_IMAGE=abbcdef" .
+    - docker build --build-arg "BASE_IMAGE=ubuntu" .
     - >
       docker build
       --pull
diff --git a/Dockerfile b/Dockerfile
index c17f0d6d..28ee7875 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,9 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
 ## Mandatory
 ARG BASE_IMG
+
+# ----------------------------------------------------------------------------
+# Init base stage - will be cloned as intermediate build env
 FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
 
-- 
GitLab


From 47901c22629473302358c15b75f61ad766160d4e Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 22:51:28 +0200
Subject: [PATCH 35/93] WIP: use godzilla runner

---
 Dockerfile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 28ee7875..55ad17a4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,8 +4,11 @@ ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-FROM $BASE_IMG AS otbtf-base
+FROM ubuntu:20.04 AS otbtf-base
+
+#FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
+RUN echo $BASE_IMG > base_img
 
 ### System packages
 COPY tools/docker/build-deps-*.txt ./
-- 
GitLab


From 6f13c4688d74e2aa8cfb41ed0b5bcc6d6fa640f1 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 23:02:28 +0200
Subject: [PATCH 36/93] WIP: use godzilla runner

---
 .gitlab-ci.yml |  4 +++-
 Dockerfile     | 10 +++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 42483646..0bdbeae1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,7 +47,9 @@ Build the CI docker image:
       --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
       --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
       --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-      --build-arg BASE_IMAGE="ubuntu:20.04"
+      --build-arg OTBTESTS=true
+      --build-arg KEEP_SRC_OTB=true
+      --build-arg BZL_CONFIGS=""
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
diff --git a/Dockerfile b/Dockerfile
index 55ad17a4..01faf82c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,14 +1,11 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
 ## Mandatory
-ARG BASE_IMG
+ARG BASE_IMG=ubuntu:20.04
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-FROM ubuntu:20.04 AS otbtf-base
-
-#FROM $BASE_IMG AS otbtf-base
+FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
-RUN echo $BASE_IMG > base_img
 
 ### System packages
 COPY tools/docker/build-deps-*.txt ./
@@ -88,6 +85,7 @@ RUN git clone --single-branch -b $TF https://github.com/tensorflow/tensorflow.gi
 ### OTB
 ARG GUI=false
 ARG OTB=7.4.0
+ARG OTBTESTS=false
 
 RUN mkdir /src/otb
 WORKDIR /src/otb
@@ -105,6 +103,8 @@ RUN apt-get update -y \
       sed -i -r "s/-DOTB_USE_(QT|OPENGL|GL[UFE][WT])=OFF/-DOTB_USE_\1=ON/" ../build-flags-otb.txt; fi \
  # Possible ENH: superbuild-all-dependencies switch, with separated build-deps-minimal.txt and build-deps-otbcli.txt)
  #&& if $OTB_SUPERBUILD_ALL; then sed -i -r "s/-DUSE_SYSTEM_([A-Z0-9]*)=ON/-DUSE_SYSTEM_\1=OFF/ " ../build-flags-otb.txt; fi \
+ && if $OTBTESTS; then \
+      echo "-DBUILD_TESTING=ON" >> "../build-flags-otb.txt" \
  && OTB_FLAGS=$(cat "../build-flags-otb.txt") \
  && cmake ../otb/SuperBuild -DCMAKE_INSTALL_PREFIX=/opt/otbtf $OTB_FLAGS \
  && make -j $(python -c "import os; print(round( os.cpu_count() * $CPU_RATIO ))")
-- 
GitLab


From b001e3a3dc096c7f6e330dca5567ead0ca1625b4 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Wed, 20 Apr 2022 23:03:10 +0200
Subject: [PATCH 37/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0bdbeae1..eb55fe12 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,8 +35,6 @@ Build the CI docker image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
     - docker info
-    - ls $PWD
-    - docker build --build-arg "BASE_IMAGE=ubuntu" .
     - >
       docker build
       --pull
-- 
GitLab


From 29aee91bef11aa592f522083d4c95b0d1fd9982e Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:13:11 +0200
Subject: [PATCH 38/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 Dockerfile     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index eb55fe12..3f3576d5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ Build the CI docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
-  image: docker/compose:1.29.2
+  image: docker/compose:stable
   services:
     - name: docker:17.06.0-ce-dind
       alias: docker
diff --git a/Dockerfile b/Dockerfile
index 01faf82c..d701a81a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
 ## Mandatory
-ARG BASE_IMG=ubuntu:20.04
+ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-- 
GitLab


From 5230fe25519facb6d7312c7fad077fbe9e9764a4 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:20:14 +0200
Subject: [PATCH 39/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3f3576d5..9189d042 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ Build the CI docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
-  image: docker/compose:stable
+  image: docker/compose:18.09.06
   services:
     - name: docker:17.06.0-ce-dind
       alias: docker
-- 
GitLab


From d382e440aa02ef022bfe08b59a65fe003c0e383d Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:21:43 +0200
Subject: [PATCH 40/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9189d042..1ac4d143 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -22,7 +22,7 @@ Build the CI docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
-  image: docker/compose:18.09.06
+  image: docker/compose:latest
   services:
     - name: docker:17.06.0-ce-dind
       alias: docker
-- 
GitLab


From a9846a4ae1d59ae7d4f95d316caf6d078c911b67 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:26:15 +0200
Subject: [PATCH 41/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1ac4d143..1af7ec9f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,7 +25,7 @@ Build the CI docker image:
   image: docker/compose:latest
   services:
     - name: docker:17.06.0-ce-dind
-      alias: docker
+#      alias: docker
 
   before_script:
     # docker login asks for the password to be passed through stdin for security
-- 
GitLab


From c196a472f3f1a8008c00b55db36aa80fc84479ea Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:29:34 +0200
Subject: [PATCH 42/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1af7ec9f..8c9f1031 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,13 +18,13 @@ stages:
   - Test
   - Applications Test
 
-Build the CI docker image:
+cpu-basic-test image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
   image: docker/compose:latest
   services:
-    - name: docker:17.06.0-ce-dind
+    - name: docker:dind
 #      alias: docker
 
   before_script:
-- 
GitLab


From d974d071ab903ff81a7295c21fa9a92c72dcc14c Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:33:46 +0200
Subject: [PATCH 43/93] WIP: use godzilla runner

---
 Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index d701a81a..fb31bc52 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,6 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
 ## Mandatory
-ARG BASE_IMG
+ARG BASE_IMG=tototo123
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-- 
GitLab


From 6bc245f83ce68d400188a94d1b5adf42b94de5aa Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:36:57 +0200
Subject: [PATCH 44/93] WIP: use godzilla runner

---
 Dockerfile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index fb31bc52..e0c90f86 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,9 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
-## Mandatory
-ARG BASE_IMG=tototo123
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
+## Mandatory
+ARG BASE_IMG=tototo123
 FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
 
-- 
GitLab


From d8d74a3da6f69691f8de1fa021919a938ec5ff2b Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:38:33 +0200
Subject: [PATCH 45/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8c9f1031..8aaabb81 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,6 +48,7 @@ cpu-basic-test image:
       --build-arg OTBTESTS=true
       --build-arg KEEP_SRC_OTB=true
       --build-arg BZL_CONFIGS=""
+      --build-arg BASE_IMAGE="ubuntu:20.04"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From 01c3e2d59695ee720281ddbbcec5f4a21a219a1c Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:42:15 +0200
Subject: [PATCH 46/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 Dockerfile     | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8aaabb81..1793c069 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,6 +35,7 @@ cpu-basic-test image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
     - docker info
+    - docker build --build-arg BASE_IMAGE="ubuntu:20.04" .
     - >
       docker build
       --pull
diff --git a/Dockerfile b/Dockerfile
index e0c90f86..d701a81a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,9 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
+## Mandatory
+ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-## Mandatory
-ARG BASE_IMG=tototo123
 FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
 
-- 
GitLab


From 1c7927b47154df21960e8aee2379a992758cb72e Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:47:49 +0200
Subject: [PATCH 47/93] WIP: use godzilla runner

---
 Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index d701a81a..6cc56ff1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,7 @@ ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-FROM $BASE_IMG AS otbtf-base
+FROM ${BASE_IMG} AS otbtf-base
 WORKDIR /tmp
 
 ### System packages
-- 
GitLab


From 066ceeb6ce163ed4d5f925ac391a820b6bd2ceeb Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:50:55 +0200
Subject: [PATCH 48/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1793c069..7e52c090 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,6 +35,8 @@ cpu-basic-test image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
     - docker info
+    - docker version
+    - docker-compose version
     - docker build --build-arg BASE_IMAGE="ubuntu:20.04" .
     - >
       docker build
-- 
GitLab


From 7b4b3a8096c3d5a5aebed416c4bbe815da6bff9b Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 09:53:57 +0200
Subject: [PATCH 49/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7e52c090..ed44e51c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,20 +23,18 @@ cpu-basic-test image:
   allow_failure: false
   tags: [godzilla]
   image: docker/compose:latest
-  services:
-    - name: docker:dind
-#      alias: docker
+#  services:
+#    - name: docker:dind
 
   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
-    - docker info
-    - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
-  script:
     - docker info
     - docker version
     - docker-compose version
+    - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
+  script:
     - docker build --build-arg BASE_IMAGE="ubuntu:20.04" .
     - >
       docker build
-- 
GitLab


From fdee72e249bb0a35551bd1517be6799420167f8c Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:03:45 +0200
Subject: [PATCH 50/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 5 ++---
 Dockerfile     | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ed44e51c..c164e835 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,9 +23,8 @@ cpu-basic-test image:
   allow_failure: false
   tags: [godzilla]
   image: docker/compose:latest
-#  services:
-#    - name: docker:dind
-
+  services:
+    - name: docker:dind
   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
diff --git a/Dockerfile b/Dockerfile
index 6cc56ff1..62b0d3cf 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,7 @@ ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-FROM ${BASE_IMG} AS otbtf-base
+FROM BASE_IMG AS otbtf-base
 WORKDIR /tmp
 
 ### System packages
-- 
GitLab


From a3a8cad9079b004027502d46f54efd4df8078f13 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:07:04 +0200
Subject: [PATCH 51/93] WIP: use godzilla runner

---
 Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Dockerfile b/Dockerfile
index 62b0d3cf..d701a81a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,7 @@ ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
-FROM BASE_IMG AS otbtf-base
+FROM $BASE_IMG AS otbtf-base
 WORKDIR /tmp
 
 ### System packages
-- 
GitLab


From 796d4d493f8ff610b7259c7a580ce8938fd152b0 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:09:54 +0200
Subject: [PATCH 52/93] WIP: use godzilla runner

---
 Dockerfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Dockerfile b/Dockerfile
index d701a81a..69a3d352 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,6 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
 ## Mandatory
+ARG BASE_IMG=tototot123
 ARG BASE_IMG
 
 # ----------------------------------------------------------------------------
-- 
GitLab


From f0550368e25b55544fd2cf62a3eff6fb50419e93 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:14:00 +0200
Subject: [PATCH 53/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c164e835..cdef14c4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,6 +25,8 @@ cpu-basic-test image:
   image: docker/compose:latest
   services:
     - name: docker:dind
+  variables:
+    - BASE_IMAGE: "ubuntu:20.04"
   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
-- 
GitLab


From ed84d3022097cdd8de4291b61aaaf9ea8b0e08cd Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:14:26 +0200
Subject: [PATCH 54/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cdef14c4..141fcb3a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,7 +26,7 @@ cpu-basic-test image:
   services:
     - name: docker:dind
   variables:
-    - BASE_IMAGE: "ubuntu:20.04"
+    - BASE_IMAGE: ubuntu:20.04
   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
-- 
GitLab


From f4e1c18a1d3abd6a02aba54ab0c59b1be16fedb1 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:15:00 +0200
Subject: [PATCH 55/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 141fcb3a..1aeed61a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,7 +26,7 @@ cpu-basic-test image:
   services:
     - name: docker:dind
   variables:
-    - BASE_IMAGE: ubuntu:20.04
+    BASE_IMAGE: ubuntu:20.04
   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
-- 
GitLab


From 0554581c8c06e9c407d23ff2ed0113881e334855 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:16:15 +0200
Subject: [PATCH 56/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1aeed61a..36f2a88d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,7 @@ cpu-basic-test image:
     - docker-compose version
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
-    - docker build --build-arg BASE_IMAGE="ubuntu:20.04" .
+    - docker build .
     - >
       docker build
       --pull
-- 
GitLab


From bdd3a78b86f51da73d4b41d383ca4a97f44434c2 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:21:27 +0200
Subject: [PATCH 57/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 36f2a88d..73155c4d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,7 @@ cpu-basic-test image:
     - docker-compose version
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
-    - docker build .
+    - bash -c "docker build --build-arg BASE_IMAGE=ubuntu:20.04 ."
     - >
       docker build
       --pull
-- 
GitLab


From 29eac4b11dfe39c44aa672cea35aae28314325df Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:24:22 +0200
Subject: [PATCH 58/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 73155c4d..36f2a88d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,7 @@ cpu-basic-test image:
     - docker-compose version
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
-    - bash -c "docker build --build-arg BASE_IMAGE=ubuntu:20.04 ."
+    - docker build .
     - >
       docker build
       --pull
-- 
GitLab


From 8470424d5948e0cc7b4346f2f7cfa8a6bd4f43a8 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:25:41 +0200
Subject: [PATCH 59/93] WIP: use godzilla runner

---
 Dockerfile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 69a3d352..08cdfb75 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,8 +1,6 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
 ## Mandatory
 ARG BASE_IMG=tototot123
-ARG BASE_IMG
-
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
 FROM $BASE_IMG AS otbtf-base
-- 
GitLab


From 995159be228ed7824c076ad773a7656aa3681fc1 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:26:51 +0200
Subject: [PATCH 60/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 36f2a88d..c358a859 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,7 @@ cpu-basic-test image:
     - docker-compose version
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
-    - docker build .
+    - docker build --build-arg BASE_IMAGE=ubuntu:20.04 .
     - >
       docker build
       --pull
-- 
GitLab


From e54119e1436f64bad86d605fb5a55ff4e2276ee5 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:32:41 +0200
Subject: [PATCH 61/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c358a859..85bb7ade 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,6 +25,7 @@ cpu-basic-test image:
   image: docker/compose:latest
   services:
     - name: docker:dind
+      command: [dockerd, '-H', 'tcp://0.0.0.0:2375']
   variables:
     BASE_IMAGE: ubuntu:20.04
   before_script:
-- 
GitLab


From 85e000cef323997d1c0fc00aadf4107725c1ce1d Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:34:27 +0200
Subject: [PATCH 62/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 85bb7ade..ebbbefea 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,7 +37,8 @@ cpu-basic-test image:
     - docker-compose version
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
-    - docker build --build-arg BASE_IMAGE=ubuntu:20.04 .
+    - echo docker build --build-arg BASE_IMAGE=$BASE_IMAGE .
+    - docker build --build-arg BASE_IMAGE=$BASE_IMAGE .
     - >
       docker build
       --pull
-- 
GitLab


From a785b2d5a87e3240f61b48a2240794e8328b3a78 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:43:35 +0200
Subject: [PATCH 63/93] WIP: use godzilla runner

---
 .gitlab-ci.yml                             | 18 +-----------------
 tools/docker/docker_build_cpu-dev-tests.sh | 13 +++++++++++++
 2 files changed, 14 insertions(+), 17 deletions(-)
 create mode 100644 tools/docker/docker_build_cpu-dev-tests.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ebbbefea..42e960a9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,23 +37,7 @@ cpu-basic-test image:
     - docker-compose version
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
-    - echo docker build --build-arg BASE_IMAGE=$BASE_IMAGE .
-    - docker build --build-arg BASE_IMAGE=$BASE_IMAGE .
-    - >
-      docker build
-      --pull
-      --cache-from $CI_REGISTRY_IMAGE:latest
-      --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
-      --label "org.opencontainers.image.url=$CI_PROJECT_URL"
-      --label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
-      --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
-      --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
-      --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-      --build-arg OTBTESTS=true
-      --build-arg KEEP_SRC_OTB=true
-      --build-arg BZL_CONFIGS=""
-      --build-arg BASE_IMAGE="ubuntu:20.04"
-      .
+    - tools/docker/./docker_build_cpu-dev-tests.sh
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
     - docker push $CI_REGISTRY_IMAGE:cpu-basic-test
diff --git a/tools/docker/docker_build_cpu-dev-tests.sh b/tools/docker/docker_build_cpu-dev-tests.sh
new file mode 100644
index 00000000..c4f9ae2f
--- /dev/null
+++ b/tools/docker/docker_build_cpu-dev-tests.sh
@@ -0,0 +1,13 @@
+docker build \
+--pull \
+--cache-from $CI_REGISTRY_IMAGE:latest \
+--label "org.opencontainers.image.title=$CI_PROJECT_TITLE" \
+--label "org.opencontainers.image.url=$CI_PROJECT_URL" \
+--label "org.opencontainers.image.created=$CI_JOB_STARTED_AT" \
+--label "org.opencontainers.image.revision=$CI_COMMIT_SHA" \
+--label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME" \
+--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME \
+--build-arg OTBTESTS=true \
+--build-arg BZL_CONFIGS="" \
+--build-arg BASE_IMAGE="ubuntu:20.04" \
+.
\ No newline at end of file
-- 
GitLab


From 1008a74e361396ee53ffd318dc4d5a989ce6fa3c Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:45:46 +0200
Subject: [PATCH 64/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 42e960a9..7544c918 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -37,7 +37,7 @@ cpu-basic-test image:
     - docker-compose version
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
-    - tools/docker/./docker_build_cpu-dev-tests.sh
+    - sh tools/docker/docker_build_cpu-dev-tests.sh
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
     - docker push $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From 8d7132776cbf795f23793dedb680af982d548eca Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:48:32 +0200
Subject: [PATCH 65/93] WIP: use godzilla runner

---
 .gitlab-ci.yml                             | 3 ---
 tools/docker/docker_build_cpu-dev-tests.sh | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7544c918..7febdc25 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,9 +25,6 @@ cpu-basic-test image:
   image: docker/compose:latest
   services:
     - name: docker:dind
-      command: [dockerd, '-H', 'tcp://0.0.0.0:2375']
-  variables:
-    BASE_IMAGE: ubuntu:20.04
   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
diff --git a/tools/docker/docker_build_cpu-dev-tests.sh b/tools/docker/docker_build_cpu-dev-tests.sh
index c4f9ae2f..1b82f51b 100644
--- a/tools/docker/docker_build_cpu-dev-tests.sh
+++ b/tools/docker/docker_build_cpu-dev-tests.sh
@@ -1,4 +1,4 @@
-docker build \
+echo docker build \
 --pull \
 --cache-from $CI_REGISTRY_IMAGE:latest \
 --label "org.opencontainers.image.title=$CI_PROJECT_TITLE" \
-- 
GitLab


From 44b6f567ece3e5dd612d0e8f661eb6c2d9657bf7 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:53:12 +0200
Subject: [PATCH 66/93] WIP: use godzilla runner

---
 tools/docker/docker_build_cpu-dev-tests.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/docker/docker_build_cpu-dev-tests.sh b/tools/docker/docker_build_cpu-dev-tests.sh
index 1b82f51b..1cf22847 100644
--- a/tools/docker/docker_build_cpu-dev-tests.sh
+++ b/tools/docker/docker_build_cpu-dev-tests.sh
@@ -1,4 +1,5 @@
-echo docker build \
+docker build --help
+docker build \
 --pull \
 --cache-from $CI_REGISTRY_IMAGE:latest \
 --label "org.opencontainers.image.title=$CI_PROJECT_TITLE" \
-- 
GitLab


From 7e1d50a5896b48b1c6aa5c40921d59e3a1fd5169 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:55:05 +0200
Subject: [PATCH 67/93] WIP: use godzilla runner

---
 tools/docker/docker_build_cpu-dev-tests.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/docker/docker_build_cpu-dev-tests.sh b/tools/docker/docker_build_cpu-dev-tests.sh
index 1cf22847..623d076d 100644
--- a/tools/docker/docker_build_cpu-dev-tests.sh
+++ b/tools/docker/docker_build_cpu-dev-tests.sh
@@ -1,5 +1,6 @@
 docker build --help
 docker build \
+--no-cache \
 --pull \
 --cache-from $CI_REGISTRY_IMAGE:latest \
 --label "org.opencontainers.image.title=$CI_PROJECT_TITLE" \
-- 
GitLab


From b433a51dcc59d82f859fd1a7df83023cfa31d4c1 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 10:56:45 +0200
Subject: [PATCH 68/93] WIP: use godzilla runner

---
 tools/docker/docker_build_cpu-dev-tests.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/docker/docker_build_cpu-dev-tests.sh b/tools/docker/docker_build_cpu-dev-tests.sh
index 623d076d..b5501a32 100644
--- a/tools/docker/docker_build_cpu-dev-tests.sh
+++ b/tools/docker/docker_build_cpu-dev-tests.sh
@@ -1,5 +1,5 @@
 docker build --help
-docker build \
+docker build . \
 --no-cache \
 --pull \
 --cache-from $CI_REGISTRY_IMAGE:latest \
@@ -11,5 +11,4 @@ docker build \
 --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME \
 --build-arg OTBTESTS=true \
 --build-arg BZL_CONFIGS="" \
---build-arg BASE_IMAGE="ubuntu:20.04" \
-.
\ No newline at end of file
+--build-arg BASE_IMAGE="ubuntu:20.04"
\ No newline at end of file
-- 
GitLab


From c7a50fea020b245b08028ec24bf83c3d7a069b50 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 12:16:29 +0200
Subject: [PATCH 69/93] WIP: use godzilla runner

---
 .gitlab-ci.yml                             | 21 ++++++++++++++-------
 Dockerfile                                 |  6 ++----
 tools/docker/docker_build_cpu-dev-tests.sh | 14 --------------
 3 files changed, 16 insertions(+), 25 deletions(-)
 delete mode 100644 tools/docker/docker_build_cpu-dev-tests.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7febdc25..e74c91a6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,15 +26,22 @@ cpu-basic-test image:
   services:
     - name: docker:dind
   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
-    - docker info
-    - docker version
-    - docker-compose version
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   script:
-    - sh tools/docker/docker_build_cpu-dev-tests.sh
+    - >
+      docker build
+      --pull
+      --cache-from $CI_REGISTRY_IMAGE:latest
+      --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
+      --label "org.opencontainers.image.url=$CI_PROJECT_URL"
+      --label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
+      --label "org.opencontainers.image.revision=$CI_COMMIT_SHA"
+      --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
+      --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
+      --build-arg OTBTESTS="true"
+      --build-arg BZL_CONFIGS=""
+      --build-arg BASE_IMG="ubuntu:20.04"
+      .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
     - docker push $CI_REGISTRY_IMAGE:cpu-basic-test
diff --git a/Dockerfile b/Dockerfile
index 08cdfb75..28ee7875 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,7 @@
 ##### Configurable Dockerfile with multi-stage build - Author: Vincent Delbar
 ## Mandatory
-ARG BASE_IMG=tototot123
+ARG BASE_IMG
+
 # ----------------------------------------------------------------------------
 # Init base stage - will be cloned as intermediate build env
 FROM $BASE_IMG AS otbtf-base
@@ -84,7 +85,6 @@ RUN git clone --single-branch -b $TF https://github.com/tensorflow/tensorflow.gi
 ### OTB
 ARG GUI=false
 ARG OTB=7.4.0
-ARG OTBTESTS=false
 
 RUN mkdir /src/otb
 WORKDIR /src/otb
@@ -102,8 +102,6 @@ RUN apt-get update -y \
       sed -i -r "s/-DOTB_USE_(QT|OPENGL|GL[UFE][WT])=OFF/-DOTB_USE_\1=ON/" ../build-flags-otb.txt; fi \
  # Possible ENH: superbuild-all-dependencies switch, with separated build-deps-minimal.txt and build-deps-otbcli.txt)
  #&& if $OTB_SUPERBUILD_ALL; then sed -i -r "s/-DUSE_SYSTEM_([A-Z0-9]*)=ON/-DUSE_SYSTEM_\1=OFF/ " ../build-flags-otb.txt; fi \
- && if $OTBTESTS; then \
-      echo "-DBUILD_TESTING=ON" >> "../build-flags-otb.txt" \
  && OTB_FLAGS=$(cat "../build-flags-otb.txt") \
  && cmake ../otb/SuperBuild -DCMAKE_INSTALL_PREFIX=/opt/otbtf $OTB_FLAGS \
  && make -j $(python -c "import os; print(round( os.cpu_count() * $CPU_RATIO ))")
diff --git a/tools/docker/docker_build_cpu-dev-tests.sh b/tools/docker/docker_build_cpu-dev-tests.sh
deleted file mode 100644
index b5501a32..00000000
--- a/tools/docker/docker_build_cpu-dev-tests.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-docker build --help
-docker build . \
---no-cache \
---pull \
---cache-from $CI_REGISTRY_IMAGE:latest \
---label "org.opencontainers.image.title=$CI_PROJECT_TITLE" \
---label "org.opencontainers.image.url=$CI_PROJECT_URL" \
---label "org.opencontainers.image.created=$CI_JOB_STARTED_AT" \
---label "org.opencontainers.image.revision=$CI_COMMIT_SHA" \
---label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME" \
---tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME \
---build-arg OTBTESTS=true \
---build-arg BZL_CONFIGS="" \
---build-arg BASE_IMAGE="ubuntu:20.04"
\ No newline at end of file
-- 
GitLab


From c34366b1c4de05657299bc80bc513792d3382b53 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 13:54:39 +0200
Subject: [PATCH 70/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e74c91a6..393c0bdd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -27,6 +27,7 @@ cpu-basic-test image:
     - name: docker:dind
   before_script:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
+  timeout: 10 hours
   script:
     - >
       docker build
-- 
GitLab


From 02ec7da70e69aa754f3fd88cc316ef951642d9d4 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 15:46:58 +0200
Subject: [PATCH 71/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 393c0bdd..1f47299e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -40,6 +40,7 @@ cpu-basic-test image:
       --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
       --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
       --build-arg OTBTESTS="true"
+      --build-arg KEEP_OTB_SRC="true"
       --build-arg BZL_CONFIGS=""
       --build-arg BASE_IMG="ubuntu:20.04"
       .
-- 
GitLab


From ce9c972ff2553102f38ee909de486cf6185bcad4 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 15:49:32 +0200
Subject: [PATCH 72/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1f47299e..ea2ed507 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -32,7 +32,7 @@ cpu-basic-test image:
     - >
       docker build
       --pull
-      --cache-from $CI_REGISTRY_IMAGE:latest
+      --cache-from $CI_REGISTRY_IMAGE:cpu-basic-test
       --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
       --label "org.opencontainers.image.url=$CI_PROJECT_URL"
       --label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
-- 
GitLab


From 3e9b5c3cfced4ca27bab3b32478b2d0bdfd3ded2 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 16:16:09 +0200
Subject: [PATCH 73/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ea2ed507..9ceb3937 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,6 +29,7 @@ cpu-basic-test image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   timeout: 10 hours
   script:
+    - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test
     - >
       docker build
       --pull
-- 
GitLab


From 6b13b3b544f44abcd0460b03da1d5be03c5b42d5 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 16:35:00 +0200
Subject: [PATCH 74/93] WIP: use godzilla runner

---
 README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.md b/README.md
index d1993d5b..343c4863 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,7 @@
 # OTBTF: Orfeo ToolBox meets TensorFlow
 
 [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
+[![pipeline status](https://gitlab.irstea.fr/remi.cresson/otbtf/badges/develop/pipeline.svg)](https://gitlab.irstea.fr/remi.cresson/otbtf/-/commits/develop)
 
 This remote module of the [Orfeo ToolBox](https://www.orfeo-toolbox.org) provides a generic, multi purpose deep learning framework, targeting remote sensing images processing.
 It contains a set of new process objects that internally invoke [Tensorflow](https://www.tensorflow.org/), and a bunch of user-oriented applications to perform deep learning with real-world remote sensing images.
-- 
GitLab


From 30c277e03283810f02ad01b9804c1b2205666361 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 18:09:17 +0200
Subject: [PATCH 75/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9ceb3937..fe55016f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -33,6 +33,7 @@ cpu-basic-test image:
     - >
       docker build
       --pull
+      --network="host"
       --cache-from $CI_REGISTRY_IMAGE:cpu-basic-test
       --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
       --label "org.opencontainers.image.url=$CI_PROJECT_URL"
-- 
GitLab


From 859e9fb47df1b4806c05ce29848aefa7ac706901 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 18:23:11 +0200
Subject: [PATCH 76/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index fe55016f..5e525bed 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,6 +30,7 @@ cpu-basic-test image:
   timeout: 10 hours
   script:
     - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test
+    - wget http://localhost:9090/status
     - >
       docker build
       --pull
@@ -45,6 +46,7 @@ cpu-basic-test image:
       --build-arg KEEP_OTB_SRC="true"
       --build-arg BZL_CONFIGS=""
       --build-arg BASE_IMG="ubuntu:20.04"
+      --build-arg BZL_OPTIONS="--verbose_failures --remote_cache=http://localhost:9090"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From fb691055653247ae4404c29dabb03523f69c5952 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 18:25:18 +0200
Subject: [PATCH 77/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5e525bed..749cf50a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,8 +29,8 @@ cpu-basic-test image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   timeout: 10 hours
   script:
+    - wget http://127.0.0.1:9090/status
     - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test
-    - wget http://localhost:9090/status
     - >
       docker build
       --pull
-- 
GitLab


From 14b8456c3c52d12523db683ddb754ca4f838ebb0 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 18:27:32 +0200
Subject: [PATCH 78/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 749cf50a..75a40a10 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,7 +29,7 @@ cpu-basic-test image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   timeout: 10 hours
   script:
-    - wget http://127.0.0.1:9090/status
+    - wget http://docker:9090/status
     - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test
     - >
       docker build
-- 
GitLab


From 2bc2672022b17b0822e023a265c2a9b27856accf Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 18:35:09 +0200
Subject: [PATCH 79/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 75a40a10..2b3e57f2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,7 +29,7 @@ cpu-basic-test image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   timeout: 10 hours
   script:
-    - wget http://docker:9090/status
+    - wget http://localhost:9090/status
     - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test
     - >
       docker build
@@ -46,7 +46,6 @@ cpu-basic-test image:
       --build-arg KEEP_OTB_SRC="true"
       --build-arg BZL_CONFIGS=""
       --build-arg BASE_IMG="ubuntu:20.04"
-      --build-arg BZL_OPTIONS="--verbose_failures --remote_cache=http://localhost:9090"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
     - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From 6504a690084c08243c3791ce8fefa2e6fa6e4561 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 19:57:18 +0200
Subject: [PATCH 80/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2b3e57f2..2d44501f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,12 +30,14 @@ cpu-basic-test image:
   timeout: 10 hours
   script:
     - wget http://localhost:9090/status
-    - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test
+    - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME || :
+    - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test || :
     - >
       docker build
       --pull
       --network="host"
       --cache-from $CI_REGISTRY_IMAGE:cpu-basic-test
+      --cache-from $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
       --label "org.opencontainers.image.title=$CI_PROJECT_TITLE"
       --label "org.opencontainers.image.url=$CI_PROJECT_URL"
       --label "org.opencontainers.image.created=$CI_JOB_STARTED_AT"
@@ -48,8 +50,8 @@ cpu-basic-test image:
       --build-arg BASE_IMG="ubuntu:20.04"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-    - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-    - docker push $CI_REGISTRY_IMAGE:cpu-basic-test
+#    - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
+#    - docker push $CI_REGISTRY_IMAGE:cpu-basic-test
 
 .static_analysis_base:
   stage: Static Analysis
-- 
GitLab


From 5d04d86b39ee87a3d10a917ad76109a808fc147a Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 20:02:10 +0200
Subject: [PATCH 81/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2d44501f..68748f09 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,9 +29,8 @@ cpu-basic-test image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   timeout: 10 hours
   script:
-    - wget http://localhost:9090/status
-    - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME || :
-    - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test || :
+    - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME ||
+    - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test || 
     - >
       docker build
       --pull
-- 
GitLab


From 55c1375a7f9316c381d5891d8fd5a640322209f7 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 21:28:17 +0200
Subject: [PATCH 82/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 68748f09..81efee65 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -44,7 +44,7 @@ cpu-basic-test image:
       --label "org.opencontainers.image.version=$CI_COMMIT_REF_NAME"
       --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
       --build-arg OTBTESTS="true"
-      --build-arg KEEP_OTB_SRC="true"
+      --build-arg KEEP_SRC_OTB="true"
       --build-arg BZL_CONFIGS=""
       --build-arg BASE_IMG="ubuntu:20.04"
       .
-- 
GitLab


From dde281eaa79229b30ed9a4cf0d4535358dda44cc Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Thu, 21 Apr 2022 21:36:50 +0200
Subject: [PATCH 83/93] WIP: use godzilla runner

---
 Dockerfile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Dockerfile b/Dockerfile
index 28ee7875..4a4d3ab7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -85,6 +85,7 @@ RUN git clone --single-branch -b $TF https://github.com/tensorflow/tensorflow.gi
 ### OTB
 ARG GUI=false
 ARG OTB=7.4.0
+ARG OTBTESTS=false
 
 RUN mkdir /src/otb
 WORKDIR /src/otb
@@ -97,6 +98,8 @@ RUN apt-get update -y \
  && git clone --single-branch -b $OTB https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb.git \
  && mkdir -p build \
  && cd build \
+ && if $OTBTESTS; then \
+      echo "-DBUILD_TESTING=ON" >> ../build-flags-otb.txt; fi \
  # Set GL/Qt build flags
  && if $GUI; then \
       sed -i -r "s/-DOTB_USE_(QT|OPENGL|GL[UFE][WT])=OFF/-DOTB_USE_\1=ON/" ../build-flags-otb.txt; fi \
-- 
GitLab


From 7fb41f987d21b0c3a23795f96806a22222f9a523 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 08:29:49 +0200
Subject: [PATCH 84/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 81efee65..bae051cc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: $CI_REGISTRY_IMAGE:cpu-basic-test
+image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
 
 variables:
     OTB_BUILD: /src/otb/build/OTB/build  # Local OTB build directory
@@ -18,7 +18,7 @@ stages:
   - Test
   - Applications Test
 
-cpu-basic-test image:
+test docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
-- 
GitLab


From 1d55b2ea21bd6c96ac1016cfdf542b6b3a6882f0 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 08:39:17 +0200
Subject: [PATCH 85/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bae051cc..e4973ff3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,8 +10,7 @@ variables:
 workflow:
   rules:
     - if: $CI_MERGE_REQUEST_ID             # Execute jobs in merge request context
-    - if: $CI_COMMIT_BRANCH == 'develop'   # Execute jobs when a new commit is pushed to develop branch
-    
+
 stages:
   - Build
   - Static Analysis
@@ -49,8 +48,6 @@ test docker image:
       --build-arg BASE_IMG="ubuntu:20.04"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-#    - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
-#    - docker push $CI_REGISTRY_IMAGE:cpu-basic-test
 
 .static_analysis_base:
   stage: Static Analysis
@@ -126,3 +123,11 @@ sr4rs:
     - git clone https://github.com/remicres/sr4rs.git
     - export PYTHONPATH=$PYTHONPATH:$PWD/sr4rs
     - python -m pytest --junitxml=$ARTIFACT_TEST_DIR/report_sr4rs.xml $OTBTF_SRC/test/sr4rs_unittest.py
+
+deploy:
+  only:
+    - master
+  script:
+    - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
+    - docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:cpu-basic-test
+    - docker push $CI_REGISTRY_IMAGE:cpu-basic-test
-- 
GitLab


From 3315b2bc8cf5cdd63c92ce9bf2154eb4bea6e09a Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 08:39:58 +0200
Subject: [PATCH 86/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e4973ff3..eb4f1c04 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,6 +16,7 @@ stages:
   - Static Analysis
   - Test
   - Applications Test
+  - deploy
 
 test docker image:
   stage: Build
-- 
GitLab


From f9928f24b4905bb4ccec18250e47e9816183fe21 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 08:45:16 +0200
Subject: [PATCH 87/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index eb4f1c04..5f0cdd41 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -16,13 +16,15 @@ stages:
   - Static Analysis
   - Test
   - Applications Test
-  - deploy
+  - Ship
 
 test docker image:
   stage: Build
   allow_failure: false
   tags: [godzilla]
   image: docker/compose:latest
+  except:
+    - master
   services:
     - name: docker:dind
   before_script:
@@ -126,6 +128,7 @@ sr4rs:
     - python -m pytest --junitxml=$ARTIFACT_TEST_DIR/report_sr4rs.xml $OTBTF_SRC/test/sr4rs_unittest.py
 
 deploy:
+  stage: Ship
   only:
     - master
   script:
-- 
GitLab


From fb8ea9dd621bb4ecf93ef35d85deb906edf10a9a Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 08:53:32 +0200
Subject: [PATCH 88/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5f0cdd41..33398d14 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -49,6 +49,7 @@ test docker image:
       --build-arg KEEP_SRC_OTB="true"
       --build-arg BZL_CONFIGS=""
       --build-arg BASE_IMG="ubuntu:20.04"
+      --build-arg BZL_OPTIONS="--verbose_failures --output_user_root=/bzl_cache"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
 
-- 
GitLab


From bce03638a995ffbc36bb46e62d41a491093a9c07 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 09:19:11 +0200
Subject: [PATCH 89/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 3 ++-
 Dockerfile     | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 33398d14..14eb7285 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -49,7 +49,8 @@ test docker image:
       --build-arg KEEP_SRC_OTB="true"
       --build-arg BZL_CONFIGS=""
       --build-arg BASE_IMG="ubuntu:20.04"
-      --build-arg BZL_OPTIONS="--verbose_failures --output_user_root=/bzl_cache"
+      --build-arg BZL_PRE="--output_user_root=/bzl_cache"
+      --build-arg BZL_OPTIONS="--verbose_failures"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
 
diff --git a/Dockerfile b/Dockerfile
index 4a4d3ab7..ee05b7a0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -51,6 +51,8 @@ ARG BZL_TARGETS="//tensorflow:libtensorflow_cc.so //tensorflow/tools/pip_package
 ARG BZL_CONFIGS="--config=nogcp --config=noaws --config=nohdfs --config=opt"
 # "--compilation_mode opt" is already enabled by default (see tf repo .bazelrc and configure.py)
 ARG BZL_OPTIONS="--verbose_failures --remote_cache=http://localhost:9090"
+# options between "bazel" and "build" directive
+ARG BZL_PRE=""
 
 # Build
 ARG ZIP_TF_BIN=false
@@ -63,7 +65,7 @@ RUN git clone --single-branch -b $TF https://github.com/tensorflow/tensorflow.gi
       source ../build-env-tf.sh \
       && ./configure \
       && export TMP=/tmp/bazel \
-      && BZL_CMD="build $BZL_TARGETS $BZL_CONFIGS $BZL_OPTIONS" \
+      && BZL_CMD="$BZL_PRE build $BZL_TARGETS $BZL_CONFIGS $BZL_OPTIONS" \
       && bazel $BZL_CMD --jobs="HOST_CPUS*$CPU_RATIO" ' \
 # Installation - split here if you want to check files  ^
 #RUN cd tensorflow \
-- 
GitLab


From a7a38bb1073cbfd1ca80411c8a7696529472d003 Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 09:29:07 +0200
Subject: [PATCH 90/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 14eb7285..39c92082 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -49,7 +49,7 @@ test docker image:
       --build-arg KEEP_SRC_OTB="true"
       --build-arg BZL_CONFIGS=""
       --build-arg BASE_IMG="ubuntu:20.04"
-      --build-arg BZL_PRE="--output_user_root=/bzl_cache"
+      --build-arg BZL_PRE="--output_user_root=/bzl_cache/cache"
       --build-arg BZL_OPTIONS="--verbose_failures"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
-- 
GitLab


From 54e6939e1ec2d1e26397c4c1364d9af6a1cb3d1e Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 11:18:22 +0200
Subject: [PATCH 91/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 39c92082..6e7e8491 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -31,6 +31,9 @@ test docker image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   timeout: 10 hours
   script:
+    - ls /
+    - ls /bzl_cache/
+    - ls /bzl_cache/cache
     - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME ||
     - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test || 
     - >
-- 
GitLab


From e5c9d0f1a9865328d89db2402bad9ece0fba599b Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 11:27:16 +0200
Subject: [PATCH 92/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6e7e8491..cef7e838 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -31,9 +31,8 @@ test docker image:
     - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
   timeout: 10 hours
   script:
-    - ls /
-    - ls /bzl_cache/
-    - ls /bzl_cache/cache
+    - ls -ll /
+    - ls -ll /bzl_cache/
     - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME ||
     - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test || 
     - >
-- 
GitLab


From 1e405a044724936d1dfee5ab690a66beb0f0795e Mon Sep 17 00:00:00 2001
From: Remi Cresson <remi.cresson@irstea.fr>
Date: Fri, 22 Apr 2022 11:47:14 +0200
Subject: [PATCH 93/93] WIP: use godzilla runner

---
 .gitlab-ci.yml | 3 +--
 Dockerfile     | 4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cef7e838..798ece96 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -33,6 +33,7 @@ test docker image:
   script:
     - ls -ll /
     - ls -ll /bzl_cache/
+    - touch /bzl_cache/toto
     - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME ||
     - docker pull $CI_REGISTRY_IMAGE:cpu-basic-test || 
     - >
@@ -51,8 +52,6 @@ test docker image:
       --build-arg KEEP_SRC_OTB="true"
       --build-arg BZL_CONFIGS=""
       --build-arg BASE_IMG="ubuntu:20.04"
-      --build-arg BZL_PRE="--output_user_root=/bzl_cache/cache"
-      --build-arg BZL_OPTIONS="--verbose_failures"
       .
     - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
 
diff --git a/Dockerfile b/Dockerfile
index ee05b7a0..4a4d3ab7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -51,8 +51,6 @@ ARG BZL_TARGETS="//tensorflow:libtensorflow_cc.so //tensorflow/tools/pip_package
 ARG BZL_CONFIGS="--config=nogcp --config=noaws --config=nohdfs --config=opt"
 # "--compilation_mode opt" is already enabled by default (see tf repo .bazelrc and configure.py)
 ARG BZL_OPTIONS="--verbose_failures --remote_cache=http://localhost:9090"
-# options between "bazel" and "build" directive
-ARG BZL_PRE=""
 
 # Build
 ARG ZIP_TF_BIN=false
@@ -65,7 +63,7 @@ RUN git clone --single-branch -b $TF https://github.com/tensorflow/tensorflow.gi
       source ../build-env-tf.sh \
       && ./configure \
       && export TMP=/tmp/bazel \
-      && BZL_CMD="$BZL_PRE build $BZL_TARGETS $BZL_CONFIGS $BZL_OPTIONS" \
+      && BZL_CMD="build $BZL_TARGETS $BZL_CONFIGS $BZL_OPTIONS" \
       && bazel $BZL_CMD --jobs="HOST_CPUS*$CPU_RATIO" ' \
 # Installation - split here if you want to check files  ^
 #RUN cd tensorflow \
-- 
GitLab