Skip to content

Commit

Permalink
Merge branch 'master' into jrivero/asan_gz_collections
Browse files Browse the repository at this point in the history
  • Loading branch information
j-rivero authored Nov 30, 2023
2 parents cef7dff + b07a489 commit 1ac4657
Show file tree
Hide file tree
Showing 9 changed files with 358 additions and 399 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/ci-releasepy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Releasing tests

on:
push:
paths:
- release.py

jobs:
dsl_ci:
runs-on: ubuntu-latest
name: release.py checks
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run release.py script tests
run: ./check_releasepy.bash
39 changes: 5 additions & 34 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: CI
name: DSL logs and checks

# base_ref / head_reaf are only available in PRs
on: [pull_request]
on:
pull_request:
paths:
- 'jenkins-scripts/dsl/**'

jobs:
dsl_ci:
Expand All @@ -12,54 +14,28 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Idenfify files changed in this PR
id: files
run: |
git fetch origin ${{ github.ref }}
git diff --name-only origin/${{ github.base_ref }}...FETCH_HEAD
echo "changed-files=$(git diff --name-only origin/${{ github.base_ref }}...FETCH_HEAD| 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 "run_job=true" >> $GITHUB_OUTPUT
break
else
echo "run_job=false" >> $GITHUB_OUTPUT
fi
done
- name: Checkout
if: steps.dsl_check.outputs.run_job == 'true'
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: Run release.py script tests
run: ./check_releasepy.bash
- name: Download and setup job dsl jar
if: steps.dsl_check.outputs.run_job == 'true'
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
WRITE_JOB_LOG=1 java -jar tools/jobdsl.jar *.dsl
- name: Checks for DSL Code
if: steps.dsl_check.outputs.run_job == 'true'
run: |
cd jenkins-scripts/dsl
./dsl_checks.bash
- name: Export XML generated configuration for diff
if: steps.dsl_check.outputs.run_job == 'true'
run: |
cd jenkins-scripts/dsl
# export files for later diff
Expand All @@ -69,7 +45,6 @@ jobs:
mv *.xml /tmp/pr_xml_configuration/
mv *.txt /tmp/pr_log_generated/
- name: Generate master DSL files
if: steps.dsl_check.outputs.run_job == 'true'
run: |
git clean -f -e jobdsl.jar
git checkout master
Expand All @@ -81,26 +56,22 @@ jobs:
mv *.xml /tmp/current_xml_configuration/
mv *.txt /tmp/current_log_generated/ || true
- name: Generating diffs
if: steps.dsl_check.outputs.run_job == 'true'
run: |
# somehow the Jenkins views changed the portlet_ id on every run.
diff -qr -I '.*<id>dashboard_portlet_.*</id>.*' /tmp/current_xml_configuration /tmp/pr_xml_configuration | sort > /tmp/xml_config_files_changed.diff || true
diff -ur -I '.*<id>dashboard_portlet_.*</id>.*' /tmp/current_xml_configuration /tmp/pr_xml_configuration > /tmp/xml_config_content_changed.diff || true
diff -ur /tmp/current_log_generated /tmp/pr_log_generated > /tmp/log_content_changed.diff || true
- name: Archive files changes
if: steps.dsl_check.outputs.run_job == 'true'
uses: actions/upload-artifact@v3
with:
name: xml_config_files_changed
path: /tmp/xml_config_files_changed.diff
- name: Archive content changes
if: steps.dsl_check.outputs.run_job == 'true'
uses: actions/upload-artifact@v3
with:
name: xml_config_content_changed
path: /tmp/xml_config_content_changed.diff
- name: Archive log changes
if: steps.dsl_check.outputs.run_job == 'true'
uses: actions/upload-artifact@v3
with:
name: log_content_changed
Expand Down
1 change: 1 addition & 0 deletions check_releasepy.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
test_dir=$(mktemp -d)
mkdir -p ${test_dir}/{focal,jammy,ubuntu}/debian
export _RELEASEPY_TEST_RELEASE_REPO=${test_dir}
export _RELEASEPY_DEBUG=1

exec_releasepy_test()
{
Expand Down
9 changes: 9 additions & 0 deletions jenkins-scripts/dsl/_configs_/GenericAnyJobGitHub.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import javaposse.jobdsl.dsl.Job

/*
Implements:
- priority 200
- parameters: SRC_REPO, SRC_BRANCH, JOB_DESCRIPTION
- job.Description
- scm check with SRC_REPO + SRC_BRANCH
Expand Down Expand Up @@ -33,6 +34,14 @@ class GenericAnyJobGitHub

job.with
{
// Overrwrite the priority set by other classes
configure { project ->
project / 'properties' / 'jenkins.advancedqueue.priority.strategy.PriorityJobProperty' {
'useJobPriority'(true)
'priority'(200)
}
}

parameters
{
stringParam('sha1', 'main', 'commit or refname to build. To manually use a branch: origin/$branch_name')
Expand Down
4 changes: 2 additions & 2 deletions jenkins-scripts/dsl/_configs_/OSRFLinuxABIGitHub.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import javaposse.jobdsl.dsl.Job
-> OSRFLinuxBase
Implements:
- priority 300
- priority 200
- logrotator
- concurrent builds
- parameter: DEST_BRANCH, SRC_BRANCH
Expand Down Expand Up @@ -35,7 +35,7 @@ class OSRFLinuxABIGitHub
job.with
{
properties {
priority 300
priority 200
}

logRotator {
Expand Down
92 changes: 23 additions & 69 deletions jenkins-scripts/dsl/gz-collections.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,81 +28,81 @@ spec_version: 0
collections:
- name: 'citadel'
libs:
- name: ign-cmake
- name: gz-cmake
major_version: 2
repo:
current_branch: ign-cmake2
- name: ign-tools
- name: gz-tools
major_version: 1
repo:
current_branch: ign-tools1
- name: ign-math
- name: gz-math
major_version: 6
repo:
current_branch: ign-math6
- name: ign-plugin
- name: gz-plugin
major_version: 1
repo:
current_branch: ign-plugin1
- name: ign-common
- name: gz-common
major_version: 3
repo:
current_branch: ign-common3
- name: ign-msgs
- name: gz-msgs
major_version: 5
repo:
current_branch: ign-msgs5
- name: ign-rendering
- name: gz-rendering
major_version: 3
repo:
current_branch: ign-rendering3
- name: sdformat
major_version: 9
repo:
current_branch: sdf9
- name: ign-fuel-tools
- name: gz-fuel-tools
major_version: 4
repo:
current_branch: ign-fuel-tools4
- name: ign-transport
- name: gz-transport
major_version: 8
repo:
current_branch: ign-transport8
- name: ign-gui
- name: gz-gui
major_version: 3
repo:
current_branch: ign-gui3
- name: ign-sensors
- name: gz-sensors
major_version: 3
repo:
current_branch: ign-sensors3
- name: ign-physics
- name: gz-physics
major_version: 2
repo:
current_branch: ign-physics2
- name: ign-gazebo
major_version: 7
- name: gz-sim
major_version: 3
repo:
current_branch: ign-gazebo3
- name: ign-launch
- name: gz-launch
major_version: 2
repo:
current_branch: ign-launch2
- name: ign-citadel
- name: gz-citadel
major_version: 1
repo:
current_branch: main
ci:
configs:
- bionic
- focal
- brew
- win
packaging:
configs:
- bionic
- focal
linux:
ignore_major_version:
- ign-citadel
- gz-citadel
- name: 'fortress'
libs:
- name: gz-cmake
Expand Down Expand Up @@ -443,30 +443,6 @@ collections:
exclude:
- __upcoming__
ci_configs:
- name: bionic
system:
so: linux
distribution: ubuntu
version: bionic
arch: amd64
exclude:
all:
- ign-citadel
abichecker:
- ign-cmake
- ign-tools
requirements:
large_memory:
- ign-physics
nvidia_gpu:
- ign-gazebo
- ign-gui
- ign-rendering
- ign-sensors
pre_setup_script_hook:
gz-physics:
- "export MAKE_JOBS=1"
tests_disabled:
- name: focal
system:
so: linux
Expand All @@ -483,6 +459,7 @@ ci_configs:
- gz-sensors
exclude:
all:
- gz-citadel
- gz-fortress
- gz-garden
abichecker:
Expand All @@ -494,7 +471,7 @@ ci_configs:
- gz-plugin
- gz-utils
pre_setup_script_hook:
ign-physics:
gz-physics:
- "export MAKE_JOBS=1"
tests_disabled:
- name: jammy
Expand Down Expand Up @@ -531,7 +508,7 @@ ci_configs:
requirements:
exclude:
all:
- ign-citadel
- gz-citadel
- gz-fortress
- gz-garden
- gz-harmonic
Expand Down Expand Up @@ -562,7 +539,7 @@ ci_configs:
requirements:
exclude:
all:
- ign-citadel
- gz-citadel
- gz-fortress
- gz-garden
- gz-harmonic
Expand All @@ -583,31 +560,8 @@ ci_configs:
- gz-tools
- gz-transport
- gz-utils
- ign-cmake
- ign-common
- ign-fuel-tools
- ign-sim
- ign-gui
- ign-launch
- ign-math
- ign-msgs
- ign-physics
- ign-rendering
- ign-sensors
- ign-tools
- ign-transport
- ign-utils
- sdformat
packaging_configs:
- name: bionic
system:
so: linux
distribution: ubuntu
version: bionic
arch:
- i386
- amd64
- arm64
- name: focal
system:
so: linux
Expand Down
Loading

0 comments on commit 1ac4657

Please sign in to comment.