Snapshot build
* Rename modules to follow naming schema * Deploy snapshot * Provide ci and pr-ci build
This commit is contained in:
42
.github/workflows/ci-pr.yml
vendored
Normal file
42
.github/workflows/ci-pr.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: CI PRs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
timeout-minutes: 15
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- nickname: win
|
||||
os: windows-latest
|
||||
java: 17
|
||||
- nickname: macos
|
||||
os: macos-latest
|
||||
java: 17
|
||||
- nickname: linux
|
||||
os: ubuntu-latest
|
||||
java: 17
|
||||
name: CI Build ${{ matrix.nickname }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: jvalkeal/setup-maven@v1
|
||||
with:
|
||||
maven-version: 3.6.3
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: liberica
|
||||
java-version: ${{ matrix.java }}
|
||||
cache: maven
|
||||
- name: Verify formatting
|
||||
run: ./mvnw -B -Pfunctional-tests spring-javaformat:validate
|
||||
- name: Build (Windows and MacOS, no functional tests)
|
||||
if: runner.os != 'Linux'
|
||||
run: ./mvnw -B clean install
|
||||
- name: Build (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: ./mvnw -B -Pfunctional-tests clean install
|
||||
91
.github/workflows/ci.yml
vendored
Normal file
91
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
timeout-minutes: 15
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- nickname: win
|
||||
os: windows-latest
|
||||
java: 17
|
||||
- nickname: macos
|
||||
os: macos-latest
|
||||
java: 17
|
||||
- nickname: linux
|
||||
os: ubuntu-latest
|
||||
java: 17
|
||||
name: CI Build ${{ matrix.nickname }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: jvalkeal/setup-maven@v1
|
||||
with:
|
||||
maven-version: 3.6.3
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: liberica
|
||||
java-version: ${{ matrix.java }}
|
||||
# this takes minutes and stretches build time
|
||||
# - name: Setup docker (missing on MacOS)
|
||||
# if: runner.os == 'macos'
|
||||
# run: |
|
||||
# brew install docker
|
||||
# colima start
|
||||
#
|
||||
# # For testcontainers to find the Colima socket
|
||||
# # https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
|
||||
# sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
|
||||
- name: Verify formatting
|
||||
run: ./mvnw -B -Pfunctional-tests spring-javaformat:validate
|
||||
- name: Build (Windows and MacOS, no functional tests)
|
||||
if: runner.os != 'Linux'
|
||||
run: ./mvnw -B clean install
|
||||
- name: Build (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: ./mvnw -B -Pfunctional-tests clean install
|
||||
deploy:
|
||||
needs: build
|
||||
if: |
|
||||
github.ref_name == 'main' &&
|
||||
github.repository == 'spring-projects/spring-rewrite-commons'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: jfrog/setup-jfrog-cli@v3
|
||||
env:
|
||||
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
|
||||
|
||||
- name: Deploy Snapshot
|
||||
run: |
|
||||
|
||||
jf mvnc \
|
||||
--server-id-deploy repo.spring.io \
|
||||
--repo-deploy-releases release \
|
||||
--repo-deploy-snapshots snapshot
|
||||
echo JFROG_CLI_BUILD_NAME=spring-rewrite-commons-main >> $GITHUB_ENV
|
||||
echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
|
||||
|
||||
jf mvn clean install -X -B -DskipTests
|
||||
jf rt build-publish
|
||||
|
||||
# - uses: actions/checkout@v4
|
||||
# - uses: jvalkeal/setup-maven@v1
|
||||
# with:
|
||||
# maven-version: 3.6.3
|
||||
# - uses: actions/setup-java@v4
|
||||
# with:
|
||||
# distribution: liberica
|
||||
# java-version: 17
|
||||
# - name: Deploy Snapshot
|
||||
# working-directory: ./spring-rewrite-commons-launcher
|
||||
# env:
|
||||
# ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
# ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
# run: ./mvnw -B -Partifactory,javadoc -DskipTests deploy
|
||||
66
.github/workflows/continuous-integration.yml
vendored
66
.github/workflows/continuous-integration.yml
vendored
@@ -1,66 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.github/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
timeout-minutes: 15
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- nickname: win
|
||||
os: windows-latest
|
||||
java: 17
|
||||
- nickname: macos
|
||||
os: macos-latest
|
||||
java: 17
|
||||
- nickname: linux
|
||||
os: ubuntu-latest
|
||||
java: 17
|
||||
name: CI Build ${{ matrix.nickname }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: jvalkeal/setup-maven@v1
|
||||
with:
|
||||
maven-version: 3.6.3
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: liberica
|
||||
java-version: ${{ matrix.java }}
|
||||
- name: Setup docker (missing on MacOS)
|
||||
if: runner.os == 'macos'
|
||||
run: |
|
||||
brew install docker
|
||||
colima start
|
||||
|
||||
# For testcontainers to find the Colima socket
|
||||
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
|
||||
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
|
||||
- name: Verify formatting
|
||||
run: ./mvnw -B -Pfunctional-tests spring-javaformat:validate
|
||||
- name: Build (Windows, no functional tests)
|
||||
if: runner.os == 'Windows'
|
||||
run: ./mvnw -B clean install
|
||||
- name: Build (Non Windows)
|
||||
if: runner.os != 'Windows'
|
||||
run: ./mvnw -B -Pfunctional-tests clean install
|
||||
deploy:
|
||||
# Deploy when in own repo, on main, and previous build succeeded
|
||||
if: |
|
||||
github.ref == 'ref/head/main' &&
|
||||
github.repository == 'spring-projects/spring-rewrite-commons'
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy Snapshot
|
||||
env:
|
||||
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
|
||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||
run: ./mvnw -B -DskipTests clean deploy -Partifactory
|
||||
Reference in New Issue
Block a user