Skip to content

Commit

Permalink
Merge branch 'master' into testerra2
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
#	build.gradle
  • Loading branch information
Mike Reiche committed Apr 29, 2021
2 parents e94de62 + 7d3834d commit fb89d74
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 110 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# For more details, read the following article on GitHub: https://help.github.com/articles/about-codeowners/.

# These are the default owners for the whole content of this repository. The default owners are automatically added as reviewers when you open a pull request, unless different owners are specified in the file.
* @mreiche @martingrossmann @gogro
* @mreiche @martingrossmann @gogro @mbeuthan
70 changes: 35 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# TeamCity Connector

<p align="center">
<a href="https://mvnrepository.com/artifact/io.testerra/teamcity-connector" title="MavenCentral"><img src="https://img.shields.io/maven-central/v/io.testerra/teamcity-connector?label=Maven%20Central"></a>
<a href="/../../commits/" title="Last Commit"><img src="https://img.shields.io/github/last-commit/telekom/testerra-teamcity-connector?style=flat"></a>
<a href="/../../issues" title="Open Issues"><img src="https://img.shields.io/github/issues/telekom/testerra-teamcity-connector?style=flat"></a>
<a href="./LICENSE" title="License"><img src="https://img.shields.io/badge/License-Apache%202.0-green.svg?style=flat"></a>
</p>

<p align="center">
<a href="#installation">Installation</a> •
<a href="#setup">Setup</a> •
<a href="#documentation">Documentation</a> •
<a href="#development">Development</a> •
<a href="#support-and-feedback">Support</a> •
<a href="#how-to-contribute">Contribute</a> •
<a href="#contributors">Contributors</a> •
Expand All @@ -18,7 +18,9 @@

## About this module

This module for Testerra framework provides a simple notification service for Jetbrains TeamCity. It uses the build script interaction of TeamCity to update build progress messages
This module provides additional features to [Testerra Framework](https://github.com/telekom/testerra) for automated tests.

This module provides a simple notification service for Jetbrains TeamCity. It uses the build script interaction of TeamCity to update build progress messages
on test method updates and update general build status on report generation.
It will register automatically by using the Testerra ModuleHook.

Expand All @@ -27,34 +29,42 @@ It will register automatically by using the Testerra ModuleHook.

* Testerra in Version `2.0-RC-1`

## Usage
## Setup

### Requirements

![Maven Central](https://img.shields.io/maven-central/v/io.testerra/core/1.0-RC-32?label=Testerra)

### Usage

Include the following dependency in your project.

Gradle:

````groovy
implementation 'eu.tsystems.mms.tic.testerra:teamcity-connector:2-SNAPSHOT'
implementation 'io.testerra:teamcity-connector:2.0-RC-1'
````

Maven:

````xml

<dependency>
<groupId>eu.tsystems.mms.tic.testerra</groupId>
<groupId>io.testerra</groupId>
<artifactId>teamcity-connector</artifactId>
<version>2-SNAPSHOT</version>
<version>2.0-RC-1</version>
</dependency>
````

## TeamCity configuration
## Documentation

### TeamCity configuration

Please ensure that you have `Failure Conditions > Common Failure Conditions > at least one test failed` deactivated on your TeamCity
build configuration,
because TeamCity Connector will announce the build status on report generation based on test execution statistics.

## Gradle / Maven configuration
### Gradle / Maven configuration

When using TeamCity Connector you have to ensure that Gradle/Maven will ignore test failures.

Expand Down Expand Up @@ -83,9 +93,7 @@ Maven:
</build>
````

---

## Impacts on TeamCity
### Impacts on TeamCity

*Changes in TeamCity*

Expand Down Expand Up @@ -118,32 +126,24 @@ The following tables shows some more examples how the result could be.

## Publication

### ... to a Maven repo

_Publishing to local repo_
```shell
gradle publishToMavenLocal
```

_Publishing to remote repo_
```shell
gradle publish -DdeployUrl=<repo-url> -DdeployUsername=<repo-user> -DdeployPassword=<repo-password>
```

_Set a custom version_
```shell
gradle publish -DmoduleVersion=<version>
```
### ... to GitHub Packages
This module is deployed and published to Maven Central. All JAR files are signed via Gradle signing plugin.

Some hints for using GitHub Packages as Maven repository
The following properties have to be set via command line or ``~/.gradle/gradle.properties``

* Deploy URL is https://maven.pkg.github.com/OWNER/REPOSITRY
* As password generate an access token and grant permissions to ``write:packages`` (Settings -> Developer settings -> Personal access token)
| Property | Description |
| ----------------------------- | --------------------------------------------------- |
| `moduleVersion` | Version of deployed module, default is `1-SNAPSHOT` |
| `deployUrl` | Maven repository URL |
| `deployUsername` | Maven repository username |
| `deployPassword` | Maven repository password |
| `signing.keyId` | GPG private key ID (short form) |
| `signing.password` | GPG private key password |
| `signing.secretKeyRingFile` | Path to GPG private key |

## Documentation

Check out our comprehensive [Testerra documentation](http://docs.testerra.io)!
If all properties are set, call the following to build, deploy and release this module:
````shell
gradle publish closeAndReleaseRepository
````

## Code of Conduct

Expand Down
14 changes: 10 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
plugins {
id "io.codearte.nexus-staging" version "0.30.0"
}

apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'io.codearte.nexus-staging'

ext {
// Minimum required Testerra version
testerraCompileVersion = '2.0-RC-1'
// Unit tests use the latest Testerra version
testerraTestVersion = '[2.0-RC,3-SNAPSHOT)'
testerraTestVersion = '[2.0,3-SNAPSHOT)'
moduleVersion = '2-SNAPSHOT'
if (System.properties.containsKey('moduleVersion')) {
moduleVersion = System.getProperty('moduleVersion')
}

group 'eu.tsystems.mms.tic.testerra'
group 'io.testerra'
version moduleVersion
}

// Do not move this integration because `group` and `version` is needed for publishing
apply from: rootProject.file('publish.gradle')

dependencies {
compileOnly 'eu.tsystems.mms.tic.testerra:driver-ui-desktop:' + testerraCompileVersion
compileOnly 'io.testerra:driver-ui-desktop:' + testerraCompileVersion

testImplementation 'eu.tsystems.mms.tic.testerra:driver-ui-desktop:' + testerraTestVersion
testImplementation 'io.testerra:driver-ui-desktop:' + testerraTestVersion
}

test {
Expand Down
163 changes: 93 additions & 70 deletions publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,117 @@
* Maven publishing configuration
* */

// Maven basis attributes
// Maven pom.xml attributes
ext {
libraryName = 'Testerra'
artifact = project.getName().toLowerCase()
packagingType = 'jar'
libraryName = 'Testerra TeamCity Connector'
packagingType = 'jar'

libraryDescription = "Testerra ${project.getName()} module"
siteUrl = 'https://testerra.io'
gitUrl = 'scm:git:git://github.com/telekom/testerra-teamcity-connector.git'
gitHttpsUrl = 'https://github.com/telekom/testerra-teamcity-connector/'

siteUrl = 'https://testerra.io'
gitUrl = 'https://github.com/telekom/testerra-selenoid-connector.git'
issueUrl = 'https://github.com/telekom/testerra-selenoid-connector/issues'
developerId = 'MMS'
developerName = 'Testerra Team T-Systems MMS'
developerEmail = '[email protected]'
developerOrganization = 'T-Systems MMS'
developerOrganizationUrl = 'https://www.t-systems-mms.com/'

developerId = 'MMS'
developerName = 'Testerra Team T-Systems MMS'
developerEmail = '[email protected]'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}

// Set up the Maven publication.
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom.project {
packaging packagingType
groupId group
artifactId artifact

// Add your description here
name libraryName
description libraryDescription
url siteUrl

// Set your license
licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}

}
}
nexusStaging {
serverUrl = "https://s01.oss.sonatype.org/service/local/"
packageGroup = "io.testerra"
username = System.getProperty("deployUsername")
password = System.getProperty("deployPassword")
}

// Publish to a Maven repository
allprojects {

publishing {
def libraryDescription = "Testerra test automation framework - ${project.getName()} module"

javadoc {
// Support JDK 8 annotations
options.tags = [
"implNote:a:Implementation Note:",
"apiNote:a:API Note:",
"implSpec:a:Implementation Requirements:"
]
// Prevent errors during generation
options.addStringOption('Xdoclint:none', '-quiet')
}

task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
archiveClassifier.set('sources')
from sourceSets.main.allSource
}

artifacts {
archives sourcesJar
task javadocJar(type: Jar) {
archiveClassifier.set('javadoc')
from javadoc
}

publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
}
artifacts {
archives sourcesJar
archives javadocJar
}

repositories {
maven {
url System.getProperty("deployUrl", "none")
credentials {
username System.getProperty("deployUsername", "none")
password System.getProperty("deployPassword", "none")
publishing {

publications {
mavenJava(MavenPublication) {
from components.java
artifact javadocJar
artifact sourcesJar

// Custom pom
pom {

name = libraryName
description = libraryDescription
url = siteUrl

licenses {
license {
name = licenseName
url = licenseUrl
}
}

developers {
developer {
id = developerId
name = developerName
email = developerEmail
organization = developerOrganization
organizationUrl = developerOrganizationUrl
}
}

scm {
connection = gitUrl
developerConnection = gitUrl
url = gitHttpsUrl
}
}
}
}
}

repositories {
maven {
url System.getProperty("deployUrl", "none")
credentials {
username System.getProperty("deployUsername", "none")
password System.getProperty("deployPassword", "none")
}
}
}

signing {
sign publishing.publications.mavenJava
}

}
}
}

0 comments on commit fb89d74

Please sign in to comment.