Skip to content

Commit

Permalink
replace TravisCI with GH actions and packages
Browse files Browse the repository at this point in the history
Remove OSSRH deployment.
Remove GPG signing and POM metadata that we included to satisfy OSSRH requirements.
  • Loading branch information
abyrd committed Jan 6, 2021
1 parent fb5ef51 commit bccb7a5
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 182 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: OTP CI Build
# On [push, pull_request] causes double-builds when creating PRs.
# But triggering on push only will miss pull requests from outside authors.
# The push event's ref is the name of the pushed branch;
# The pull_request event's branch name is the merge target branch.
on:
push:
branches:
- master
- dev-1.x
- dev-2.x
pull_request:
branches:
- master
- dev-1.x
- dev-2.x
jobs:
build:
runs-on: ubuntu-latest
steps:
# Starting in v2.2 checkout action fetches all tags when fetch-depth=0, for auto-versioning.
- uses: actions/[email protected]
with:
fetch-depth: 0
# Java setup step completes very fast, no need to run in a preconfigured docker container
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/cache@v2
id: cache
with:
path: ~/.m2
key: maven-local-repo
- name: Build and Test
run: mvn --batch-mode --update-snapshots verify
- name: Deploy to Github Package Registry
# if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev-1.x' || github.ref == 'refs/heads/dev-2.x')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --batch-mode deploy --settings maven-settings.xml -DskipTests
61 changes: 0 additions & 61 deletions .travis.yml

This file was deleted.

19 changes: 0 additions & 19 deletions docs/javadoc/README.md

This file was deleted.

Binary file removed maven-artifact-signing-key.asc.enc
Binary file not shown.
25 changes: 6 additions & 19 deletions maven-settings.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
<!-- This file provides passwords and key details to the Maven plugins that sign our artifacts
and deploy them to the OSSRH repository. The secret information is passed in with
Travis CI secure environment variables in .travis.yml. -->
<!-- This file provides credentials and other details to the Maven plugins that deploy our artifacts.
These are provided with Github repo secrets (and secrets.GITHUB_TOKEN is provided automatically).
Those secrets are copied to environment variables by the CI Action. -->
<settings>
<servers>
<server>
<id>ossrh</id>
<username>${env.OSSRH_JIRA_USERNAME}</username>
<password>${env.OSSRH_JIRA_PASSWORD}</password>
<id>github</id>
<username>NONE</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>

88 changes: 5 additions & 83 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,7 @@
</license>
</licenses>

<!-- Developer entries are provided for only first six contributors on the Github stats page for to the 2.x branch.
For other contributors, see https://github.com/opentripplanner/OpenTripPlanner/graphs/contributors -->
<developers>
<developer>
<name>Andrew Byrd</name>
<email>[email protected]</email>
<organization>Conveyal</organization>
<organizationUrl>http://conveyal.com/</organizationUrl>
</developer>
<developer>
<name>Matt Conway</name>
<email>[email protected]</email>
<organization>Conveyal</organization>
<organizationUrl>http://conveyal.com/</organizationUrl>
</developer>
<developer>
<name>Thomas Gran</name>
<email>[email protected]</email>
<organization>Ruter and Entur</organization>
<organizationUrl>http://entur.org/</organizationUrl>
</developer>
<developer>
<name>Laurent Grégoire</name>
<email>[email protected]</email>
<organization>Mecatran</organization>
<organizationUrl>http://www.mecatran.com/</organizationUrl>
</developer>
<developer>
<name>Gard Mellemstrand</name>
<email>[email protected]</email>
<organization>Entur</organization>
<organizationUrl>http://entur.org/</organizationUrl>
</developer>
<developer>
<name>David Novalis Turner</name>
<email>[email protected]</email>
<organization>Ex-OpenPlans</organization>
<organizationUrl>http://openplans.org/</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:http://github.com/opentripplanner/OpenTripPlanner.git</connection>
<developerConnection>scm:git:ssh://[email protected]/opentripplanner/OpenTripPlanner.git</developerConnection>
<url>http://github.com/opentripplanner/OpenTripPlanner</url>
</scm>

Expand All @@ -75,12 +32,11 @@
</properties>

<distributionManagement>
<!-- We are using Sonatype Nexus Staging instead of Maven Release plugin.
Only a snapshot repo should be configured. Releases are done from that snapshot staging repo. -->
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>github</id>
<name>OpenTripPlanner Maven Repository on Github Packages</name>
<url>https://maven.pkg.github.com/opentripplanner/OpenTripPlanner/</url>
</repository>
</distributionManagement>

<build>
Expand Down Expand Up @@ -203,18 +159,6 @@
</execution>
</executions>
</plugin>
<plugin>
<!-- Recommended way to deploy to OSSRH , which allows deferred manual release to Central. -->
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-maven-plugin</artifactId>
Expand All @@ -232,13 +176,6 @@
<docsDir>${project.build.directory}/site/enunciate</docsDir>
</configuration>
</plugin>
<plugin>
<!-- OTP includes an empty javadoc.jar file. See docs/javadoc/README.md -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<configuration><skip>true</skip></configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down Expand Up @@ -285,21 +222,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<!-- We sign in the verify phase, which means it will happen for install and deploy but not package. -->
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down

0 comments on commit bccb7a5

Please sign in to comment.