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

Migration to 24.04 buildfarm #799

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
4 changes: 2 additions & 2 deletions job_templates/ci_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>@(ci_scripts_repository)</url>
<credentialsId>1c2004f6-2e00-425d-a421-2e1ba62ca7a7</credentialsId>
<credentialsId>github-access-key</credentialsId>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
Expand Down Expand Up @@ -376,7 +376,7 @@ echo "# END SECTION"
@[if os_name not in ['windows']]@
<com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="ssh-agent@@1.17">
<credentialIds>
<string>1c2004f6-2e00-425d-a421-2e1ba62ca7a7</string>
<string>github-access-key</string>
</credentialIds>
<ignoreMissing>false</ignoreMissing>
</com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
Expand Down
4 changes: 2 additions & 2 deletions job_templates/packaging_job.xml.em
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>@(ci_scripts_repository)</url>
<credentialsId>1c2004f6-2e00-425d-a421-2e1ba62ca7a7</credentialsId>
<credentialsId>github-access-key</credentialsId>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
Expand Down Expand Up @@ -358,7 +358,7 @@ echo "# END SECTION"
@[if os_name not in ['windows']]@
<com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper plugin="ssh-agent@@1.17">
<credentialIds>
<string>1c2004f6-2e00-425d-a421-2e1ba62ca7a7</string>
<string>github-access-key</string>
</credentialIds>
<ignoreMissing>false</ignoreMissing>
</com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper>
Expand Down
128 changes: 59 additions & 69 deletions job_templates/snippet/publisher_cobertura.xml.em
Original file line number Diff line number Diff line change
@@ -1,69 +1,59 @@
<hudson.plugins.cobertura.CoberturaPublisher plugin="cobertura@@1.14">
<coberturaReportFile>ws/build*/**/*coverage.xml</coberturaReportFile>
<onlyStable>false</onlyStable>
<failUnhealthy>false</failUnhealthy>
<failUnstable>false</failUnstable>
<autoUpdateHealth>false</autoUpdateHealth>
<autoUpdateStability>false</autoUpdateStability>
<zoomCoverageChart>false</zoomCoverageChart>
<maxNumberOfBuilds>0</maxNumberOfBuilds>
<failNoReports>false</failNoReports>
@# CoverageTargets values consist of three decimal numbers.
@# First: The target value above which a build is considered "100% healthy/sunny".
@# Second: The target value below which a build is considered "0% healthy/stormy".
@# Third: The target value below which a build is considered "Unstable".
@# The values below are the plugin defaults.
<lineCoverageTargets>80, 0, 0</lineCoverageTargets>
<methodCoverageTargets>80, 0, 0</methodCoverageTargets>
<conditionalCoverageTargets>70, 0, 0</conditionalCoverageTargets>
<healthyTarget>
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
<int>8000000</int>
</entry>
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
<int>8000000</int>
</entry>
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
<int>7000000</int>
</entry>
</targets>
</healthyTarget>
<unhealthyTarget>
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
<int>0</int>
</entry>
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
<int>0</int>
</entry>
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
<int>0</int>
</entry>
</targets>
</unhealthyTarget>
<failingTarget>
<targets class="enum-map" enum-type="hudson.plugins.cobertura.targets.CoverageMetric">
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>METHOD</hudson.plugins.cobertura.targets.CoverageMetric>
<int>0</int>
</entry>
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>LINE</hudson.plugins.cobertura.targets.CoverageMetric>
<int>0</int>
</entry>
<entry>
<hudson.plugins.cobertura.targets.CoverageMetric>CONDITIONAL</hudson.plugins.cobertura.targets.CoverageMetric>
<int>0</int>
</entry>
</targets>
</failingTarget>
<sourceEncoding>ASCII</sourceEncoding>
<enableNewApi>false</enableNewApi>
</hudson.plugins.cobertura.CoberturaPublisher>
<io.jenkins.plugins.coverage.metrics.steps.CoverageRecorder plugin="coverage@@1.16.1">
<tools class="java.util.ImmutableCollections$List12" resolves-to="java.util.CollSer" serialization="custom">
<java.util.CollSer>
<default>
<tag>1</tag>
</default>
<int>2</int>
<io.jenkins.plugins.coverage.metrics.steps.CoverageTool>
<jenkins plugin="plugin-util-api@@5.1.0"/>
<pattern>ws/build*/**/*coverage.xml</pattern>
<parser>COBERTURA</parser>
</io.jenkins.plugins.coverage.metrics.steps.CoverageTool>
<io.jenkins.plugins.coverage.metrics.steps.CoverageTool>
<jenkins plugin="plugin-util-api@@5.1.0"/>
<pattern/>
<parser>COBERTURA</parser>
</io.jenkins.plugins.coverage.metrics.steps.CoverageTool>
</java.util.CollSer>
</tools>
<qualityGates class="java.util.ImmutableCollections$ListN" resolves-to="java.util.CollSer" serialization="custom">
<java.util.CollSer>
<default>
<tag>1</tag>
</default>
<int>3</int>
<io.jenkins.plugins.coverage.metrics.steps.CoverageQualityGate>
<threshold>0.0</threshold>
<criticality>UNSTABLE</criticality>
<metric>METHOD</metric>
<baseline>PROJECT</baseline>
</io.jenkins.plugins.coverage.metrics.steps.CoverageQualityGate>
<io.jenkins.plugins.coverage.metrics.steps.CoverageQualityGate>
<threshold>0.0</threshold>
<criticality>UNSTABLE</criticality>
<metric>LINE</metric>
<baseline>PROJECT</baseline>
</io.jenkins.plugins.coverage.metrics.steps.CoverageQualityGate>
<io.jenkins.plugins.coverage.metrics.steps.CoverageQualityGate>
<threshold>0.0</threshold>
<criticality>FAILURE</criticality>
<metric>MODULE</metric>
<baseline>PROJECT</baseline>
</io.jenkins.plugins.coverage.metrics.steps.CoverageQualityGate>
</java.util.CollSer>
</qualityGates>
<id/>
<name/>
<skipPublishingChecks>false</skipPublishingChecks>
<checksName/>
<checksAnnotationScope>MODIFIED_LINES</checksAnnotationScope>
<ignoreParsingErrors>false</ignoreParsingErrors>
<failOnError>false</failOnError>
<enabledForFailure>false</enabledForFailure>
<skipSymbolicLinks>false</skipSymbolicLinks>
<scm/>
<sourceCodeEncoding/>
<sourceDirectories/>
<sourceCodeRetention>LAST_BUILD</sourceCodeRetention>
</io.jenkins.plugins.coverage.metrics.steps.CoverageRecorder>
4 changes: 3 additions & 1 deletion linux_docker_resources/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

# Adapted from: http://chapeau.freevariable.com/2014/08/docker-uid.html

set -ex

export ORIGPASSWD=$(cat /etc/passwd | grep rosbuild)
export ORIG_UID=$(echo $ORIGPASSWD | cut -f3 -d:)
export ORIG_GID=$(echo $ORIGPASSWD | cut -f4 -d:)
Expand Down Expand Up @@ -82,4 +84,4 @@ sed -i -e "s/rosbuild:x:$ORIG_GID:/rosbuild:x:$GID:/" /etc/group
chown -R ${UID}:${GID} "${ORIG_HOME}"
echo "done."

exec sudo -H -u rosbuild -E -- xvfb-run -s "-ac -screen 0 1280x1024x24" /bin/sh -c "$*"
exec sudo -H -u rosbuild -E -- xvfb-run -s "-ac -screen 0 1280x1024x24" /bin/sh -c "$*"