Skip to content
Snippets Groups Projects
Commit 375e59d5 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add dockerfiles, build docker images and test in docker containers

parent 1207cb5a
No related branches found
No related tags found
1 merge request!89Use docker images generated by ArmarXCore for CI and build own docker images
Pipeline #15677 canceled
stages:
- build-and-test
- deploy
- post-deploy-test
.build-and-test:
......@@ -82,3 +84,83 @@ build-and-test-jammy:
extends: .build-and-test
image: git.h2t.iar.kit.edu:5050/sw/armarx/armarx-core:latest-jammy
docker-bionic:
stage: deploy
needs: ["build-and-test-bionic"]
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/docker/bionic"
--destination "${CI_REGISTRY_IMAGE}:latest-bionic"
rules:
- if: $CI_COMMIT_BRANCH == "master"
docker-jammy:
stage: deploy
needs: ["build-and-test-jammy"]
image:
name: gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/docker/jammy"
--destination "${CI_REGISTRY_IMAGE}:latest-jammy"
rules:
- if: $CI_COMMIT_BRANCH == "master"
.test-docker-image-common:
before_script:
- source /axii/scripts/install_axii.sh
- _axii_auto_env_refresh
script:
- echo "ArmarX Workspace = '$ARMARX_WORKSPACE'"
- printenv
- axii workspace list-modules
- axii workspace list-modules --deps
- axii workspace info
- echo "ArmarXCore directory = '$ArmarXCore_DIR'"
- which armarx
- which armarx-package
- armarx switch docker_test --ice-host 127.0.0.1 --ice-port 10000 --ice-default-host 127.0.0.1 --mongo-host 127.0.0.1 --mongo-port 10001
- armarx profile
- armarx status || true
- cd $ArmarXGui_DIR
- ctest --output-on-failure .
test-docker-image-bionic:
stage: post-deploy-test
needs: ["docker-bionic"]
extends: .test-docker-image-common
image: git.h2t.iar.kit.edu:5050/sw/armarx/armarx-gui:latest-bionic
rules:
- if: $CI_COMMIT_BRANCH == "master"
test-docker-image-jammy:
stage: post-deploy-test
needs: ["docker-jammy"]
extends: .test-docker-image-common
image: git.h2t.iar.kit.edu:5050/sw/armarx/armarx-gui:latest-jammy
rules:
- if: $CI_COMMIT_BRANCH == "master"
{
"modules": {
"tools/ccache/default": {},
"armarx/ArmarXGui": {}
},
"global": {
"prepare": {
"cmake": {
"definitions": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_C_COMPILER_LAUNCHER": "$CCACHE",
"CMAKE_CXX_COMPILER_LAUNCHER": "$CCACHE"
}
}
}
}
}
FROM git.h2t.iar.kit.edu:5050/sw/armarx/armarx-core:latest-bionic
# Setup environment.
SHELL ["/bin/bash", "-c"]
# Setup apt environment.
RUN apt-get -qq update
# Setup repository in Docker.
WORKDIR $ARMARX_WORKSPACE/armarx/ArmarXGui
COPY --chmod=755 . .
# Use workspace config.
COPY docker/armarx-workspace.json $ARMARX_WORKSPACE/armarx-workspace.json
# Run the upgrade.
RUN axii workspace system --accept-apt-install
# ToDo: Prevent this from updating the target itself.
RUN axii workspace update --prefer-https
RUN axii workspace upgrade
FROM git.h2t.iar.kit.edu:5050/sw/armarx/armarx-core:latest-jammy
# Setup environment.
SHELL ["/bin/bash", "-c"]
# Setup apt environment.
RUN apt-get -qq update
# Setup repository in Docker.
WORKDIR $ARMARX_WORKSPACE/armarx/ArmarXGui
COPY --chmod=755 . .
# Use workspace config.
COPY docker/armarx-workspace.json $ARMARX_WORKSPACE/armarx-workspace.json
# Run the upgrade.
RUN axii workspace system --accept-apt-install
# ToDo: Prevent this from updating the target itself.
RUN axii workspace update --prefer-https
RUN axii workspace upgrade
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment