Commit 61c8b9b9 authored by Jon Azpiazu's avatar Jon Azpiazu

Merge branch 'deploy-image-build' into 'master'

Deploy image build

Closes #7

See merge request !16
parents 670d751e 8228b2a3
......@@ -15,7 +15,7 @@ stages:
before_script:
- apk add --update bash coreutils tar wget python
industrial_ci_kinetic:
.industrial_ci_kinetic:
stage: build
before_script:
- apk add --update bash coreutils tar
......@@ -30,6 +30,27 @@ industrial_ci_kinetic:
CATKIN_CONFIG: '--cmake-args -DCMAKE_CXX_FLAGS=-Wno-ignored-attributes -Wno-int-in-bool-context --'
when: always
industrial_ci_kinetic:
extends: .industrial_ci_kinetic
except:
- tags
industrial_ci_kinetic_deploy:
extends: .industrial_ci_kinetic
variables:
AFTER_SCRIPT: "wget -q -O - https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/deploy-image-build/scripts/pre-deploy-cleanup.bash | bash"
DOCKER_COMMIT: industrial_ci_image
script:
- .ci_config/gitlab.sh
- cd $(mktemp -d)
- wget https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/deploy-image-build/deploy/Dockerfile
- wget https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/deploy-image-build/deploy/ros_entrypoint.bash
- chmod a+x ros_entrypoint.bash
- docker build -t ${ARTIFACT_DOCKER_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME} .
- docker push ${ARTIFACT_DOCKER_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME}
only:
- tags
##########################################################
## Simple check for basic Python syntax errors; this is much less thorough than
## other options like pylint, but much faster and less strict
......
......@@ -15,7 +15,7 @@ stages:
before_script:
- apk add --update bash coreutils tar wget python
industrial_ci_kinetic:
.industrial_ci_kinetic:
stage: build
before_script:
- apk add --update bash coreutils tar
......@@ -32,6 +32,27 @@ industrial_ci_kinetic:
CATKIN_CONFIG: '--cmake-args -DCMAKE_CXX_FLAGS=-Wno-ignored-attributes -Wno-int-in-bool-context --'
when: always
industrial_ci_kinetic:
extends: .industrial_ci_kinetic
except:
- tags
industrial_ci_kinetic_deploy:
extends: .industrial_ci_kinetic
variables:
AFTER_SCRIPT: "wget -q -O - https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/deploy-image-build/scripts/pre-deploy-cleanup.bash | bash"
DOCKER_COMMIT: industrial_ci_image
script:
- .ci_config/gitlab.sh
- cd $(mktemp -d)
- wget https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/deploy-image-build/deploy/Dockerfile
- wget https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/deploy-image-build/deploy/ros_entrypoint.bash
- chmod a+x ros_entrypoint.bash
- docker build -t ${ARTIFACT_DOCKER_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME} .
- docker push ${ARTIFACT_DOCKER_URL}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_NAME}
only:
- tags
##########################################################
## Simple check for basic Python syntax errors; this is much less thorough than
## other options like pylint, but much faster and less strict
......
FROM industrial_ci_image
RUN rm -rf /root/ici /root/src
COPY ./ros_entrypoint.bash /
ENTRYPOINT ["/ros_entrypoint.bash"]
CMD ["bash"]
#!/bin/bash
set -e
# setup application environment
source "/root/catkin_ws/install/setup.bash"
exec "$@"
#!/bin/bash
set -e
rm -rf /root/catkin_ws/build /root/catkin_ws/devel /root/catkin_ws/logs /root/catkin_ws/src
# Unset env vars?
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment