Updated Jenkinsfile and Jenkinsjob.xml

This commit is contained in:
Luca Frosini 2025-09-10 11:33:18 +02:00
parent 04e61c21b4
commit 6dfbdabbe1
2 changed files with 98 additions and 0 deletions

23
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,23 @@
pipeline {
agent none
environment {
MAVEN_CONFIG_FOLDER = "/home/jenkins/.m2"
LOCAL_REPO = "/home/jenkins/.m2/repository"
GCUBE_SETTINGS = "/home/jenkins/.m2/gcube-settings.xml"
GCUBE_AGENT = "gcube-agent-jdk17-SNAPSHOT-5.17.0"
}
stages {
stage('BUILD') {
agent { label "${GCUBE_AGENT}" }
steps {
echo "Building ${env.JOB_NAME}"
echo "Agent: ${GCUBE_AGENT}"
sh 'mvn deploy --settings ${GCUBE_SETTINGS} -Dmaven.repo.local=${LOCAL_REPO} -Dmaven.artifact.threads=3 -DskipTests -T 2C dependency:tree'
}
}
}
}

75
Jenkinsjob.xml Normal file
View File

@ -0,0 +1,75 @@
<?xml version='1.1' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@1508.v9cb_c3a_a_89dfd">
<actions>
<org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobAction plugin="pipeline-model-definition@2.2247.va_423189a_7dff"/>
<org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction plugin="pipeline-model-definition@2.2247.va_423189a_7dff">
<jobProperties/>
<triggers/>
<parameters/>
<options/>
</org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction>
</actions>
<description>resource-registry-client pipeline</description>
<keepDependencies>false</keepDependencies>
<properties>
<jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator">
<daysToKeep>-1</daysToKeep>
<numToKeep>3</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
<removeLastBuild>false</removeLastBuild>
</strategy>
</jenkins.model.BuildDiscarderProperty>
<com.suryagaddipati.jenkins.SlaveUtilizationProperty plugin="slave-utilization-plugin@1.8">
<needsExclusiveAccessToNode>false</needsExclusiveAccessToNode>
<singleInstancePerSlave>false</singleInstancePerSlave>
<slaveUtilizationPercentage>0</slaveUtilizationPercentage>
</com.suryagaddipati.jenkins.SlaveUtilizationProperty>
<org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
<triggers>
<org.jenkinsci.plugins.pipeline.maven.trigger.WorkflowJobDependencyTrigger plugin="pipeline-maven@1508.v347c4b_692202">
<spec></spec>
</org.jenkinsci.plugins.pipeline.maven.trigger.WorkflowJobDependencyTrigger>
<hudson.triggers.SCMTrigger>
<spec></spec>
<ignorePostCommitHooks>false</ignorePostCommitHooks>
</hudson.triggers.SCMTrigger>
</triggers>
</org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps@4050.v8b_a_69b_587c39">
<scm class="hudson.plugins.git.GitSCM" plugin="git@5.7.0">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://code-repo.d4science.org/gCubeSystem/resource-registry-client.git</url>
<credentialsId>gitea-jenkins</credentialsId>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>*/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<browser class="org.jenkinsci.plugin.gitea.GiteaBrowser" plugin="gitea@238.v626a_cf5e1940">
<url>https://code-repo.d4science.org/gCubeSystem/resource-registry-client.git</url>
</browser>
<submoduleCfg class="empty-list"/>
<extensions>
<hudson.plugins.git.extensions.impl.CloneOption>
<shallow>true</shallow>
<noTags>false</noTags>
<reference></reference>
<depth>1</depth>
<honorRefspec>false</honorRefspec>
</hudson.plugins.git.extensions.impl.CloneOption>
</extensions>
</scm>
<scriptPath>Jenkinsfile</scriptPath>
<lightweight>true</lightweight>
</definition>
<triggers/>
<disabled>false</disabled>
</flow-definition>