-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
53 lines (51 loc) · 1.91 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
before_script:
# Install ssh-agent if not already installed, it is required by Docker.
- "apt-get -qq update -y"
- "apt-get -qq install git build-essential openssh-client sudo -y"
# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$SSH_PRIVATE_KEY")
# For Docker builds disable host key checking. Be aware that by adding that
# you are suspectible to man-in-the-middle attacks.
# WARNING: Use this only with the Docker executor, if you use it with shell
# you will overwrite your user's SSH config.
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# create workspace
- rm -rf ${CI_PROJECT_DIR}/workspace/src >/dev/null 2>&1
- mkdir -p ${CI_PROJECT_DIR}/workspace/src
- cd ${CI_PROJECT_DIR}/workspace
- vcs import src < ${CI_PROJECT_DIR}/${CI_PROJECT_NAME}.repos
- rosdep install --from-paths src --ignore-src -y --as-root apt:false
- set +e
- vcs custom --git --args checkout ${CI_COMMIT_BRANCH}
- set -e
# galatic
galactic_focal_build:
image: ros:galactic-ros-base-focal
stage: build
script:
- colcon build
- source install/setup.bash
- colcon test --packages-select alpo_bringup alpo_description alpo_hardware
- colcon test-result --verbose
# humble
humble_jammy_build:
image: ros:humble-ros-base-jammy
stage: build
script:
- colcon build
- source install/setup.bash
- colcon test --packages-select alpo_bringup alpo_description alpo_hardware
- colcon test-result --verbose
# # docker bridge
# docker_bridge_build:
# image: docker
# stage: build
# services:
# - docker:dind
# script:
# - cd ${CI_PROJECT_DIR}/alpo_bridge/docker
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# - docker build -t $CI_REGISTRY/group/project/image:latest .