grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

Document Snapshot Deployment

Open codeconsole opened this issue 1 year ago • 10 comments
trafficstars

Document the Requirements for Deploying to the Snapshot Repository

Discuss

  1. Should SNAPSHOTs continue to go to jfrog starting with 7.x?
  2. Should the SNAPSHOT process require different configuration from the deployment process?

Goals

  1. Configure https://github.com/gpc/export to publish to Snapshot Repository
  2. Configure https://github.com/grails/grails-boot
  3. Fix gradle.plugin is mistakenly publishing a pom under grails-core org/grails/grails-core/org.grails.grails-core.gradle.plugin/ Unwanted Artifact?

Working Snapshots grails-core grails-gradle-plugin grails-bom

Not Working grails-gsp neo-4j

From @matrei

An example of a simple module, publishing snapshots, is scaffolding. It uses the org.grails.internal.grails-plugin-publish gradle plugin from grails-gradle-plugin.

build.gradle

plugins {
    id 'java-library'
    id 'eclipse'
    id 'idea'
    id 'org.grails.grails-plugin'
    id 'org.grails.grails-gsp'
    id 'org.grails.internal.grails-plugin-publish'
}
grailsPublish {
    userOrg = "grails"
    githubSlug = 'grails/scaffolding'
    license {
        name = 'Apache-2.0'
    }
    title = "Grails Scaffolding Plugin"
    desc = "Provides scaffolding for Grails applications"
    developers = [puneetbehl: "Puneet Behl"]
}

Then, in the gradle.yml github workflow it publishes on pushevents:

publish:
    if: github.event_name == 'push'
    needs: ['build']
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up JDK
        uses: actions/setup-java@v4
        with:
          distribution: 'adopt'
          java-version: '11'
      - name: Publish Artifacts (repo.grails.org)
        id: publish
        uses: gradle/gradle-build-action@v3
        env:
          GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
          GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }}
          GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }}
          ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
          ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
        with:
          arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish

Where is scaffolding publishing to?

codeconsole avatar Jul 28 '24 17:07 codeconsole

@matrei is scaffolding going to the right place?

codeconsole avatar Jul 29 '24 18:07 codeconsole

@codeconsole https://repo.grails.org/ui/native/plugins3-snapshots-local/org/grails/plugins/scaffolding/

matrei avatar Jul 29 '24 22:07 matrei

Here is where the snapshot location is specified: https://github.com/grails/grails-gradle-plugin/blob/c640157b5eaab309577981694c9e282aeab678c8/src/main/groovy/org/grails/gradle/plugin/publishing/internal/GrailsCentralPublishGradlePlugin.groovy#L335

matrei avatar Jul 29 '24 22:07 matrei

ok, it goes to instead of plugins3-snapshots-locall instead of libs-snapshots-local Thanks

codeconsole avatar Jul 29 '24 22:07 codeconsole

Should SNAPSHOTs continue to go to jfrog starting with 7.x?

Are SNAPSHOTs currently being published to jfrog? I believe they may only be published to Artifactory. Is that correct?

jeffscottbrown avatar Jul 31 '24 14:07 jeffscottbrown

Are SNAPSHOTs currently being published to jfrog? I believe they may only be published to Artifactory. Is that correct?

@osscontributor Sorry for me perhaps being ignorant, but isn't JFrog a company, and Artifactory their product for publishing and hosting artifacts? If so, in the context of this discussion, doesn't these two terms mean the same thing?

matrei avatar Jul 31 '24 19:07 matrei

@osscontributor Sorry for me perhaps being ignorant, but isn't JFrog a company, and Artifactory their product for publishing and hosting artifacts? If so, in the context of this discussion, doesn't these two terms mean the same thing?

that what I thought, but now I am confused.

codeconsole avatar Jul 31 '24 22:07 codeconsole

Looks like Neo 4j neglected and not deploying snapshots: https://github.com/grails/gorm-neo4j/issues/603#issuecomment-2265960457

codeconsole avatar Aug 02 '24 21:08 codeconsole

that what I thought, but now I am confused.

I am sorry for the confusion.

jeffscottbrown avatar Oct 09 '24 14:10 jeffscottbrown

@osscontributor Sorry for me perhaps being ignorant, but isn't JFrog a company, and Artifactory their product for publishing and hosting artifacts? If so, in the context of this discussion, doesn't these two terms mean the same thing?

The terms do kind of mean the same thing. The confusion caused was my fault. Yes, JFrog is a company, and Artifactory is a product they produce. Because of the context above I wrongly assumed that JFrog was being used in place of Bintray, where we used to publish releases (I don't think snapshots) but I was mistaken when I assumed that and my response caused more confusion.

jeffscottbrown avatar Oct 09 '24 14:10 jeffscottbrown

@jdaugherty I'd say this is completed for the current process, do you agree?

It will change again when we start using ASF snapshot repo.

jamesfredley avatar Feb 05 '25 19:02 jamesfredley