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

Bintray is closing down in May 2021 #7179

Closed
akarnokd opened this issue Feb 3, 2021 · 17 comments · Fixed by #7181
Closed

Bintray is closing down in May 2021 #7179

akarnokd opened this issue Feb 3, 2021 · 17 comments · Fixed by #7181
Labels

Comments

@akarnokd
Copy link
Member

akarnokd commented Feb 3, 2021

https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

I don't fully understand what this means for release processes using gradle-bintray-plugin or how to migrate.

@akarnokd akarnokd added the Build label Feb 3, 2021
@vanniktech
Copy link
Collaborator

Can't we push to mavenCentral directly?

@akarnokd
Copy link
Member Author

akarnokd commented Feb 3, 2021

There are a few problems:

  • The private key is on bintray and can't be extracted, only overwritten. (Maybe @benjchristensen still has it.)
  • If we need to generate a new private key, I don't know/remember what to do with it. (It's been years since I setup my own private key for my libraries I release from my machine via your plugin.)
  • I don't know how to inject a private key into the GitHub Action. (Having a GH secret string of the key material is one thing, afaik, it has to be imported into a keystore every time so Gradle's sign task can use it.)

@benjchristensen
Copy link
Member

I have all the ReactiveX keys.

@vanniktech
Copy link
Collaborator

Secrets can be added to GitHub: https://github.com/vanniktech/gradle-maven-publish-plugin/settings/secrets/actions (replace username / repo with target repo):

Screenshot 2021-02-03 at 22 46 15

And then they can be used in GitHub actions:

name: Publish Release

on:
  push:
    tags:
      - '*'

jobs:
  publish:

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Install JDK 8
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Upload release
        run: ./gradlew uploadArchives --no-daemon --no-parallel
        env:
          ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
          ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
          ORG_GRADLE_PROJECT_SIGNING_PRIVATE_KEY: ${{ secrets.SIGNING_PRIVATE_KEY }}
          ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}

      - name: Publish release
        run: ./gradlew closeAndReleaseRepoistory --no-daemon --no-parallel
        env:
          ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
          ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}

Source

They key itself needs to be distributed in order for this to work though. Instructions are here.

@akarnokd
Copy link
Member Author

akarnokd commented Feb 3, 2021

I don't think we need to generate new keys.

How do we get the existing private key up there? Do we need a gpg file added to the project, then reference it from gradle.properties (consequently the key id & passwords are the secrets in your example)?

@akarnokd
Copy link
Member Author

akarnokd commented Feb 3, 2021

Ah, there is an in-memory option: link

It needs an armored-ascii key string: link

This is how to export it: link

@akarnokd
Copy link
Member Author

akarnokd commented Feb 4, 2021

Posted #7181.

@benjchristensen Could you update SIGNING_PRIVATE_KEY and SIGNING_PASSWORD in secrets with the current RxJava private key info?

@benjchristensen
Copy link
Member

Yes, I'll do that.

@benjchristensen
Copy link
Member

Trying to figure out which of the keys it is ... it's been a while :-)

@benjchristensen
Copy link
Member

I've got on PGP key with a passphrase, and one without. Not sure which one needs to be used here, so I'll upload the one with a passphrase.

@benjchristensen
Copy link
Member

Ok, I guess that can be tried now, and if that doesn't work, I can change it to the other one. Do you need the public key or do you have that already?

@akarnokd
Copy link
Member Author

akarnokd commented Feb 5, 2021

No need for the public key.

@akarnokd akarnokd reopened this Feb 5, 2021
@akarnokd
Copy link
Member Author

akarnokd commented Feb 5, 2021

First step, ensure the snapshot is still working. https://github.com/ReactiveX/RxJava/runs/1840358093
Next step, create a pre-release for 3.0.11-RC1 to see if the new process works.

@akarnokd
Copy link
Member Author

akarnokd commented Feb 5, 2021

Pre-released 3.0.11-RC1: https://github.com/ReactiveX/RxJava/runs/1840960933

@akarnokd
Copy link
Member Author

akarnokd commented Feb 5, 2021

Almost works, @vanniktech

No staging repository prefixed with "ioreactivexrxjava3" found. Mae sure you called ./gradlew uploadArchives and mavenPublish.nexus.groupId is set correctly.

@akarnokd
Copy link
Member Author

akarnokd commented Feb 5, 2021

Now it failed with something and I see two staging repositories opened within 30 seconds of each other.

@akarnokd
Copy link
Member Author

akarnokd commented Feb 5, 2021

It worked this time.

3.0.11-RC3 should be in maven central shortly.

@benjchristensen I think the key setup worked.

@akarnokd akarnokd closed this as completed Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants