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

Merge branch 'ci' into 'master'

Use docker images generated by ArmarXCore for CI and build own docker images

See merge request !89
parents b8ff136c f918e982
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 #15684 passed
stages:
- build-and-test
- deploy
- post-deploy-test
.build-and-test:
......@@ -28,18 +29,12 @@ stages:
- ccache --max-size=20G
- ccache --show-stats
# Ice configuration to run in Docker.
- export ICE_DEFAULT_HOST="127.0.0.1"
- export ICE_RUN_AS_ROOT="true"
# Activate Axii.
- source /axii/scripts/install_axii.sh
- _axii_auto_env_refresh
script:
# Create workspace.
- axii workspace create ~/workspace workspace
- axii workspace activate workspace
- _axii_auto_env_refresh
- echo "ArmarX Workspace = '$ARMARX_WORKSPACE'"
# Use workspace configuration from project.
- cp "$CI_PROJECT_DIR/.gitlab/ci/armarx-workspace.json" "$ARMARX_WORKSPACE/armarx-workspace.json"
......@@ -67,14 +62,6 @@ stages:
- ccache --show-stats
# Try starting Ice.
- 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
#- armarx start
# armarx status
#- armarx stop
# Test.
# ToDo: Add and use `axii ws test -m "$PROJECT_MODULE"`
- cd "$PROJECT_PATH_IN_WORKSPACE/build"
......@@ -89,11 +76,91 @@ build-and-test-bionic:
stage: build-and-test
extends: .build-and-test
image: git.h2t.iar.kit.edu:5050/sw/armarx/meta/axii:latest-bionic
image: git.h2t.iar.kit.edu:5050/sw/armarx/armarx-core:latest-bionic
build-and-test-jammy:
stage: build-and-test
extends: .build-and-test
image: git.h2t.iar.kit.edu:5050/sw/armarx/meta/axii:latest-jammy
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": {
"armarx/ArmarXGui": {}
},
"global": {
"prepare": {
"cmake": {
"definitions": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
}
}
}
}
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