From 9953bc16112f464e7beda6a35e45becdc7b53a00 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Date: Thu, 22 Feb 2024 15:40:34 +0100 Subject: [PATCH 1/5] customization --- .github/workflows/central-sync.yml | 2 +- .github/workflows/graalvm-dev.yml | 6 ++-- .github/workflows/graalvm-latest.yml | 6 ++-- .github/workflows/gradle.yml | 4 +-- .github/workflows/publish-snapshot.yml | 4 +-- .github/workflows/release.yml | 2 +- .github/workflows/template-cleanup.yml | 30 +++++++++---------- .github/workflows/update-gradle-wrapper.yml | 4 +-- CONTRIBUTING.md | 8 ++--- MAINTAINING.md | 4 +-- README.md | 24 +++++++-------- ...aut.build.internal.opensearch-base.gradle} | 2 +- ...ut.build.internal.opensearch-module.gradle | 4 +++ ...ld.internal.project-template-module.gradle | 4 --- gradle.properties | 6 ++-- opensearch-bom/build.gradle.kts | 10 +++++++ opensearch/build.gradle.kts | 10 +++++++ project-template-bom/build.gradle | 4 --- project-template/build.gradle | 3 -- settings.gradle | 6 ++-- 20 files changed, 78 insertions(+), 65 deletions(-) rename buildSrc/src/main/groovy/{io.micronaut.build.internal.project-template-base.gradle => io.micronaut.build.internal.opensearch-base.gradle} (64%) create mode 100644 buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-module.gradle delete mode 100644 buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-module.gradle create mode 100644 opensearch-bom/build.gradle.kts create mode 100644 opensearch/build.gradle.kts delete mode 100644 project-template-bom/build.gradle delete mode 100644 project-template/build.gradle diff --git a/.github/workflows/central-sync.yml b/.github/workflows/central-sync.yml index dd1f3514..80618c52 100644 --- a/.github/workflows/central-sync.yml +++ b/.github/workflows/central-sync.yml @@ -1,6 +1,6 @@ # WARNING: Do not edit this file directly. Instead, go to: # -# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# https://github.com/micronaut-projects/micronaut-opensearch/tree/master/.github/workflows # # and edit them there. Note that it will be sync'ed to all the Micronaut repos name: Maven Central Sync diff --git a/.github/workflows/graalvm-dev.yml b/.github/workflows/graalvm-dev.yml index eb0203b2..c3446159 100644 --- a/.github/workflows/graalvm-dev.yml +++ b/.github/workflows/graalvm-dev.yml @@ -1,6 +1,6 @@ # WARNING: Do not edit this file directly. Instead, go to: # -# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# https://github.com/micronaut-projects/micronaut-opensearch/tree/master/.github/workflows # # and edit them there. Note that it will be sync'ed to all the Micronaut repos name: GraalVM Dev CI @@ -9,7 +9,7 @@ on: - cron: "0 1 * * 1-5" # Mon-Fri at 1am UTC jobs: build_matrix: - if: github.repository != 'micronaut-projects/micronaut-project-template' + if: github.repository != 'micronaut-projects/micronaut-opensearch' runs-on: ubuntu-latest env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} @@ -24,7 +24,7 @@ jobs: id: build-matrix build: needs: build_matrix - if: github.repository != 'micronaut-projects/micronaut-project-template' + if: github.repository != 'micronaut-projects/micronaut-opensearch' runs-on: ubuntu-latest strategy: max-parallel: 6 diff --git a/.github/workflows/graalvm-latest.yml b/.github/workflows/graalvm-latest.yml index d150aa60..8c64361a 100644 --- a/.github/workflows/graalvm-latest.yml +++ b/.github/workflows/graalvm-latest.yml @@ -1,6 +1,6 @@ # WARNING: Do not edit this file directly. Instead, go to: # -# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# https://github.com/micronaut-projects/micronaut-opensearch/tree/master/.github/workflows # # and edit them there. Note that it will be sync'ed to all the Micronaut repos name: GraalVM Latest CI @@ -15,7 +15,7 @@ on: - '[1-9]+.[0-9]+.x' jobs: build_matrix: - if: github.repository != 'micronaut-projects/micronaut-project-template' + if: github.repository != 'micronaut-projects/micronaut-opensearch' runs-on: ubuntu-latest env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} @@ -30,7 +30,7 @@ jobs: id: build-matrix build: needs: build_matrix - if: github.repository != 'micronaut-projects/micronaut-project-template' + if: github.repository != 'micronaut-projects/micronaut-opensearch' runs-on: ubuntu-latest strategy: max-parallel: 6 diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 8ca81050..d3fb1c90 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,6 +1,6 @@ # WARNING: Do not edit this file directly. Instead, go to: # -# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# https://github.com/micronaut-projects/micronaut-opensearch/tree/master/.github/workflows # # and edit them there. Note that it will be sync'ed to all the Micronaut repos name: Java CI @@ -15,7 +15,7 @@ on: - '[1-9]+.[0-9]+.x' jobs: build: - if: github.repository != 'micronaut-projects/micronaut-project-template' + if: github.repository != 'micronaut-projects/micronaut-opensearch' runs-on: ubuntu-latest strategy: matrix: diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 0875db92..dcca52a4 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -1,13 +1,13 @@ # WARNING: Do not edit this file directly. Instead, go to: # -# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# https://github.com/micronaut-projects/micronaut-opensearch/tree/master/.github/workflows # # and edit them there. Note that it will be sync'ed to all the Micronaut repos name: Publish snapshot release on: [workflow_dispatch] jobs: build: - if: github.repository != 'micronaut-projects/micronaut-project-template' + if: github.repository != 'micronaut-projects/micronaut-opensearch' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4158900b..d071fbcc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ # WARNING: Do not edit this file directly. Instead, go to: # -# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# https://github.com/micronaut-projects/micronaut-opensearch/tree/master/.github/workflows # # and edit them there. Note that it will be sync'ed to all the Micronaut repos name: Release diff --git a/.github/workflows/template-cleanup.yml b/.github/workflows/template-cleanup.yml index 64fdf303..e6372558 100644 --- a/.github/workflows/template-cleanup.yml +++ b/.github/workflows/template-cleanup.yml @@ -7,11 +7,11 @@ on: jobs: - # Run cleaning process only if workflow is triggered by the non micronaut-project/micronaut-project-template repository. + # Run cleaning process only if workflow is triggered by the non micronaut-project/micronaut-opensearch repository. template-cleanup: name: Template Cleanup runs-on: ubuntu-latest - if: github.event.repository.name != 'micronaut-project-template' + if: github.event.repository.name != 'micronaut-opensearch' steps: # Check out current repository @@ -22,19 +22,19 @@ jobs: - name: Cleanup run: | # Update CLA url in CONTRIBUTING.md - sed -i "s|micronaut-projects/micronaut-project-template|$GITHUB_REPOSITORY|" CONTRIBUTING.md - sed -i "s|project-template|${GITHUB_REPOSITORY:29}|" README.md - sed -i "s|project-template|${GITHUB_REPOSITORY:29}|" gradle.properties - sed -i "s|project-template|${GITHUB_REPOSITORY:29}|" CONTRIBUTING.md - sed -i "s|project-template|${GITHUB_REPOSITORY:29}|" MAINTAINING.md - sed -i "s|micronaut-projects/micronaut-project-template|$GITHUB_REPOSITORY|" SECURITY.md - sed -i "s|project-template|${GITHUB_REPOSITORY:29}|" project-template/build.gradle - sed -i "s|project-template|${GITHUB_REPOSITORY:29}|" project-template-bom/build.gradle - sed -i "s|project-template|${GITHUB_REPOSITORY:29}|" buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-module.gradle - git mv project-template/ "micronaut-${GITHUB_REPOSITORY:29}/" - git mv project-template-bom/ "micronaut-${GITHUB_REPOSITORY:29}-bom/" - git mv buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-module.gradle "buildSrc/src/main/groovy/io.micronaut.build.internal.${GITHUB_REPOSITORY:29}-module.gradle" - git mv buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-base.gradle "buildSrc/src/main/groovy/io.micronaut.build.internal.${GITHUB_REPOSITORY:29}-base.gradle" + sed -i "s|micronaut-projects/micronaut-opensearch|$GITHUB_REPOSITORY|" CONTRIBUTING.md + sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" README.md + sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" gradle.properties + sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" CONTRIBUTING.md + sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" MAINTAINING.md + sed -i "s|micronaut-projects/micronaut-opensearch|$GITHUB_REPOSITORY|" SECURITY.md + sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" opensearch/build.gradle + sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" opensearch-bom/build.gradle + sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-module.gradle + git mv opensearch/ "micronaut-${GITHUB_REPOSITORY:29}/" + git mv opensearch-bom/ "micronaut-${GITHUB_REPOSITORY:29}-bom/" + git mv buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-module.gradle "buildSrc/src/main/groovy/io.micronaut.build.internal.${GITHUB_REPOSITORY:29}-module.gradle" + git mv buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-base.gradle "buildSrc/src/main/groovy/io.micronaut.build.internal.${GITHUB_REPOSITORY:29}-base.gradle" # Remove clean up template rm -rf .github/workflows/template-cleanup.yml # Commit modified files diff --git a/.github/workflows/update-gradle-wrapper.yml b/.github/workflows/update-gradle-wrapper.yml index 2977ad15..d751649d 100644 --- a/.github/workflows/update-gradle-wrapper.yml +++ b/.github/workflows/update-gradle-wrapper.yml @@ -1,6 +1,6 @@ # WARNING: Do not edit this file directly. Instead, go to: # -# https://github.com/micronaut-projects/micronaut-project-template/tree/master/.github/workflows +# https://github.com/micronaut-projects/micronaut-opensearch/tree/master/.github/workflows # # and edit them there. Note that it will be sync'ed to all the Micronaut repos name: Update Gradle Wrapper @@ -9,7 +9,7 @@ on: - cron: '0 3 * * SAT' jobs: update-wrapper: - if: github.repository == 'micronaut-projects/micronaut-project-template' + if: github.repository == 'micronaut-projects/micronaut-opensearch' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2e19569..5276fa6c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing Code or Documentation to Micronaut -Sign the [Contributor License Agreement (CLA)](https://cla-assistant.io/micronaut-projects/micronaut-project-template). This is required before any of your code or pull-requests are accepted. +Sign the [Contributor License Agreement (CLA)](https://cla-assistant.io/micronaut-projects/micronaut-opensearch). This is required before any of your code or pull-requests are accepted. ## Finding Issues to Work on @@ -8,15 +8,15 @@ If you are interested in contributing to Micronaut and are looking for issues to ## JDK Setup -Micronaut project-template currently requires JDK 17. +Micronaut opensearch currently requires JDK 17. ## IDE Setup -Micronaut project-template can be imported into IntelliJ IDEA by opening the `build.gradle` file. +Micronaut opensearch can be imported into IntelliJ IDEA by opening the `build.gradle` file. ## Docker Setup -Micronaut project-template tests currently require Docker to be installed. +Micronaut opensearch tests currently require Docker to be installed. ## Running Tests diff --git a/MAINTAINING.md b/MAINTAINING.md index 104efbae..702818ea 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -115,7 +115,7 @@ Renovate and our workflow will keep sending PRs. You should also create an issue #### Files sync -We have a [template repo](https://github.com/micronaut-projects/micronaut-project-template) that we use as the single +We have a [template repo](https://github.com/micronaut-projects/micronaut-opensearch) that we use as the single source of truth for certain files. It is used as a template to create new repos, and changes to certain files in the template repo will get propagated automatically. The files propagated are: @@ -169,7 +169,7 @@ If you are publishing a milestone or release candidate, check the pre-release ch Note that the release tags must be preceded with `v`, e.g.: `v1.2.3`. Once you publish the GitHub release, the -[Release GitHub Action workflow](https://github.com/micronaut-projects/micronaut-project-template/blob/master/.github/workflows/release.yml) +[Release GitHub Action workflow](https://github.com/micronaut-projects/micronaut-opensearch/blob/master/.github/workflows/release.yml) will kick off, performing the following steps: * Pre-release: sets the `projectVersion` property in `gradle.properties` to the release version, and commit and pushes diff --git a/README.md b/README.md index e4e1b3fc..23e2d881 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,35 @@ -# Micronaut project-template +# Micronaut opensearch -[![Maven Central](https://img.shields.io/maven-central/v/io.micronaut.project-template/micronaut-project-template.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.micronaut.project-template%22%20AND%20a:%22micronaut-project-template%22) -[![Build Status](https://github.com/micronaut-projects/micronaut-project-template/workflows/Java%20CI/badge.svg)](https://github.com/micronaut-projects/micronaut-project-template/actions) +[![Maven Central](https://img.shields.io/maven-central/v/io.micronaut.opensearch/micronaut-opensearch.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.micronaut.opensearch%22%20AND%20a:%22micronaut-opensearch%22) +[![Build Status](https://github.com/micronaut-projects/micronaut-opensearch/workflows/Java%20CI/badge.svg)](https://github.com/micronaut-projects/micronaut-opensearch/actions) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=micronaut-projects_micronaut-template&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=micronaut-projects_micronaut-template) [![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A)](https://ge.micronaut.io/scans) -Micronaut project-template +Micronaut opensearch ## Documentation -See the [Documentation](https://micronaut-projects.github.io/micronaut-project-template/latest/guide/) for more information. +See the [Documentation](https://micronaut-projects.github.io/micronaut-opensearch/latest/guide/) for more information. -See the [Snapshot Documentation](https://micronaut-projects.github.io/micronaut-project-template/snapshot/guide/) for the current development docs. +See the [Snapshot Documentation](https://micronaut-projects.github.io/micronaut-opensearch/snapshot/guide/) for the current development docs. +Examples can be found in the [examples](https://github.com/micronaut-projects/micronaut-opensearch/tree/master/examples) directory. --> ## Snapshots and Releases -Snapshots are automatically published to [Sonatype Snapshots](https://s01.oss.sonatype.org/content/repositories/snapshots/io/micronaut/) using [GitHub Actions](https://github.com/micronaut-projects/micronaut-project-template/actions). +Snapshots are automatically published to [Sonatype Snapshots](https://s01.oss.sonatype.org/content/repositories/snapshots/io/micronaut/) using [GitHub Actions](https://github.com/micronaut-projects/micronaut-opensearch/actions). See the documentation in the [Micronaut Docs](https://docs.micronaut.io/latest/guide/index.html#usingsnapshots) for how to configure your build to use snapshots. -Releases are published to Maven Central via [GitHub Actions](https://github.com/micronaut-projects/micronaut-project-template/actions). +Releases are published to Maven Central via [GitHub Actions](https://github.com/micronaut-projects/micronaut-opensearch/actions). Releases are completely automated. To perform a release use the following steps: -* [Publish the draft release](https://github.com/micronaut-projects/micronaut-project-template/releases). There should be already a draft release created, edit and publish it. The Git Tag should start with `v`. For example `v1.0.0`. -* [Monitor the Workflow](https://github.com/micronaut-projects/micronaut-project-template/actions?query=workflow%3ARelease) to check it passed successfully. -* If everything went fine, [publish to Maven Central](https://github.com/micronaut-projects/micronaut-project-template/actions?query=workflow%3A"Maven+Central+Sync"). +* [Publish the draft release](https://github.com/micronaut-projects/micronaut-opensearch/releases). There should be already a draft release created, edit and publish it. The Git Tag should start with `v`. For example `v1.0.0`. +* [Monitor the Workflow](https://github.com/micronaut-projects/micronaut-opensearch/actions?query=workflow%3ARelease) to check it passed successfully. +* If everything went fine, [publish to Maven Central](https://github.com/micronaut-projects/micronaut-opensearch/actions?query=workflow%3A"Maven+Central+Sync"). * Celebrate! diff --git a/buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-base.gradle b/buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-base.gradle similarity index 64% rename from buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-base.gradle rename to buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-base.gradle index d648e171..fec7c0fb 100644 --- a/buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-base.gradle +++ b/buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-base.gradle @@ -1 +1 @@ -// If you don't need any common settings/dependencies/... for everything, remove this convention plugin and the reference to it in `io.micronaut.build.internal.project-template-module.gradle` file +// If you don't need any common settings/dependencies/... for everything, remove this convention plugin and the reference to it in `io.micronaut.build.internal.opensearch-module.gradle` file diff --git a/buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-module.gradle b/buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-module.gradle new file mode 100644 index 00000000..b5c735a4 --- /dev/null +++ b/buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-module.gradle @@ -0,0 +1,4 @@ +plugins { + id 'io.micronaut.build.internal.opensearch-base' + id "io.micronaut.build.internal.module" +} diff --git a/buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-module.gradle b/buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-module.gradle deleted file mode 100644 index 3fff0b48..00000000 --- a/buildSrc/src/main/groovy/io.micronaut.build.internal.project-template-module.gradle +++ /dev/null @@ -1,4 +0,0 @@ -plugins { - id 'io.micronaut.build.internal.project-template-base' - id "io.micronaut.build.internal.module" -} diff --git a/gradle.properties b/gradle.properties index 7fc259ea..c56e4e27 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,10 @@ projectVersion=1.0.0-SNAPSHOT -projectGroup=io.micronaut.project-template +projectGroup=io.micronaut.opensearch -title=Micronaut project-template +title=Micronaut opensearch projectDesc=TODO projectUrl=https://micronaut.io -githubSlug=micronaut-projects/micronaut-project-template +githubSlug=micronaut-projects/micronaut-opensearch developers=Graeme Rocher org.gradle.caching=true org.gradle.jvmargs=-Xmx1g diff --git a/opensearch-bom/build.gradle.kts b/opensearch-bom/build.gradle.kts new file mode 100644 index 00000000..4f466072 --- /dev/null +++ b/opensearch-bom/build.gradle.kts @@ -0,0 +1,10 @@ +plugins { + id("io.micronaut.build.internal.opensearch-base") + id("io.micronaut.build.internal.bom") +} +micronautBuild { + // new module, so no binary check + binaryCompatibility { + enabled.set(false) + } +} \ No newline at end of file diff --git a/opensearch/build.gradle.kts b/opensearch/build.gradle.kts new file mode 100644 index 00000000..1acdfee2 --- /dev/null +++ b/opensearch/build.gradle.kts @@ -0,0 +1,10 @@ +plugins { + id("io.micronaut.build.internal.opensearch-module") +} + +micronautBuild { + // new module, so no binary check + binaryCompatibility { + enabled.set(false) + } +} \ No newline at end of file diff --git a/project-template-bom/build.gradle b/project-template-bom/build.gradle deleted file mode 100644 index 16287898..00000000 --- a/project-template-bom/build.gradle +++ /dev/null @@ -1,4 +0,0 @@ -plugins { - id 'io.micronaut.build.internal.project-template-base' - id "io.micronaut.build.internal.bom" -} diff --git a/project-template/build.gradle b/project-template/build.gradle deleted file mode 100644 index 457e927e..00000000 --- a/project-template/build.gradle +++ /dev/null @@ -1,3 +0,0 @@ -plugins { - id 'io.micronaut.build.internal.project-template-module' -} diff --git a/settings.gradle b/settings.gradle index 604c307f..c5834291 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,10 +9,10 @@ plugins { id 'io.micronaut.build.shared.settings' version '6.6.2' } -rootProject.name = 'project-template-parent' +rootProject.name = 'opensearch-parent' -include 'project-template' -include 'project-template-bom' +include 'opensearch' +include 'opensearch-bom' enableFeaturePreview 'TYPESAFE_PROJECT_ACCESSORS' From 6ce80665f9d49ad5df2c17da74d390de970222e2 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Date: Thu, 22 Feb 2024 16:11:37 +0100 Subject: [PATCH 2/5] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c56e4e27..e94c7e0a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ projectVersion=1.0.0-SNAPSHOT projectGroup=io.micronaut.opensearch title=Micronaut opensearch -projectDesc=TODO +projectDesc=Micronaut integration with OpenSearch projectUrl=https://micronaut.io githubSlug=micronaut-projects/micronaut-opensearch developers=Graeme Rocher From 0977f03e268cf4f0e70def3654ae2ac7569a739c Mon Sep 17 00:00:00 2001 From: Sergio del Amo Date: Thu, 22 Feb 2024 16:18:37 +0100 Subject: [PATCH 3/5] Delete .github/workflows/files-sync.yml --- .github/workflows/files-sync.yml | 170 ------------------------------- 1 file changed, 170 deletions(-) delete mode 100644 .github/workflows/files-sync.yml diff --git a/.github/workflows/files-sync.yml b/.github/workflows/files-sync.yml deleted file mode 100644 index e1bd8ecc..00000000 --- a/.github/workflows/files-sync.yml +++ /dev/null @@ -1,170 +0,0 @@ -name: Files sync -on: - schedule: - - cron: '0 5 * * *' -jobs: - sync-files: - if: github.repository == 'micronaut-projects/micronaut-project-template' - runs-on: ubuntu-latest - strategy: - fail-fast: false - max-parallel: 3 - matrix: - repo: - - acme - - aot - - aws - - azure - - cache - - cassandra - - chatbots - - coherence - - control-panel - - core - - crac - - data - - discovery-client - - eclipsestore - - elasticsearch - - email - - flyway - - fuzzing - - gcp - - graphql - - groovy - - grpc - - hibernate-validator - - jackson-xml - - jaxrs - - jms - - jmx - - kafka - - kotlin - - kubernetes - - liquibase - - logging - - micrometer - - microstream - - mongodb - - mqtt - - multitenancy - - nats - - neo4j - - object-storage - - openapi - - oracle-cloud - - picocli - - platform - - problem-json - - pulsar - - r2dbc - - rabbitmq - - reactor - - redis - - rss - - rxjava2 - - rxjava3 - - security - - serialization - - servlet - - session - - sourcegen - - spring - - sql - - test - - test-resources - - toml - - tracing - - validation - - views - steps: - - name: Checkout source - uses: actions/checkout@v4 - with: - path: source - - name: Checkout target - default branch - uses: actions/checkout@v4 - with: - repository: micronaut-projects/micronaut-${{ matrix.repo }} - path: target - fetch-depth: 0 - token: ${{ secrets.GH_TOKEN }} - - name: Determine current branch - id: branch - working-directory: target - run: | - branch=$(git rev-parse --abbrev-ref HEAD) - echo "Current branch: ${branch}" - echo "branch=${branch}" >> $GITHUB_OUTPUT - - name: Sync workflows - run: | - mkdir -p target/.github/workflows/ - rsync --verbose --verbose --archive -F "source/.github/workflows/" "target/.github/workflows/" - rm -f target/.github/dependabot.yml - rm -f target/.github/stale.yml - rm -f target/.github/release-drafter.yml - rm -f target/.github/workflows/release-notes.yml - rm -f target/.github/workflows/dependency-update.yml - rm -f target/.github/workflows/sonarqube.yml - - name: Copy files from source to target branches - run: | - while IFS= read -r file; do - dest_dirname="$(dirname $file)" - dest_filename="$(basename $file)" - mkdir -p target/$dest_dirname - [ ! -f target/${dest_dirname}/${dest_filename}.lock ] && cp source/$file target/${dest_dirname}/${dest_filename} - done <<< "$FILES" - env: - FILES: |- - .editorconfig - .gitattributes - .gitignore - .github/renovate.json - .github/release.yml - .github/ISSUE_TEMPLATE/bug_report.yaml - .github/ISSUE_TEMPLATE/config.yml - .github/ISSUE_TEMPLATE/new_feature.yaml - .github/ISSUE_TEMPLATE/other.yaml - gradle/wrapper/gradle-wrapper.jar - gradle/wrapper/gradle-wrapper.properties - gradlew - gradlew.bat - MAINTAINING.md - SECURITY.md - LICENSE - config/HEADER - config/spotless.license.java - config/checkstyle/checkstyle.xml - config/checkstyle/suppressions.xml - - name: Sleep for 3 minutes to avoid rate limiting - run: sleep 180s - shell: bash - - name: Create Pull Request - ${{ steps.branch.outputs.branch }} - uses: peter-evans/create-pull-request@v6 - with: - path: target - token: ${{ secrets.GH_TOKEN }} - committer: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}> - author: micronaut-build <${{ secrets.MICRONAUT_BUILD_EMAIL }}> - commit-message: Update common files - title: "[${{ matrix.repo }}] Update common files for branch ${{ steps.branch.outputs.branch }}" - body: Update common files - labels: "relates-to: build" - branch: sync-files-${{ steps.branch.outputs.branch }} - base: ${{ steps.branch.outputs.branch }} - add-paths: | - .editorconfig - .gitattributes - .gitignore - .github/* - .github/ISSUE_TEMPLATE/* - .github/workflows/* - gradle/* - gradlew* - MAINTAINING.md - SECURITY.md - LICENSE - config/HEADER - config/spotless.license.java - config/checkstyle/checkstyle.xml - config/checkstyle/suppressions.xml From 1c7c60be1a100014400930c6fde769ff5a447df4 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Date: Thu, 22 Feb 2024 16:19:00 +0100 Subject: [PATCH 4/5] Delete .github/workflows/template-cleanup.yml --- .github/workflows/template-cleanup.yml | 52 -------------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/workflows/template-cleanup.yml diff --git a/.github/workflows/template-cleanup.yml b/.github/workflows/template-cleanup.yml deleted file mode 100644 index e6372558..00000000 --- a/.github/workflows/template-cleanup.yml +++ /dev/null @@ -1,52 +0,0 @@ -# GitHub Actions Workflow responsible for template-clean like updating CLA contract url. This workflow is supposed to be triggered automatically -# when a new template-based repository has been created. - -name: Template Clean Up -on: - push: - -jobs: - - # Run cleaning process only if workflow is triggered by the non micronaut-project/micronaut-opensearch repository. - template-cleanup: - name: Template Cleanup - runs-on: ubuntu-latest - if: github.event.repository.name != 'micronaut-opensearch' - steps: - - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v4 - - # Cleanup project - - name: Cleanup - run: | - # Update CLA url in CONTRIBUTING.md - sed -i "s|micronaut-projects/micronaut-opensearch|$GITHUB_REPOSITORY|" CONTRIBUTING.md - sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" README.md - sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" gradle.properties - sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" CONTRIBUTING.md - sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" MAINTAINING.md - sed -i "s|micronaut-projects/micronaut-opensearch|$GITHUB_REPOSITORY|" SECURITY.md - sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" opensearch/build.gradle - sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" opensearch-bom/build.gradle - sed -i "s|opensearch|${GITHUB_REPOSITORY:29}|" buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-module.gradle - git mv opensearch/ "micronaut-${GITHUB_REPOSITORY:29}/" - git mv opensearch-bom/ "micronaut-${GITHUB_REPOSITORY:29}-bom/" - git mv buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-module.gradle "buildSrc/src/main/groovy/io.micronaut.build.internal.${GITHUB_REPOSITORY:29}-module.gradle" - git mv buildSrc/src/main/groovy/io.micronaut.build.internal.opensearch-base.gradle "buildSrc/src/main/groovy/io.micronaut.build.internal.${GITHUB_REPOSITORY:29}-base.gradle" - # Remove clean up template - rm -rf .github/workflows/template-cleanup.yml - # Commit modified files - - name: Commit files - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add . - git commit -m "Template cleanup" - # Push changes - - name: Push changes - uses: ad-m/github-push-action@master - with: - branch: ${{ github.ref }} - github_token: ${{ secrets.GITHUB_TOKEN }} From f939149fff2bca038393253fc7626fd7ee33e2f5 Mon Sep 17 00:00:00 2001 From: Sergio del Amo Date: Thu, 22 Feb 2024 16:38:51 +0100 Subject: [PATCH 5/5] Update MAINTAINING.md --- MAINTAINING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINING.md b/MAINTAINING.md index 702818ea..79012311 100644 --- a/MAINTAINING.md +++ b/MAINTAINING.md @@ -115,7 +115,7 @@ Renovate and our workflow will keep sending PRs. You should also create an issue #### Files sync -We have a [template repo](https://github.com/micronaut-projects/micronaut-opensearch) that we use as the single +We have a [template repo](https://github.com/micronaut-projects/micronaut-project-template) that we use as the single source of truth for certain files. It is used as a template to create new repos, and changes to certain files in the template repo will get propagated automatically. The files propagated are: