Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release] org.jreleaser.sdk.commons.RestAPIException when releasing to gitlab.com #755

Closed
4 tasks done
serasset opened this issue Feb 16, 2022 · 10 comments
Closed
4 tasks done
Assignees
Labels
bug Something isn't working

Comments

@serasset
Copy link

serasset commented Feb 16, 2022

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem (link to git repository is ideal)
  • Full description of the issue provided (see below)

Context

I am in the process of trying to use JReleaser for a multi-module maven project dbnary. The configuration of the project is the following

  • dbnary (root project and parent pom)
    • many modules
    • dbnary-commands (the modules that define the command lines, generate the appassembly and the tar.gz + zip assemblies

The jreleaser configuration is defined in a profile in the root project and bound to deploy phase:

    <profile>
      <id>jreleaser</id>
      <!--properties>
        <jreleaser.git.root.search>true</jreleaser.git.root.search>
      </properties-->
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.jreleaser</groupId>
              <artifactId>jreleaser-maven-plugin</artifactId>
              <version>1.0.0-M2</version>
              <configuration>
                <jreleaser>
                  <project>
                    <name>DBnary</name>
                    <java>
                      <mainClass>${app.main.class}</mainClass>
                    </java>
                  </project>
                  <release>
                    <gitlab>
                      <owner>gilles.serasset</owner>
                      <name>dbnary</name>
                      <host>gitlab.com</host>
                      <overwrite>true</overwrite>
                      <commitAuthor>
                        <name>gilles.serasset</name>
                        <email>gilles.serasset@gmail.com</email>
                      </commitAuthor>
                    </gitlab>
                  </release>
                  <distributions>
                    <dbnary>
                      <tags>
                        <tag>cli</tag>
                      </tags>
                      <artifacts>
                        <artifact>
                          <path>
                            ${app.distribution.directory}/${project.artifactId}-${project.version}.zip
                          </path>
                        </artifact>
                        <artifact>
                          <path>
                            ${app.distribution.directory}/${project.artifactId}-${project.version}.tar.gz
                          </path>
                        </artifact>
                      </artifacts>
                    </dbnary>
                  </distributions>
                </jreleaser>
              </configuration>
              <executions>
                <execution>
                  <id>make-distribution</id>
                  <phase>deploy</phase>
                  <goals>
                    <goal>release</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>

the dbnary-commands module activates jreleaser in the same profile id:

    <profile>
      <id>jreleaser</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jreleaser</groupId>
            <artifactId>jreleaser-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

Notes all these commands are launched locally (not in gitlab CICD):

  • mvn package runs fine (creates the appassembler and assemblies zip/tar.gz
  • JRELEASER_GITLAB_TOKEN=.... mvn -e -Djreleaser.dry.run=true -Pjreleaser deploy runs fine
  • JRELEASER_GITLAB_TOKEN=.... mvn -e -Pjreleaser deploy breaks

The specified token is a gitlab personal access token bound to my account (repo owner) with all scopes checked.

Expected Behaviour

I'm expecting the mvn deploy to send the assemblies as a gitlab release

Actual Behaviour

The command breaks with an error, while on the gitlab instance, the tag is created and the release attached to it contains the changelog + 4 source assets (zip, bz2, tar.gz and tar), but no other files.

Stack trace is :

[INFO] --- jreleaser-maven-plugin:1.0.0-M2:release (make-distribution) @ dbnary-commands ---
[INFO] JReleaser 1.0.0-M2
[INFO]   - basedir set to /Users/serasset/dev/dbnary/gitlab/dbnary
[INFO] Loading variables from /Users/serasset/.jreleaser/config.properties
[WARNING] Variables source /Users/serasset/.jreleaser/config.properties does not exist
[INFO] Validating configuration
[INFO] Project version set to 3.0.3-SNAPSHOT
[INFO] Release is snapshot
[INFO] Timestamp is 2022-02-16T12:59:55.334973+01:00
[INFO] HEAD is at 7b50a00
[INFO] Platform is osx-aarch_64
[INFO] dry-run set to false
[INFO] Generating changelog: dbnary-commands/target/jreleaser/release/CHANGELOG.md
[INFO] Calculating checksums
[INFO]   [checksum] dbnary-commands/target/distributions/dbnary/dbnary-commands-3.0.3-SNAPSHOT.zip.sha256
[INFO]   [checksum] dbnary-commands/target/distributions/dbnary/dbnary-commands-3.0.3-SNAPSHOT.tar.gz.sha256
[INFO] Signing files
[INFO]   [sign] Signing is not enabled. Skipping
[INFO] Uploading is not enabled. Skipping
[INFO] Releasing to https://gitlab.com/gilles.serasset/dbnary
[INFO]  - uploading dbnary-commands-3.0.3-SNAPSHOT.zip
[ERROR]  x failed to upload dbnary-commands-3.0.3-SNAPSHOT.zip
[INFO] Writing output properties to dbnary-commands/target/jreleaser/output.properties
[ERROR] JReleaser failed after 13.003 s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:02 min
[INFO] Finished at: 2022-02-16T13:00:08+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jreleaser:jreleaser-maven-plugin:1.0.0-M2:release (make-distribution) on project dbnary-commands: Execution make-distribution of goal org.jreleaser:jreleaser-maven-plugin:1.0.0-M2:release failed: Unexpected error when creating release: org.jreleaser.sdk.commons.RestAPIException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jreleaser:jreleaser-maven-plugin:1.0.0-M2:release (make-distribution) on project dbnary-commands: Execution make-distribution of goal org.jreleaser:jreleaser-maven-plugin:1.0.0-M2:release failed: Unexpected error when creating release
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution make-distribution of goal org.jreleaser:jreleaser-maven-plugin:1.0.0-M2:release failed: Unexpected error when creating release
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.jreleaser.util.JReleaserException: Unexpected error when creating release
    at org.jreleaser.workflow.ReleaseWorkflowItem.invoke (ReleaseWorkflowItem.java:36)
    at org.jreleaser.workflow.WorkflowImpl.execute (WorkflowImpl.java:66)
    at org.jreleaser.maven.plugin.JReleaserReleaseMojo.execute (JReleaserReleaseMojo.java:92)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.jreleaser.model.releaser.spi.ReleaseException: org.jreleaser.sdk.commons.RestAPIException
    at org.jreleaser.sdk.gitlab.GitlabReleaser.createRelease (GitlabReleaser.java:150)
    at org.jreleaser.model.releaser.spi.AbstractReleaser.release (AbstractReleaser.java:51)
    at org.jreleaser.engine.release.Releasers.release (Releasers.java:44)
    at org.jreleaser.workflow.ReleaseWorkflowItem.invoke (ReleaseWorkflowItem.java:34)
    at org.jreleaser.workflow.WorkflowImpl.execute (WorkflowImpl.java:66)
    at org.jreleaser.maven.plugin.JReleaserReleaseMojo.execute (JReleaserReleaseMojo.java:92)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.jreleaser.sdk.commons.RestAPIException
    at org.jreleaser.sdk.commons.ClientUtils.lambda$builder$1 (ClientUtils.java:99)
    at feign.AsyncResponseHandler.handleResponse (AsyncResponseHandler.java:96)
    at feign.SynchronousMethodHandler.executeAndDecode (SynchronousMethodHandler.java:138)
    at feign.SynchronousMethodHandler.invoke (SynchronousMethodHandler.java:89)
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke (ReflectiveFeign.java:100)
    at com.sun.proxy.$Proxy33.uploadFile (Unknown Source)
    at org.jreleaser.sdk.gitlab.Gitlab.uploadAssets (Gitlab.java:251)
    at org.jreleaser.sdk.gitlab.GitlabReleaser.createRelease (GitlabReleaser.java:253)
    at org.jreleaser.sdk.gitlab.GitlabReleaser.createRelease (GitlabReleaser.java:145)
    at org.jreleaser.model.releaser.spi.AbstractReleaser.release (AbstractReleaser.java:51)
    at org.jreleaser.engine.release.Releasers.release (Releasers.java:44)
    at org.jreleaser.workflow.ReleaseWorkflowItem.invoke (ReleaseWorkflowItem.java:34)
    at org.jreleaser.workflow.WorkflowImpl.execute (WorkflowImpl.java:66)
    at org.jreleaser.maven.plugin.JReleaserReleaseMojo.execute (JReleaserReleaseMojo.java:92)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Environment Information

  • Operating System: mac os x
  • JReleaser Version: 1.0.0-M2 maven plugin
  • JDK Version: 11.0.10
...
[DEBUG] uploading assets to gilles.serasset/dbnary
[INFO]   - uploading dbnary-commands-3.0.3-SNAPSHOT.zip
[ERROR]  x failed to upload dbnary-commands-3.0.3-SNAPSHOT.zip
413 Request Entity Too Large
org.jreleaser.sdk.commons.RestAPIException
        at org.jreleaser.sdk.commons.ClientUtils.lambda$builder$1(ClientUtils.java:99)
        at feign.AsyncResponseHandler.handleResponse(AsyncResponseHandler.java:96)
        at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
        at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
        at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
        at com.sun.proxy.$Proxy33.uploadFile(Unknown Source)
        at org.jreleaser.sdk.gitlab.Gitlab.uploadAssets(Gitlab.java:251)
@serasset serasset added the bug Something isn't working label Feb 16, 2022
@aalmiray aalmiray changed the title org.jreleaser.sdk.commons.RestAPIException when releasing to gitlab.com [release] org.jreleaser.sdk.commons.RestAPIException when releasing to gitlab.com Feb 16, 2022
@aalmiray aalmiray self-assigned this Feb 16, 2022
@serasset
Copy link
Author

After trying to figure out what happened, I noticed that I checked the trace.log from the root project that dated from another attempt...

I updated the trace.log and it gave me the reason :

413 Request Entity Too Large

My apps zip and tar.gz are around 50M and it appears that the attachement limit on gitlab.com is 10M.

AFAIK there is no way to change this limit on a repository basis... Will have to try another upload infra...

@aalmiray
Copy link
Member

You can try using the uploadLinks feature. This requires uploading assets to an external location such as AWS S3 or a JFrog Artifactory instance. https://jreleaser.org/guide/latest/configuration/release/gitlab.html

Here's how the taxi-lang project does it as they faced the same problem https://gitlab.com/taxi-lang/taxi-lang/-/blob/develop/taxi-cli/jreleaser.yml

@serasset
Copy link
Author

Well, I do not have access to s3 or artifactory instance, but could upload using ssh. Are there plans to allow wagon-ssh like uploads ?

@aalmiray
Copy link
Member

Possibly. We also support custom HTTP/HTTPS of your choice as long as the service supports POST or PUT. Upload via ssh would have to wait after 1.0.0 is released.

@aalmiray
Copy link
Member

@serasset just to have a clearer understanding for shaping the scp/sftp upload feature for later: the idea is to use scp/sftp to upload assets to a given server, said assets will be publicly available for download through other means such an https?

The reason for asking is that currently uploaders expose both upload and download urls. In the case of of scp/sftp JReleaser would still need a download url of some form, hopefully without requiring access credentials.

@aalmiray
Copy link
Member

@serasset
Copy link
Author

Well, in fact, until then I had a scpexe:// url for my distributionManagement>repository in maven and maven deploy was simply deploying there (using wagon-ssh extension) and the artifacts where available at a public URL.

In maven, the upload URL was specified in delivery management and the download url in the repository section. They are only linked as they have the same id, but it is not necessary for maven.

As I tried to use JReleaser I wanted to use gitlab for releases as I switch to it for my repository (I was previously on bitbucket which does not offer such a releasing capacity). But the upload limit on gitlab prevent me to do this.

I have no access to a S3 or artifactory instance and do not really want to setup my apache for uploading through http(s).

So I thought about :

  • using scp (or sftp), just like I did before for the artifacts distribution
  • using a repo for git pages (I have one at bitbucket, but could be github or gitlab)

While trying to setup this configuration, It was quite tedious to configure the scpexe credentials on CICD image, so I gave up and finally, I mirrored my repo on github and I release on github.

Now I'm not really sure scp is a good choice as managing the credentials in a CICD workflow is tedious and may be a too high security risk (you really need to configure a ssh key allowing only scp access and it is not an easy click and copy process). Maybe git pages would be better fitted for this as it looks like what is done for homebrew rule creation for instance.

@aalmiray
Copy link
Member

aalmiray commented Feb 20, 2022

Thanks. I did see the github mirror of your project (congrats on the release btw). Been working on download/upload capabilities using http/scp/sftp and happy to share it's almost there. The last stumbling block is setting up the SSH keys ate the right location which could be done like it is for PGP keys in the signing block.

@aalmiray
Copy link
Member

2 people from GitLab have suggested using the generic packagers option. This requires a bit of work and constitutes a big change for the current state of the project (so close to v1.0.0) which means we'll punt it after v1.0.0.

Generic packages currently require a version number that follows semver. JReleaser supports 5 different versioning schemes which may or may not be compatible with semver depending on the chosen format. We already have two options in place (jpackage.applicationPackage.appVersion and chocolatey.packageVersion) that check if the chosen version number is valid (which happens to be something very close to semver).

The bigger change is making use of the REST API to upload binaries to a Generic package.

I know it's not exactly what you wanted to hear but the fact that there are "workarounds" (use any of the 3 uploaders currently supported || use GitHub or Gitea) does not block the next big release.

@aalmiray
Copy link
Member

Closing in favor of #822

Alternative is to upload binaries to another location (JFrog Artifactory, AWS S3) or host binaries on GitHub/Codeberg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants