Skip to content

Commit

Permalink
Migrate CI/CD to GitHub Actions
Browse files Browse the repository at this point in the history
* Remove JFrog plugin since it is supplied from CI/CD by Gradle init script
* Remove Sonar and Jacoco since we don't manage those service anymore
  • Loading branch information
artembilan committed Dec 1, 2023
1 parent b0194e9 commit 5042125
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 237 deletions.
39 changes: 0 additions & 39 deletions .github/release-files-spec.json

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/central-sync-close.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/central-sync-create.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/central-sync-release.yml

This file was deleted.

17 changes: 11 additions & 6 deletions .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ name: CI SNAPSHOT

on:
workflow_dispatch:
# push:
# branches:
# - main
push:
branches:
- main
- 6.1.x

jobs:
build_snapshot:
uses: spring-projects/spring-integration-aws/.github/workflows/ci-snapshot.yml@main
secrets: inherit
build-snapshot:
uses: artembilan/spring-github-workflows/.github/workflows/spring-artifactory-gradle-snapshot.yml@main
secrets:
GRADLE_ENTERPRISE_CACHE_USER: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
47 changes: 0 additions & 47 deletions .github/workflows/pr-build-workflow.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Pull Request Build

on:
pull_request:
branches:
- main

jobs:
build-pull-request:
uses: artembilan/spring-github-workflows/.github/workflows/spring-gradle-pull-request-build.yml@main
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release

on:
workflow_dispatch:

run-name: Release current version for branch ${{ github.ref_name }}

jobs:
release:
permissions:
actions: write

uses: artembilan/spring-github-workflows/.github/workflows/spring-artifactory-gradle-release.yml@main
secrets:
GH_ACTIONS_REPO_TOKEN: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
GRADLE_ENTERPRISE_CACHE_USER: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
OSSRH_URL: ${{ secrets.OSSRH_URL }}
OSSRH_S01_TOKEN_USERNAME: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
OSSRH_S01_TOKEN_PASSWORD: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
OSSRH_STAGING_PROFILE_NAME: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
SPRING_RELEASE_SLACK_WEBHOOK_URL: ${{ secrets.SPRING_RELEASE_SLACK_WEBHOOK_URL }}
43 changes: 43 additions & 0 deletions .github/workflows/verify-staged-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Verify Staged Artifacts

on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release version like 5.0.0-M1, 5.1.0-RC1, 5.2.0 etc.'
required: true
type: string

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 }}
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}

jobs:
verify-staged-with-samples:
runs-on: ubuntu-latest
steps:

- name: Checkout Samples Repo
uses: actions/checkout@v4
with:
repository: spring-projects/spring-integration-samples
show-progress: false

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: 'gradle'

- uses: jfrog/setup-jfrog-cli@v3

- name: Configure JFrog Cli
run: jf gradlec --repo-resolve libs-staging-local

- name: Verify Spring Integration Samples against staged release
run: |
sed -i "1,/springIntegrationVersion.*/s/springIntegrationVersion.*/springIntegrationVersion='${{ inputs.releaseVersion }}'/" build.gradle
jf gradle check
38 changes: 1 addition & 37 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext.kotlinVersion = '1.9.10'
ext.isCI = System.getenv('GITHUB_ACTION') || System.getenv('bamboo_buildKey')
ext.isCI = System.getenv('GITHUB_ACTION')
repositories {
gradlePluginPortal()
mavenCentral()
Expand All @@ -16,11 +16,9 @@ buildscript {

plugins {
id 'base'
id 'org.sonarqube' version '4.3.1.3277'
id 'io.spring.nohttp' version '0.0.11' apply false
id 'org.ajoberstar.grgit' version '4.1.1'
id 'io.spring.dependency-management' version '1.1.4'
id 'com.jfrog.artifactory' version '5.1.10' apply false
id 'org.jetbrains.dokka' version "$kotlinVersion"
id 'org.antora' version '1.0.0'
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
Expand Down Expand Up @@ -190,7 +188,6 @@ configure(javaProjects) { subproject ->
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
Expand Down Expand Up @@ -218,7 +215,6 @@ configure(javaProjects) { subproject ->

compileJava {
options.release = 17
options.compilerArgs << '-parameters'
}

compileTestJava {
Expand Down Expand Up @@ -248,10 +244,6 @@ configure(javaProjects) { subproject ->
}
}

jacoco {
toolVersion = '0.8.10'
}

// dependencies that are common across all java projects
dependencies {
if (!(subproject.name ==~ /.*-test.*/)) {
Expand Down Expand Up @@ -329,23 +321,9 @@ configure(javaProjects) { subproject ->

compileKotlin.dependsOn updateCopyrights

jacocoTestReport {
onlyIf { System.properties['sonar.host.url'] }
dependsOn test
reports {
xml.required = true
html.required = false
}
}

rootProject.tasks['sonarqube'].dependsOn jacocoTestReport

test {
maxHeapSize = '2g'
jvmArgs '-XX:+HeapDumpOnOutOfMemoryError'
jacoco {
destinationFile = file("$buildDir/jacoco.exec")
}
}

tasks.register('testAll', Test) { dependsOn['check'] }
Expand Down Expand Up @@ -1101,20 +1079,6 @@ project('spring-integration-bom') {
}
}
}

sonar {
skipProject = true
}
}

sonar {
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
}
}

tasks.register('api', Javadoc) {
Expand Down
Loading

0 comments on commit 5042125

Please sign in to comment.