Migrate CI from Bamboo to GitHub Actions

This commit is contained in:
Artem Bilan
2023-11-08 16:03:14 -05:00
parent 1c98e3fd99
commit 75d4825be3
8 changed files with 140 additions and 47 deletions

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'type: bug, status: waiting-for-triage'
assignees: ''
---
**In what version(s) of Spring Integration are you seeing this issue?**
For example:
2.5.3
Between 2.5.0 and 3.0.0
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Sample**
A link to a GitHub repository with a [minimal, reproducible sample](https://stackoverflow.com/help/minimal-reproducible-example).
Reports that include a sample will take priority over reports that do not.
At times, we may require a sample, so it is good to try and include a sample up front.

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Community Support
url: https://stackoverflow.com/questions/tagged/spring-integration
about: Please ask and answer questions on StackOverflow with the tag spring-integration

View File

@@ -0,0 +1,25 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'status: waiting-for-triage, type: enhancement'
assignees: ''
---
**Expected Behavior**
<!--- Tell us how it should work -->
**Current Behavior**
<!--- Explain the difference from current behavior -->
**Context**
<!---
How has this issue affected you?
What are you trying to accomplish?
What other alternatives have you considered?
Are you aware of any workarounds?
-->

6
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,6 @@
<!--
Thanks for contributing to Spring Integration Samples.
Please provide a brief description of your pull-request and reference any related issue numbers (prefix references with #) or StackOverflow questions.
See the [Contributor Guidelines for more information](https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc).
-->

29
.github/workflows/ci-snapshot.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: CI SNAPSHOT
on:
workflow_dispatch:
push:
branches:
- main
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
jobs:
build_snapshot:
runs-on: ubuntu-latest
name: CI Build SNAPSHOT for ${{ github.ref_name }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Set up Gradle
uses: spring-io/spring-gradle-build-action@v2
- name: Build
run: ./gradlew check

40
.github/workflows/pr-build.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Pull Request Build
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
cache: gradle
- name: Build PR
uses: burrunan/gradle-cache-action@v1
with:
debug: false
concurrent: true
gradle-build-scan-report: false
arguments: check
- name: Capture Test Results
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-results
path: '*/build/reports/tests/**/*.*'
retention-days: 3

View File

@@ -1,17 +0,0 @@
dist: trusty
language: java
jdk: oraclejdk8
sudo: false
services:
- mongodb
- rabbitmq
- redis-server
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
install: true
script:
- ./gradlew check --refresh-dependencies --no-daemon

View File

@@ -11,9 +11,6 @@ buildscript {
classpath 'org.gretty:gretty:4.0.3'
}
}
plugins {
id 'org.sonarqube' version '4.0.0.2929'
}
description = 'Spring Integration Samples'
@@ -304,27 +301,10 @@ subprojects { subproject ->
ext.xLintArg = '-Xlint:all,-options,-processing'
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg]
jacocoTestReport {
onlyIf { System.properties['sonar.host.url'] }
dependsOn test
reports {
xml.required = true
html.required = false
}
}
rootProject.tasks['sonarqube'].dependsOn jacocoTestReport
test {
useJUnitPlatform()
// suppress all console output during testing unless running `gradle -i`
logging.captureStandardOutput(LogLevel.INFO)
jacoco {
destinationFile = file("$buildDir/jacoco.exec")
}
if (System.properties['sonar.host.url']) {
finalizedBy jacocoTestReport
}
}
}
@@ -1554,13 +1534,3 @@ project('tcp-with-headers') {
standardInput = System.in
}
}
sonarqube {
properties {
property 'sonar.links.homepage', linkHomepage
property 'sonar.links.ci', linkCi
property 'sonar.links.issue', linkIssue
property 'sonar.links.scm', linkScmUrl
property 'sonar.links.scm_dev', linkScmDevConnection
}
}