Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable GZ_ENABLE_RELOCATABLE_INSTALL in CI for gz-cmake3 #913

Closed
wants to merge 60 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
768a7a3
Enable GZ_ENABLE_RELOCATABLE_INSTALL in CI for gz-cmake3
j-rivero Apr 20, 2023
a5f5d22
(feat): remove legacy win_rendering tag from windows_ci job
claraberendsen Apr 20, 2023
b0775fb
Create a Groovy script to apply singleton labels. (#917)
nuclearsandwich May 6, 2023
ecba5c5
Add the unstable parser to the nightly_labelers
j-rivero May 8, 2023
cf8fed3
add nontest_label to _config_ classes
claraberendsen May 10, 2023
5603eb0
NVidia mismatch recovery (#915)
claraberendsen May 11, 2023
03f4836
add README for jenkins scripts
claraberendsen May 15, 2023
26bcfd9
change permalink since code snippets is not working
claraberendsen May 15, 2023
ef5886c
more information on seed job
claraberendsen May 16, 2023
9394b0a
fix review comments
claraberendsen May 16, 2023
1b0ba6c
Update jenkins-scripts/README.md
claraberendsen May 16, 2023
ed91bf0
Retry the build when an agent disconnection ocurrs
Crola1702 May 17, 2023
39f5aa9
Move publishers inside job configuration
Crola1702 May 17, 2023
42e9446
Add RetryFailures for updating naginator regex parameter in child cla…
Crola1702 May 17, 2023
d10cd5a
Change how regex is added to naginator for nvidia mismatch problem
Crola1702 May 17, 2023
d9797c7
Remove code comments
Crola1702 May 17, 2023
02a958f
Add option to update naginator parameters
Crola1702 May 17, 2023
91c4929
Test: shutdown step should retrigger the build
Crola1702 May 18, 2023
a428cf7
Test: shutdown step should retrigger the build version 2
Crola1702 May 18, 2023
26f4332
Test: shutdown step should retrigger the build version 3
Crola1702 May 18, 2023
10bc7fa
Test: shutdown step should retrigger the build version 4
Crola1702 May 18, 2023
0a35a17
Test: shutdown step should retrigger the build version 5
Crola1702 May 18, 2023
57c1e32
Test: shutdown step should retrigger the build version 6
Crola1702 May 18, 2023
6f02d7e
Change Naginator Publisher creation in HelperRetryFailures script
Crola1702 May 18, 2023
ddd2c04
Fail if maxSchedule and checkRegexp values are set
Crola1702 May 19, 2023
9f84669
Refactor naginator_root node instance
Crola1702 May 19, 2023
8a1620c
Improve method parameters documentation
Crola1702 May 19, 2023
b2c31a0
Apply suggestions from code review
Crola1702 May 19, 2023
b723583
Improve nightly node selection (#924)
j-rivero May 22, 2023
a478711
remove legacy reference to extreme in docker cleanup process
claraberendsen May 22, 2023
e513cd1
remove comments reference to extreme option
claraberendsen May 22, 2023
f9f06a8
fi typo
claraberendsen May 22, 2023
d6d39a0
fix typos on boilerplate
claraberendsen May 22, 2023
13c3dea
Change huge-memory to large-memory (#932)
Crola1702 May 23, 2023
bba6b0e
Remove Windows CI from Gazebo Classic (#933)
j-rivero May 23, 2023
7c1586f
Add brew sbin to PATH to fix doctor complaint (#931)
scpeters May 23, 2023
0439f8b
Remove gazebo9 support on gazebo.dsl (#934)
j-rivero May 24, 2023
e779cac
Reorder main jobs in ignition.dsl to help refactor (#937)
j-rivero May 24, 2023
2ee6eff
Initial work to move gz-collections metadata to a yaml file (#938)
j-rivero May 29, 2023
7262685
Enable -fPIC for ign-gazebo6 (#941)
azeey May 29, 2023
0c61a8d
Fix deprecation on github actions: use GITHUB_OUTPUT instead of set-o…
j-rivero May 29, 2023
7046df5
Add a parser for OpenGL problems on Windows (#943)
j-rivero May 29, 2023
2a7a3a6
Add nightly generation and harmonic libs to gz-collections.yaml (#940)
j-rivero Jun 1, 2023
e5ef07a
Rename compilation scripts from ign_ to gz_ (#947)
j-rivero Jun 2, 2023
6dac1f0
Unofficial ros_gz: README for forking gbp and script for renaming (#898)
j-rivero Jun 2, 2023
2003036
Move release-bloom.py wrapper to parent dir
j-rivero May 10, 2023
17ceb23
Modernize the release-bloom script
j-rivero May 10, 2023
895c685
Update ROS versions and remove ignition
j-rivero May 17, 2023
c9ff132
Script to release a new version of the ros_gz wrappers
j-rivero May 18, 2023
259201c
Make nightly_labeler to run during the nightly generation
j-rivero Jun 2, 2023
b3ed46e
Unofficial ros_gz: add a smoke test to detect ABI breakages (#950)
j-rivero Jun 6, 2023
9d2412f
Added new DSL to generate gz-cmake Harmonic -ci-pr_any- job based on…
j-rivero Jun 7, 2023
965c631
Fix detect_cmake_major_version.py to work with gz branches (#952)
j-rivero Jun 7, 2023
45a33a2
Enable Harmonic -pr_any-jammy for all libs (#953)
j-rivero Jun 8, 2023
a746cbb
Change fuel-tools compilation script name to use always underscores (…
j-rivero Jun 8, 2023
ea278e9
Use gazebo-release/ros_ign-release for releasing ros_gz unofficial (#…
j-rivero Jun 8, 2023
fc1ab64
Add gzgarden bridge periodic install job for CI (#956)
j-rivero Jun 9, 2023
83e784c
Fix cron syntax in Jenkins: use gnu_mcron compatible expression (#957)
j-rivero Jun 12, 2023
5b89393
Parametrize the tooling to support different ROS_DISTRO values
j-rivero Jun 14, 2023
e2c3507
Add a double check for correct metadata
j-rivero Jun 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,48 @@ jobs:
name: Diff for DSL code
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Idenfify files changed in this PR
id: files
run: |
git diff --name-only origin/${{ github.base_ref }}...origin/${{ github.head_ref }}
echo "::set-output name=changed-files::$(git diff --name-only origin/${{ github.base_ref }}...origin/${{ github.head_ref }}| tr '\n' ' ')"
echo "changed-files=$(git diff --name-only origin/${{ github.base_ref }}...origin/${{ github.head_ref }}| tr '\n' ' ')" >> $GITHUB_OUTPUT
- name: Run testing on changed config files
id: dsl_check
run: |
for changed_file in ${{ steps.files.outputs.changed-files }}; do
if [[ ${changed_file} != ${changed_file/dsl\/*} ]]; then
echo "+ Detected at leat one config file: ${changed_file}."
echo "::set-output name=run_job::true"
echo "run_job=true" >> $GITHUB_OUTPUT
break
else
echo "::set-output name=run_job::false"
echo "run_job=false" >> $GITHUB_OUTPUT
fi
done
- name: Checkout
if: steps.dsl_check.outputs.run_job == 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/setup-java@v3
if: steps.dsl_check.outputs.run_job == 'true'
with:
distribution: 'temurin'
java-version: '11'
- name: Download job dsl jar
- name: Download and setup job dsl jar
if: steps.dsl_check.outputs.run_job == 'true'
run: curl -sSL https://repo.jenkins-ci.org/public/org/jenkins-ci/plugins/job-dsl-core/1.77/job-dsl-core-1.77-standalone.jar -o jobdsl.jar
run: ./jenkins-scripts/dsl/tools/setup_local_generation.bash

- name: Generate all DSL files
if: steps.dsl_check.outputs.run_job == 'true'
run: |
# simulate token for brew_release
sudo mkdir -p /var/lib/jenkins/ && sudo touch /var/lib/jenkins/remote_token
sudo chown -R ${USER} /var/lib/jenkins
cd jenkins-scripts/dsl
java -jar ../../jobdsl.jar *.dsl
java -jar tools/jobdsl.jar *.dsl
# export files for later diff
mkdir /tmp/pr_xml_configuration
mv *.xml /tmp/pr_xml_configuration/
Expand All @@ -59,7 +60,7 @@ jobs:
git clean -f -e jobdsl.jar
git checkout master
cd jenkins-scripts/dsl
java -jar ../../jobdsl.jar *.dsl
java -jar tools/jobdsl.jar *.dsl
mkdir /tmp/current_xml_configuration
mv *.xml /tmp/current_xml_configuration/
- name: Generating diffs
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.pyc
jenkins-scripts/dsl/tools/*.jar
27 changes: 11 additions & 16 deletions bloom/ros_gazebo_pkgs/release-bloom.py → bloom/release-bloom.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
#!/usr/bin/env python
#!/usr/bin/env python3

from __future__ import print_function
import argparse
import subprocess
import sys
import urllib
import argparse
import urllib.request
import urllib.parse

USAGE = 'release-bloom.py <package> <version> <upstream_release_repo> <ros_distro> [--ignition-version version_name] <jenkinstoken>'
USAGE = 'release-bloom.py <package> <version> <upstream_release_repo> <ros_distro> <jenkinstoken>'
JENKINS_URL = 'http://build.osrfoundation.org'
JOB_NAME_PATTERN = '%s-bloom-debbuilder'

UBUNTU_ARCHS = ['amd64']
# not releasing for precise by default
UBUNTU_DISTROS_IN_ROS = {'melodic': ['bionic'],
'noetic': ['focal']}
UBUNTU_DISTROS_IN_ROS = {'noetic': ['focal']}
UBUNTU_DISTROS_IN_ROS2 = {'foxy': ['focal'],
'rolling': ['focal']}
'humble': ['jammy'],
'iron': ['jammy'],
'rolling': ['jammy']}
DRY_RUN = False

def parse_args(argv):
Expand All @@ -34,9 +35,6 @@ def parse_args(argv):
help='Release version suffix; usually 1 (e.g., 1')
parser.add_argument('--upload-to-repo', dest='upload_to_repository', default="stable",
help='OSRF repo to upload: stable | prerelease | nightly')
parser.add_argument('--ignition-version', action='store', default=None,
help='Gazebo version to use in the binary packages')

args = parser.parse_args()
DRY_RUN = args.dry_run
return args
Expand Down Expand Up @@ -77,13 +75,10 @@ def call_jenkins_jobs(argv):
params['ROS2'] = True
ubuntu_per_ros_distro = UBUNTU_DISTROS_IN_ROS2

if args.ignition_version:
params['IGNITION_VERSION'] = args.ignition_version

if not args.release_version:
args.release_version = 0
params['RELEASE_VERSION'] = args.release_version
params_query = urllib.urlencode(params)
params_query = urllib.parse.urlencode(params)
base_url = '%s/job/%s/buildWithParameters?%s' % \
(JENKINS_URL, JOB_NAME_PATTERN % (args.package), params_query)

Expand All @@ -93,7 +88,7 @@ def call_jenkins_jobs(argv):
(base_url, arch, ubuntu_distro, args.ros_distro)
print('Accessing: %s' % (url))
if not DRY_RUN:
urllib.urlopen(url)
urllib.request.urlopen(url)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion bloom/ros_gazebo_pkgs/ros_gazebo_pkgs-release.py.bash
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ if [[ ${1%-*} != "${1}" ]]; then
fi

for p in gazebo-dev gazebo-msgs gazebo-plugins gazebo-ros gazebo-ros-control gazebo-ros-pkgs; do
./release-bloom.py ${p} $(for i in $@; do echo -n "$i "; done)
../release-bloom.py ${p} $(for i in $@; do echo -n "$i "; done)
done
31 changes: 31 additions & 0 deletions bloom/ros_gz/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ARG ROS_DISTRO=humble

FROM ros:$ROS_DISTRO-ros-base

ENV LANG C
ENV LC_ALL C
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
coreutils \
dpkg-dev \
python3-bloom \
wget \
&& rm -rf /var/lib/apt/lists/*

# Install osrf-rosdep for Garden
RUN sudo bash -c \
'wget https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/00-gazebo.list -O /etc/ros/rosdep/sources.list.d/00-gazebo.list'
# Replace Fortress with Garden to make bloom to work
# since it does not support arbitrary environemnt variables
RUN sudo bash -c \
'wget https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/replace_fortress_with_garden/00-replace-gz-fortress-with-garden.list -O /etc/ros/rosdep/sources.list.d/00-replace-gz-fortress-with-garden.list'

# Not for using bloom but useful for rosdep calls
ENV GZ_VERSION=garden
ENV IGNITION_VERSION=garden

WORKDIR /tmp
COPY _check_metadata.bash .
COPY _rosdep_wrapper.bash .
ENTRYPOINT ["/tmp/_rosdep_wrapper.bash"]
109 changes: 109 additions & 0 deletions bloom/ros_gz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Release new version of Gazebo unofficial wrappers

1. Background
* Upstream versions released using this tutorial
2. Initial setup
* Create the alternative -release repository
* Create a custom track in tracks.yaml
3. Run a new release
* Prerequisites
* Bloom a new release

## 1. Background

Each ROS release defines one version of Gazebo supported officially through
all the ROS packages. The different combinations of ROS <-> Gazebo can be
found in the [REP-3](http://www.ros.org/reps/rep-2000.html). Some examples:

* ROS 2 Foxy: Citadel
* ROS 2 Humble: Fortress

Some use cases require the use of alternative combinations of ROS and Gazebo
versions. The `ros_gz` code is usually prepared to be compatible with
different versions of Gazebo, especially the latest ones.

Although using the officially supported version is the recommended way
specially for non experienced users, some use cases might need to use a
newer version of Gazebo than the one selected in REP-2000.

### Upstream versions released using this tutorial

The `gbp -release repository` hosts the latest version released by the
maintainers of `ros_gz`. When using these instructions to release a new custom
version the version of `ros_gz` released will be the latest one existing in the
official `gbp -release repository`. The version would be the same but the
release number will start on 1000.

## 2. Initial setup

To release a modified version of `ros_gz` which supports a different major
version of gazebo, before running bloom some actions need to be taken:

### 2.1 Create the alternative -release repository

For a new official wrappers the notation used below correspond to `ros_ign-release`:

1. Fork (manually or using gh) current gbp repository:
https://github.com/ros2-gbp/ros_ign-release

1. Clone the new repo, go to the directory and run rename-gazebo-ros-pkgs.bash
- Usage: `$ rename-ros_gz-pkgs.bash <desired_gz_version> <space separted list of rosdistros to release>`
- Example: `$ rename-ros_gz-pkgs.bash garden humble`


### 2.2 Create a custom track in tracks.yml

Copy the existing ROS 2 yaml track information and rename it to `${ros2}_gz${version}`.
For example, the `humble` track to be used as base for Garden would be `humble_gzgarden`.

New versioning requires bumping to large numbers. Set:

```
release_inc: '1000'
```

Debian, rhel and fedora generators can be removed.

## 3. Run a new release

To execute a new release of the ros_gz unofficial wrappers there are mainly two
steps to do: use bloom to generate new metadata in the -release repo fork and
use ros_gz-release.py script to trigger the builds builds.osrfoundation.org.

The new version will be the latest one released in the rosdistro index of the
official ros_gz packages.

### Prerequisites

The host system to release should have `docker` and `rocker` installed.

### 3.1 Bloom a new release

Blooming a new release of the ros_gz unofficial wrappers requires some changes
to be done in the releasing enviroment affecting the rosdep rules. To facilitate
this, there is a `Dockerfile` that provides the needed modifications and a script
that encapsulates the bloom arguments to be passed and the use of this enviroment.

```
./bloom_from_special_env.bash
```

The script will create the docker enviroment with the rosdep modifications needed
and invoke rocker with `--home` and `--user` flags to pass the credentials and
customatizations needed for the bloom call. It will run the `bloom-release` command
with the arguments required for the ros_gz wrappers.

### 3.2 Launching jobs in the osrf buildfarm

The previous step generates the metadata needed to build the debians but there is
a final step to call the jobs inside the buildfarm that will create the debians.

To do so, for simulating the calls to be done to the buildfarm:

```
./ros_gz-release.py.bash <version-without-revision> <release-repo> <ros_distro> <token> --dry-run -r <revision>
# Example for 0.244.11-1001 version for ROS Humble in ros_ign-release
./ros_gz-release.py.bash 0.244.11 https://github.com/gazebo-release/ros_ign-release humble foo --dry-run -r 1001
```

For releasing directly, just remove the `--dry-run` argument.
29 changes: 29 additions & 0 deletions bloom/ros_gz/_check_metadata.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -e


if [[ $# -lt 2 ]]; then
echo "Usage: $0 <RELEASE_REPO_URL> <ROS_DISTRO>"
exit 1
fi

RELEASE_REPO_URL=${1}
ROS_DISTRO=${2}

TMP_DIR=$(mktemp -d)
git clone "${RELEASE_REPO_URL}" "${TMP_DIR}"
pushd "${TMP_DIR}" 2> /dev/null || exit
cd "${TMP_DIR}" || exit
DEBIAN_LATEST_TAG=$(git for-each-ref --sort=creatordate --format '%(refname)' refs/tags | \
grep "debian/ros-${ROS_DISTRO}" | \
tail -1 | sed 's:refs/tags/::')
git checkout "${DEBIAN_LATEST_TAG}"
dpkg-parsechangelog -SSource
if ! dpkg-parsechangelog -SSource | grep -q 'gzgarden' > /dev/null; then
echo "Latest changelog entry does not have gzgarden name"
echo "in the repo tag ${DEBIAN_LATEST_TAG} for repo ${RELEASE_REPO_URL}"
echo "Maybe the rename in the bloom templates was not done."
exit 1
fi
popd 2>/dev/null || exit
6 changes: 6 additions & 0 deletions bloom/ros_gz/_rosdep_wrapper.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

rosdep update

exec "$@"
36 changes: 36 additions & 0 deletions bloom/ros_gz/bloom_from_special_env.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

if [[ $# -lt 1 ]]; then
echo "Usage: $0 <ros_distro>"
exit 1
fi

ROS_DISTRO=${1}
# Might be used with testing proposes to change gbp-release repo
GBP_ORG=${GBP_ORG:-gazebo-release}
RELEASE_REPO_URL=https://github.com/${GBP_ORG}/ros_ign-release

if ! command rocker --version &> /dev/null
then
echo "Please install the rocker app https://github.com/osrf/rocker"
exit 1
fi

# TODO: update URL for the release repo
BLOOM_CMD="/usr/bin/bloom-release --no-pull-request \
--rosdistro ${ROS_DISTRO}\
--track ${ROS_DISTRO}_gzgarden \
--override-release-repository-url \
${RELEASE_REPO_URL} ros_gz"

TAG_NAME=${TAG_NAME:-ros_gz-${ROS_DISTRO}-fortress-garden-release}

echo " * Build the docker release environment"
docker build . -t "${TAG_NAME}" --build-arg ROS_DISTRO="${ROS_DISTRO}"
echo " * Using rocker to enter in the release environment"
rocker --home --user "${TAG_NAME}" "${BLOOM_CMD}"
echo " * Exit the docker release environment"
echo " * Restoring the rosdep cache in the user"
rosdep update
echo " * Running safety check in generated metadata"
docker run "${TAG_NAME}" /tmp/_check_metadata.bash "${RELEASE_REPO_URL}" "${ROS_DISTRO}"
Loading