Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/intershopcommunicationsag/gradle-release-plugins
Specific Gradle release plugins
https://github.com/intershopcommunicationsag/gradle-release-plugins
gradle gradle-plugin release-automation
Last synced: 13 days ago
JSON representation
Specific Gradle release plugins
- Host: GitHub
- URL: https://github.com/intershopcommunicationsag/gradle-release-plugins
- Owner: IntershopCommunicationsAG
- License: apache-2.0
- Created: 2016-05-11T08:02:52.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T07:42:21.000Z (over 1 year ago)
- Last Synced: 2024-12-08T11:09:13.955Z (2 months ago)
- Topics: gradle, gradle-plugin, release-automation
- Language: Groovy
- Size: 632 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.asciidoc
- License: LICENSE.md
Awesome Lists containing this project
README
= Gradle Release Plugins for Intershop
:latestRevision: 5.0.0NOTE: Version 5 of this plugin will only work with Gradle 5 and JDK 8!
== Summary
This collection of plugins adds special release functionality and encapsulates specific configurations and task dependencies.
It includes plugins for the creation of an escrow package, for the configuration of JavaDoc and the configuration of publishing.== Plugins
=== Escrow Package Plugin
It creates a zip file of the root project after the build. It is possible to exclude files and directories additional
for the prepared default excludes.==== Usage
To use the Gradle escrow plugin. include the following in your build script:[source,groovy,subs="attributes"]
----
plugins {
id 'com.intershop.gradle.escrow-plugin' version '{latestRevision}'
}escrow {
sourceGroup = 'publishing group of the escrow package'
}
----
This plugin can be applied only to the root project. It produces a zip package with all the sources and without
Gradle wrapper directory, which will be published to the specified repository.==== Extension
This plugin adds an extension *`escrow`* to the project.==== Properties
[cols="17%,17%,17%,68%", width="90%, options="header"]
|===
|Property | Type | Default value | Description
|*runOnCI* |`boolean` | false | This configuration must be true, if the project is used on a CI server. +
_This can be overwritten by the system or environment variable `RUNONCI` or project property `runOnCI`._
|*sourceGroup* | `String` | `project.getGroup()` | Group or organization of the published ESCROW source package
|*classifier* | `String` | 'src' | Specify the classifier of this artifact.|===
[source,groovy,indent=8]
.Default exclude pattern of this plugin
----[ , "*/", '.gradle', '.svn', '.git', '.idea', '.eclipse', '.settings', '**/.settings/**' ]
----
This list can be manipulated with the following methods:
[cols="17%,17%,17%,68%", width="90%, options="header"]
|===
|Method | Type | Parameter | Description
|*exclude* | `void` | String | Add an additional exlude pattern to the exclude list.
|*excludes* | `void` | List | Add all elements of the parameter list to the exclude list.
|*setExcludes*| `void` | List | Reset the default exclude list with the parameter list.|===
== Simple Publish Configuration Plugin
The configuration and the execution of tasks depends on the version number. Release versions without a "SNAPSHOT" extension will be published
to a release repository, otherwise the artifacts will be published to the snapshot repository. It must be applied also to each subproject.
=== Usage
To use the Nexus Publish configuration plugin, include the following in your build script:[source,groovy,subs="attributes"]
----
plugins {
id 'com.intershop.gradle.simplepublish-configuration' version '{latestRevision}'
}
----The behaviour of the plugin is controlled by environment variables, so that the plugin can be applied to the project without exceptions.
This kind of configuration is also easier to maintain on the CI server.[cols="17%,17%,65%", width="95%", options="header"]
|===
| System variable or Java system property | Project property | Description| *RUNONCI* | *runOnCI* | This configuration must be true, if the project is used on a CI server. The version will be extended with '-LOCAL', if this value is false.
| *SNAPSHOTURL* | *snapshotURL* | Snapshot URL for publishing of snapshot builds
| *RELEASEURL* | *releaseURL* | Release URL for publishing of release builds without staging.
| *REPO_USER_NAME* | *repoUserName* | The username with the correct role/permissions for transfer
| *REPO_USER_PASSWD* | *repoUserPasswd* | The password of the user.
| *SNAPSHOT_RELEASE* | *snapshotRelease* | The version will be extended with '-SNAPSHOT' and snapshot repositories are used if this value is set to 'true'.
|===== Artifactory Publish Configuration Plugin
It applies the following plugins to the root project: +
https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin[Gradle Artifactory Plugin] +
https://github.com/IntershopCommunicationsAG/jiraconnector-gradle-plugin[Gradle Plugin for Editing Atlassian Jira Issues] +
https://github.com/IntershopCommunicationsAG/buildinfo-gradle-plugin[Buildinfo Plugin] These properties are used for the configuration of Gradle Artifactory Plugin.The ivy pattern configuration is used from +
https://github.com/IntershopCommunicationsAG/repoconfig-gradle-plugin['Repository Configuration Init Script Plugin']*[:It requires, that the https://github.com/IntershopCommunicationsAG/scmversion-gradle-plugin[SCM Version Plugin] is applied to the project.
The configuration and the execution of tasks depends on the version number.
The editing of Jira issues will be executed only for release versions without a "SNAPSHOT" extension.
Furthermore the snapshot repository key is used if the version is a snapshot version.NOTE: *The behaviour of the plugin is changed with version 3.5.* A task 'releaseLog' is added by this plugin to project tasks. This task starts the creation of a
change log and sends the version of the build to Jira, if the project version does not end with snapshot. Otherwise the task has not function and is always 'up to date'.=== Usage
To use the Artifactory publish configuration plugin, include the following in your build script:[source,groovy,subs="attributes"]
----
plugins {
id 'com.intershop.gradle.artifactorypublish-configuration' version '{latestRevision}'
}artifactory {
publish {
// for ivy publications
repository {
maven = false
}
// list of publication names
defaults {
publications('ivy')
}
}
}
----The behaviour of the plugin is controlled by environment variables, so that the plugin can be applied to the project without exceptions.
This kind of configuration is also easier to maintain on the CI server.The target repository key for publishing depends on the version number. +
- Snapshots - version ends with SNAPSHOT - will be published to the snapshot repository. +
- All other artifacts will be published to the release repository.It is necessary to specify all publication names for publishing with Artifactory Gradle plugin.
Furthermore it is necessary to specify the kind of publication. For ivy publications it is necessary to set `publish.repository.maven` to `false`.For release versions the field 'Fix Version/s' JIRA issues will be extended with the current build version. It is possible to change the field with the project property 'jiraFieldName'.
[cols="17%,17%,65%", width="95%", options="header"]
|===
| System variable or Java system property | Project property | Description| *RUNONCI* | *runOnCI* | This configuration must be true, if the project is used on a CI server.
| *ARTIFACTORYBASEURL* | *artifactoryBaseURL* | The base url of the used Artifactory server.
| *SNAPSHOTREPOKEY* | *snapshotRepoKey* | Repository key for publishing of snapshot builds
| *RELEASEREPOKEY* | *releaseRepoKey* | Repository key for publishing of release builds.
| *ARTIFACTORYUSERNAME* | *artifactoryUserName* | The username with the correct role/permissions for transfer
| *ARTIFACTORYUSERPASSWD* | *artifactoryUserPASSWD* | The password of the user.
3+|These settings are dublicated from the https://github.com/IntershopCommunicationsAG/jiraconnector-gradle-plugin[Gradle Plugin for Editing Atlassian Jira Issues]
| *JIRABASEURL* | *jiraBaseURL* | The base url of Atlassian Jira, e.g. http://jira/jira
| *JIRAUSERNAME* | *jiraUserName* | The username with the correct role/permissions for editing issues
| *JIRAUSERPASSWD* | *jiraUserPASSWD* | The password of the user.
| | *jiraFieldName* | The version string will be set to this field. Default: 'Fix Version/s'
|===The properties can be set with files from an other source management system.
[source,shell,subs="attributes"]
----source /dev/stdin <<< "$(curl -s https://gitlab/user/build-configuration/raw/master/configuration.file?private_token=token)"
sh ./gradlew clean test publish -s
----
.configuration.file
[source,shell,subs="attributes"]
----
# configuration for assembly tests
ORG_GRADLE_PROJECT_buildEnvironmentProperties=${WORKINGDIR}/environment/intershop7-release-environment.properties
ORG_GRADLE_PROJECT_testEnvironmentProperties=${WORKINGDIR}/environment/intershop7-release-environment.properties# configuration for Artifactory publishing
ARTIFACTORYBASEURL=http://repository/artifactorySNAPSHOTREPOKEY=libs-snapshot-local
RELEASEREPOKEY=libs-release-localARTIFACTORYUSERNAME=deployUser
ARTIFACTORYUSERPASSWD=deployUserPassword# configuration for Gradle Plugin for Editing Atlassian Jira Issues
JIRABASEURL=https://jira
JIRAUSERNAME=jiraUser
JIRAUSERPASSWD=jiraUserPassword# configuration for SCM Version Plugin
SCM_USERNAME=scmuser
SCM_PASSWORD=password# configuration for Repository Configuration Init Script Plugin
DISABLE_LOCAL_REPO=true# configuration for plugins
RUNONCI=true# export variables
export ORG_GRADLE_PROJECT_buildEnvironmentProperties ORG_GRADLE_PROJECT_testEnvironmentProperties ARTIFACTORYBASEURL
export SNAPSHOTREPOKEY RELEASEREPOKEY ARTIFACTORYUSERNAME ARTIFACTORYUSERPASSWD JIRABASEURL JIRAUSERPASSWD JIRAUSERPASSWD
export SCM_USERNAME SCM_PASSWORD DISABLE_LOCAL_REPO RUNONCI# show Gradle version
sh ./gradlew --version----
== License
Copyright 2014-2017 Intershop Communications.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.