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] Github release upload skipped if signing is enabled in Gradle plugin #1414

Open
4 tasks done
cwensel opened this issue Jun 15, 2023 · 10 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@cwensel
Copy link
Contributor

cwensel commented Jun 15, 2023

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)

Steps to Reproduce

    signing {
        armored.set(true)
        active.set(Active.ALWAYS)
        verify.set(false)
    }
    release {
        github {
            sign.set(false) // if true, upload of release skipped
        }
    }

Expected Behaviour

Release should be uploaded
https://github.com/ClusterlessHQ/tessellate/actions/runs/5280587510/jobs/9552923920

[INFO]  Releasing to https://github.com/ClusterlessHQ/tessellate@wip-1.0
[INFO]   - uploading checksums_sha256.txt
[INFO]   - uploading checksums_sha256.txt.asc
[INFO]   - uploading tess-1.0-wip-9.zip
[INFO]   - uploading tess-1.0-wip-9.zip.asc
[INFO]  Writing output properties to build/jreleaser/output.properties

Actual Behaviour

https://github.com/ClusterlessHQ/tessellate/actions/runs/5274687019/jobs/9539396068

[INFO]  Releasing to https://github.com/ClusterlessHQ/tessellate@wip-1.0
[INFO]  Writing output properties to build/jreleaser/output.properties
[INFO]  JReleaser succeeded after 8.814 s

Environment Information

Run via Github Actions

https://github.com/ClusterlessHQ/tessellate/actions

Note these are silent failures.

@cwensel cwensel added the bug Something isn't working label Jun 15, 2023
@aalmiray aalmiray changed the title Github release upload skipped if signing is enabled in Gradle plugin [release] Github release upload skipped if signing is enabled in Gradle plugin Jun 15, 2023
@aalmiray
Copy link
Member

aalmiray commented Jun 15, 2023

Did you happen to capture the log file found at build/jreleaser/trace.log?

I can see on the 2nd run that a zip file was checksumed and signed, but not released. The upload step before release is skipped as no additional uploaders are configured (this is OK).

@cwensel
Copy link
Contributor Author

cwensel commented Jun 15, 2023

no sorry, I don't have any artifacts being captured in the action.

fwiw, I was force pushing my commit, so you won't see a diff between a successful run and otherwise.

but as noted above, the only diff is sign.set(false) // if true, upload of release skipped

@aalmiray
Copy link
Member

The log file would let us know the exact configuration for the release section. In particular if skipRelease were to be accidentally set to true as that would skip releasing assets which seems to be the symptom.

@cwensel
Copy link
Contributor Author

cwensel commented Jun 15, 2023

Is the log data also sent to stdout?

https://github.com/ClusterlessHQ/tessellate/actions/runs/5274687019/jobs/9539396068#step:7:202

If not, I can try and sort out how to capture the file and push a failing build.

@cwensel
Copy link
Contributor Author

cwensel commented Jun 15, 2023

I've added the artifacts.

Here is a build that did not push the release

Here is a build that did push the release

@aalmiray
Copy link
Member

It looks like the captured trace.log is from the jreleaserAssemble step although I would have expected this file to be overwritten by the output form the next 2 commands: jreleaserConfig and jreleaserRelease. Perhaps the log is being written to some other place?

Your project does not require (at the moment) invoking jreleaserAssemble as there are no configured assemblies. Likewise, the fully resolved configuration is available in trace.log thus there's no need to explicitly invoke jreleaserConfig on CI as long as the resulting log file from jreleaserRelease is stored.

@aalmiray
Copy link
Member

aalmiray commented Jun 16, 2023

One more thing that's odd, the dryrun property must be set on the jreleaser extension, not on the project, thus

jreleaser {
    dryrun.set(true)
    project {
    // ...
}

This misconfiguration should had resulted in a compilation error of the build script 🤨

FWIW I can't locally test this due to missing dependencies such as cascading-local-hadoop3-io-4.6.0-wip-8.pom and more.

@cwensel
Copy link
Contributor Author

cwensel commented Jun 16, 2023

One more thing that's odd, the dryrun property must be set on the jreleaser extension, not on the project, thus

jreleaser {
    dryrun.set(true)
    project {
    // ...
}

Strange. Kotlin thinks it's fine

image

This misconfiguration should had resulted in a compilation error of the build script 🤨

FWIW I can't locally test this due to missing dependencies such as cascading-local-hadoop3-io-4.6.0-wip-8.pom and more.

Set these Gradle properties

            username = (project.findProperty("githubUsername") ?: System.getenv("USERNAME")) as? String
            password = (project.findProperty("githubPassword") ?: System.getenv("GITHUB_TOKEN")) as? String

I find it really frustrating GitHub requires a login to download public artifacts.

@aalmiray
Copy link
Member

Kotlin may be conflating properties as the Project type doesn't have dryrun. Really strange. https://github.com/jreleaser/jreleaser/blob/main/plugins/jreleaser-gradle-plugin/src/main/groovy/org/jreleaser/gradle/plugin/dsl/project/Project.groovy

@aalmiray
Copy link
Member

Setting both username/password via properties, env vars, and directly using the DSL results in Received status code 401 from server: Unauthorized. I just can't reproduce the problem using https://github.com/ClusterlessHQ/tessellate

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