Skip to content

Commit

Permalink
Bump plugins and clean up POM and build workflows; format code (#137)
Browse files Browse the repository at this point in the history
* Bump org.apache.maven.plugins:maven-surefire-plugin

Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.0.0-M5 to 3.2.5.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](apache/maven-surefire@surefire-3.0.0-M5...surefire-3.2.5)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* POM cleanup and bumps

* apply formatting

* dependency fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matthew Read <MatthewRyanRead@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and MatthewRyanRead authored May 30, 2024
1 parent 113ba73 commit 83f4a98
Show file tree
Hide file tree
Showing 53 changed files with 2,232 additions and 1,397 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,41 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Check out repo
uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
check-latest: false

- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.2
maven-version: 3.9.6

# actions/setup-java does not support multiple servers at this time
# https://github.com/actions/setup-java/issues/85
- name: Setup Nexus authentication and GPG passphrase
- name: Set up Maven servers
uses: whelk-io/maven-settings-xml-action@v21
with:
servers: |
[
{
"id": "sonatype-nexus-staging",
"username": "${{ secrets.OSS_NEXUS_USERNAME }}",
"password": "${{ secrets.OSS_NEXUS_PASSWORD }}"
},
{
"id": "sonatype-nexus-snapshots",
"username": "${{ secrets.OSS_NEXUS_USERNAME }}",
"password": "${{ secrets.OSS_NEXUS_PASSWORD }}"
}
]
- name: Build And Verify
run: mvn -B install
servers: '[
{
"id": "sonatype-nexus-staging",
"username": "${{ secrets.OSS_NEXUS_USERNAME }}",
"password": "${{ secrets.OSS_NEXUS_PASSWORD }}"
},
{
"id": "sonatype-nexus-snapshots",
"username": "${{ secrets.OSS_NEXUS_USERNAME }}",
"password": "${{ secrets.OSS_NEXUS_PASSWORD }}"
}]'

- name: Resolve plugins
run: mvn dependency:resolve-plugins

- name: Run dependency analysis
run: mvn dependency:analyze

- name: Build and verify
run: mvn verify
81 changes: 55 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,46 @@
---
# yamllint disable rule:line-length

name: Release

on:
pull_request:
types: [closed]
branches:
- master
on: # yamllint disable-line rule:truthy
workflow_dispatch:

concurrency:
group: conduit-release
cancel-in-progress: true

jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

env:
NEXUS_USER: ${{ secrets.OSS_NEXUS_USERNAME }}
NEXUS_PASS: ${{ secrets.OSS_NEXUS_PASSWORD }}

steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Fail if not on valid branch
if: github.ref != 'refs/heads/master'
run: |
echo "::error title=Invalid Branch::This workflow can only be run on specific branches"
exit 1
- name: Check out repo
uses: actions/checkout@v4

- name: Install Java and Maven
uses: actions/setup-java@v3
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
check-latest: false

- name: Configure git
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.6

- name: Configure Git
run: |
git config --global user.email "infrastructure+deploy@renttherunway.com"
git config --global user.name "rtr-deploy"
Expand All @@ -34,8 +52,9 @@ jobs:
echo "$GPG_KEY" | base64 -d > private.key
gpg --import --batch --yes ./private.key
rm ./private.key
gpg -k
- name: Setup Nexus authentication and GPG passphrase
- name: Set up Maven servers and GPG passphrase
uses: whelk-io/maven-settings-xml-action@v21
with:
profiles: '[
Expand All @@ -46,18 +65,13 @@ jobs:
}]'
servers: '[
{
"id": "sonatype-nexus-staging",
"username": "${{ secrets.OSS_NEXUS_USERNAME }}",
"password": "${{ secrets.OSS_NEXUS_PASSWORD }}"
},
{
"id": "sonatype-nexus-snapshots",
"username": "${{ secrets.OSS_NEXUS_USERNAME }}",
"password": "${{ secrets.OSS_NEXUS_PASSWORD }}"
"id": "ossrh",
"username": "${{ env.NEXUS_USER }}",
"password": "${{ env.NEXUS_PASS }}"
}]'

- name: Setup Github SSH key
uses: webfactory/ssh-agent@v0.8.0
- name: Set up Github SSH key
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_KEY }}

Expand All @@ -68,13 +82,28 @@ jobs:
echo 'github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=' >> ~/.ssh/known_hosts
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' >> ~/.ssh/known_hosts
# This step will run the tests, so we skip running them again on release:perform
- name: Resolve dependencies
run: mvn -B dependency:resolve-plugins dependency:go-offline

- name: Prepare release
id: prepare-release
continue-on-error: true
run: mvn -B release:prepare

- name: Perform release
run: mvn -B release:perform -DskipTests
id: perform-release
continue-on-error: true
if: ${{ steps.prepare-release.outcome == 'success' }}
run: mvn -B release:perform -Darguments='-DskipTests -DskipITs'

- name: A step failed
if: ${{ failure() }}
- name: Rollback on release failure
if: ${{ steps.prepare-release.outcome != 'success' || steps.perform-release.outcome != 'success' }}
run: mvn release:rollback

# Separate from rollback step so it doesn't look like the rollback itself failed
- name: Fail build on release failure
if: ${{ steps.prepare-release.outcome != 'success' || steps.perform-release.outcome != 'success' }}
run: |
echo "Prepare release: ${{ steps.prepare-release.outcome }}"
echo "Perform release: ${{ steps.perform-release.outcome }}"
exit 1
28 changes: 25 additions & 3 deletions conduit-bom/pom.xml
Original file line number Diff line number Diff line change
@@ -1,35 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>conduit-parent</artifactId>
<groupId>io.rtr</groupId>
<version>1.46-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<name>Conduit BOM</name>
<description>Full Bill of Materials for Conduit (internal + external libraries)</description>
<artifactId>conduit-bom</artifactId>
<packaging>pom</packaging>

<properties>
<amqp-client.version>5.14.2</amqp-client.version>
<slf4j-api.version>1.7.35</slf4j-api.version>
<logback.version>1.2.11</logback.version>
<slf4j.version>1.7.36</slf4j.version>
</properties>

<dependencyManagement>
<dependencies>
<!-- internal -->
<dependency>
<groupId>io.rtr</groupId>
<artifactId>conduit</artifactId>
<version>${project.version}</version>
</dependency>

<!-- major dependencies -->
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>${amqp-client.version}</version>
</dependency>

<!-- logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
<version>${slf4j.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
Loading

0 comments on commit 83f4a98

Please sign in to comment.