Skip to content

Commit

Permalink
chore: adhere to jenkins PR standards and automatic release procedure…
Browse files Browse the repository at this point in the history
… [AUOPS-4287]

- add cd github workflow for automatic release with manually controlled prefix (https://www.jenkins.io/doc/developer/publishing/releasing-cd/#update-maven-pom-and-config)
- upgrade jenkins version used in Jenkinsfile for CI
- enable dependabot (https://www.jenkins.io/doc/developer/publishing/releasing-cd/#update-maven-pom-and-config)
- enable incrementals (https://www.jenkins.io/doc/developer/plugin-development/incrementals/)
  • Loading branch information
cotovanu-cristian committed Oct 19, 2024
1 parent e49c2d6 commit 52fb7e5
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 7 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates

version: 2
updates:
- package-ecosystem: maven
directory: /
schedule:
interval: monthly
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
22 changes: 22 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Note: additional setup is required, see https://www.jenkins.io/redirect/continuous-delivery-of-plugins

name: cd
on:
workflow_dispatch:
inputs:
validate_only:
required: false
type: boolean
description: |
Run validation with release drafter only
→ Skip the release job
default: false

jobs:
maven-cd:
uses: jenkins-infra/github-reusable-workflows/.github/workflows/maven-cd.yml@v1
with:
validate_only: ${{ inputs.validate_only == true }}
secrets:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.8</version>
</extension>
</extensions>
3 changes: 3 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
-Dchangelist.format=%d.v%s
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildPlugin(
tests: [skip: true],
configurations: [
[platform: 'windows', jdk: '11', jenkins: '2.361.2'],
[platform: 'windows', jdk: '11', jenkins: '2.414.3'],
]
)
15 changes: 9 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
</parent>

<artifactId>uipath-automation-package</artifactId>
<version>4.0-SNAPSHOT</version>
<version>${revision}.${changelist}</version>
<packaging>hpi</packaging>

<properties>
<revision>4.0</revision>
<changelist>999999-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/uipath-automation-package-plugin</gitHubRepo>
<jenkins.version>2.414.3</jenkins.version>
<powershell.version>1.7</powershell.version>
<envinject.version>2.4.0</envinject.version>
Expand Down Expand Up @@ -212,10 +215,10 @@
</license>
</licenses>
<scm>
<connection>scm:git:ssh://git@github.com/jenkinsci/uipath-automation-package-plugin.git</connection>
<developerConnection>scm:git:ssh://git@github.com/jenkinsci/uipath-automation-package-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/uipath-automation-package-plugin</url>
<tag>HEAD</tag>
<connection>scm:git:ssh://git@github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:ssh://git@github.com/${gitHubRepo}.git</developerConnection>
<url>https://github.com/${gitHubRepo}</url>
<tag>${scmTag}</tag>
</scm>
<!-- List of dependencies of the project. -->
<dependencies>
Expand Down Expand Up @@ -391,7 +394,7 @@
</roles>
</developer>
<developer>
<id>cotovanu-cristian</id>
<id>cristiancotovanu</id>
<name>Cristian Cotovanu</name>
<url>https://github.com/cotovanu-cristian</url>
<email>cristian.cotovanu@uipath.com</email>
Expand Down

0 comments on commit 52fb7e5

Please sign in to comment.