From 620f56e0dc75c2b6fd465288bb8de03db4b6a23a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?I=C3=B1igo=20Moreno?= <inigo.moreno@tecnalia.com>
Date: Tue, 26 Oct 2021 13:24:51 +0200
Subject: [PATCH] Update documentation

---
 README.adoc              |  8 --------
 ci-templates/README.adoc | 15 ++++++++++-----
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/README.adoc b/README.adoc
index eb4ff72..c8d344e 100644
--- a/README.adoc
+++ b/README.adoc
@@ -9,11 +9,3 @@ include::ci-templates/README.adoc[leveloffset=+1]
 == Custom `rosdep` definitions
 
 Custom `rosdep` definitions for the packages hosted in our internal debian repository are declared in link:rosdistro/rosdep_tecnalia.yaml[].
-
-== Deployment image build resources
-
-Resources required for building the deployment docker images are also hosted in this repository.
-This basically boils down to:
-
-- link:scripts/pre-deploy-cleanup.bash[] is run in the `.industrial_ci_deploy` template before commiting to an image
-- link:deploy/Dockerfile[] is used to perform some additional cleanup and install link:deploy/ros_entrypoint.bash[] as entrypoint script on top of the `industrial_ci` image
diff --git a/ci-templates/README.adoc b/ci-templates/README.adoc
index f99eb2c..8d0e995 100644
--- a/ci-templates/README.adoc
+++ b/ci-templates/README.adoc
@@ -17,11 +17,14 @@ The Core pipeline, defined in link:ci-templates/core.yml[], has the following st
     ** If the package has `.rosinstall` dependencies, they can be installed using the variable `UPSTREAM_WORKSPACE`
     ** Uses `flexbotics-base-devel:${ROS_DISTRO}` as a starting image
     ** Runs link:scripts/ci_run_entry_points.sh[] in the `AFTER_SETUP_TARGET_WORKSPACE` stage, which in turn finds and runs every `ci_entry_script.bash` script found in the target repo.
-  * `.industrial_ci_deploy` template, which:
-    ** Runs `industrial_ci` by extending `.industrial_ci`
-    ** Runs some cleanup in the `industrial_ci` context (e.g. delete sources)
-    ** Commits image used by `industrial_ci`
-    ** Builds deployment image on top of it and push it to our registry
+- Stage: `deploy`
+  * `.ddeploy` template (see https://git.code.tecnalia.com/tecnalia_robotics/flexbotics/flexbotics_utils/ddeploy[the ddeploy repo]), which:
+    ** Is run automatically for tags, but can also be run manually on normal commits
+    ** Calls `ddeploy` to generate the docker image
+    ** Renames the image created by ddeploy with different tags and pushes them to the registry.
+    *** Tag `${COMMIT_SHA}` (hash of commit)
+    *** Tag `${CI_COMMIT_REF_SLUG}` (branch or tag name)
+    *** Tag `latest` only on the default branch
 - Stage: `.post`
   * Check `bash`/`sh` script syntax
   * Check Markdown and AsciiDoc syntax
@@ -52,6 +55,8 @@ The auto rules also allow for using variables to explicitely activate each job:
 include::examples/build_vars.yml[]
 ```
 
+If a `ddeploy.yaml` file exists, the auto-rules will add a job extending the `.ddeploy` template defined 
+
 == LFS
 By default, lfs files are not downloaded. If you need to add LFS, include the link:ci-templates/lfs-pull.yml[] along with anything else:
 ```yml
-- 
GitLab