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

sbt build #20

Closed
benjchristensen opened this issue Sep 26, 2014 · 33 comments
Closed

sbt build #20

benjchristensen opened this issue Sep 26, 2014 · 33 comments

Comments

@benjchristensen
Copy link
Member

Discuss the ongoing work with the sbt build and publishing to Maven Central...

@benjchristensen
Copy link
Member Author

Go to https://bintray.com/reactivex/RxJava/RxScala/view/central

Click on Maven Central and see the errors:

Last Sync Status: Validation Failed
Last Sync Errors: Invalid POM: /io/reactivex/rxscala_2.10/1.0.0-RC1/rxscala_2.10-1.0.0-RC1.pom: Project URL missing, SCM URL missing, Developer information missing
Invalid POM: /io/reactivex/rxscala_2.11/1.0.0-RC1/rxscala_2.11-1.0.0-RC1.pom: Project URL missing, SCM URL missing, Developer information missing
Missing Signature: '/io/reactivex/rxscala_2.10/1.0.0-RC1/rxscala_2.10-1.0.0-RC1-javadoc.jar.asc' does not exist for 'rxscala_2.10-1.0.0-RC1-javadoc.jar'.
Missing Signature: '/io/reactivex/rxscala_2.10/1.0.0-RC1/rxscala_2.10-1.0.0-RC1.pom.asc' does not exist for 'rxscala_2.10-1.0.0-RC1.pom'.
Missing Signature: '/io/reactivex/rxscala_2.10/1.0.0-RC1/rxscala_2.10-1.0.0-RC1-sources.jar.asc' does not exist for 'rxscala_2.10-1.0.0-RC1-sources.jar'.
Missing Signature: '/io/reactivex/rxscala_2.10/1.0.0-RC1/rxscala_2.10-1.0.0-RC1.jar.asc' does not exist for 'rxscala_2.10-1.0.0-RC1.jar'.
Missing Signature: '/io/reactivex/rxscala_2.11/1.0.0-RC1/rxscala_2.11-1.0.0-RC1-javadoc.jar.asc' does not exist for 'rxscala_2.11-1.0.0-RC1-javadoc.jar'.
Missing Signature: '/io/reactivex/rxscala_2.11/1.0.0-RC1/rxscala_2.11-1.0.0-RC1.pom.asc' does not exist for 'rxscala_2.11-1.0.0-RC1.pom'.
Missing Signature: '/io/reactivex/rxscala_2.11/1.0.0-RC1/rxscala_2.11-1.0.0-RC1-sources.jar.asc' does not exist for 'rxscala_2.11-1.0.0-RC1-sources.jar'.
Missing Signature: '/io/reactivex/rxscala_2.11/1.0.0-RC1/rxscala_2.11-1.0.0-RC1.jar.asc' does not exist for 'rxscala_2.11-1.0.0-RC1.jar'.
Dropping existing partial staging repository.

@benjchristensen
Copy link
Member Author

/cc @jmhofer

@jmhofer
Copy link
Collaborator

jmhofer commented Sep 26, 2014

This means adding sbt-pgp as well as some "pomExtra".

@jmhofer
Copy link
Collaborator

jmhofer commented Sep 26, 2014

@benjchristensen
Copy link
Member Author

Do you need the PGP keys in the Travis file for this?

@benjchristensen
Copy link
Member Author

I just added PGP_ENCRYPTION_PASSWORD to the .travis.yml file

@benjchristensen
Copy link
Member Author

I need to figure out which of the GPG files I need to provide and how. This was all done in the Jenkins build before on the Gradle plugin. Need to relearn this stuff ...

@samuelgruetter
Copy link
Collaborator

Is it intended that there's already a 1.0.0-RC1? Imho RxScala should still be at 0.x.y.

@benjchristensen
Copy link
Member Author

That's up to you all. Whatever version you want.

@jmhofer
Copy link
Collaborator

jmhofer commented Sep 27, 2014

@benjchristensen Do you have the encrypted key files (secring.gpg.enc and pubring.gpg.enc)? These have to be added to the project.

@jmhofer
Copy link
Collaborator

jmhofer commented Sep 27, 2014

If what you added is the password which the key files are encrypted with, and your key also has a passphrase, we also need that passphrase in the .travis.yml.

@jmhofer
Copy link
Collaborator

jmhofer commented Sep 27, 2014

Everything should be prepared now for proper publishing to Maven. We just need to get the keys working.

@benjchristensen
Copy link
Member Author

I have added the files using the travis encrypt-file mechanism:

travis encrypt-file pubring.gpg --add
travis encrypt-file secring.gpg --add

Travis will take care of decrypting those files.

The PGP_ENCRYPTION_PASSWORD is the passphrase for the key.

@benjchristensen
Copy link
Member Author

Confusingly those files are failing to be decrypted ... even though they were encrypted using Travis.

https://travis-ci.org/ReactiveX/RxScala/jobs/36436024

@benjchristensen
Copy link
Member Author

Alright, finally have it working.

When adding two files you can't allow Travis to auto generate the keys, as it creates new keys for each file and overwrites the ones generated for the previous file :-$

The private and public keys are now being decrypted correctly and you can make changes to use them.

Then you can release with whatever version you want ... perhaps 0.21.0 until everyone agrees on moving to 1.0.0-RC1?

@benjchristensen
Copy link
Member Author

Here is the log showing the 2 files being decrypted: https://travis-ci.org/ReactiveX/RxScala/jobs/36438163#L35

@jmhofer
Copy link
Collaborator

jmhofer commented Sep 28, 2014

Ok, I'll try to release a 0.21.0. But then, you probably should unpublish 1.0.0-RC1 again.

@jmhofer
Copy link
Collaborator

jmhofer commented Sep 28, 2014

For some reason, Bintray returned a "405 Not Allowed" when uploading the 2.11 version of RxScala. Maybe because it was in parallel to uploading 2.10? - Then I'll have to do the crosspublishing in the build instead of letting Travis do it...

@benjchristensen
Copy link
Member Author

The files released are invalid.

https://bintray.com/reactivex/RxJava/RxScala/0.21.0/view/central

@jmhofer
Copy link
Collaborator

jmhofer commented Sep 28, 2014

The 2.11 was not completely published. - But I can't see the Maven Central stuff on Bintray.
The build for 0.21.1 was completely successful. Maybe this one will get through to Maven? - If not, please paste the error log here again.

@benjchristensen
Copy link
Member Author

Looks like it published and is on its way.

@jmhofer
Copy link
Collaborator

jmhofer commented Sep 28, 2014

Yay, finally!

@benjchristensen
Copy link
Member Author

You can them on the repo now: http://repo1.maven.org/maven2/io/reactivex/

@samuelgruetter
Copy link
Collaborator

Now that #21 is also fine, we can consider this issue resolved, imho :)

@jmhofer
Copy link
Collaborator

jmhofer commented Oct 1, 2014

I wonder what happened to the Travis build now. All current PRs have a problem with the keys in the before_install script. None of the PRs change anything in the build or configuration.

Anyone have any idea what's happening here?

@benjchristensen
Copy link
Member Author

I know that pull request builds don't allow secure data in them: http://docs.travis-ci.com/user/pull-requests/

So I'm trying to find out how to make it so it doesn't execute that on a pull request.

@jmhofer
Copy link
Collaborator

jmhofer commented Oct 1, 2014

Ok, so maybe we can simply move these from before_install into the publishViaTravis shell script.

@benjchristensen
Copy link
Member Author

Maybe we can move the openssl commands inside the ./publishViaTravis.sh script inside the if block? The environment variables will be available to ./publishViaTravis.sh so the following should work there as well:

- openssl aes-256-cbc -K $encrypted_506de5234d8d_key -iv $encrypted_506de5234d8d_iv
  -in key.private.F984A085.asc.enc -out key.private.F984A085.asc -d
- openssl aes-256-cbc -K $encrypted_506de5234d8d_key -iv $encrypted_506de5234d8d_iv
  -in key.public.F984A085.asc.enc -out key.public.F984A085.asc -d

Then we just won't have a before_install section of .travis.yml

benjchristensen added a commit that referenced this issue Oct 1, 2014
@benjchristensen
Copy link
Member Author

Yes, I just tried making those changes. It should fix the pull requests, no idea if the publish script will work until next time you try a release.

@samuelgruetter
Copy link
Collaborator

A few minutes ago, I triggered a rebuild for build 37 (PR #23), but it still fails with the same error...

@samuelgruetter
Copy link
Collaborator

If I do locally

git fetch ReactiveX +refs/pull/23/merge
git checkout FETCH_HEAD

and then

git log --oneline

then I can see your two commits:

a9c96b7 Update publishViaTravis.sh
3dcf4a5 Remove before_install

So it looks like Travis got your updates. But it still executes the openssl commands, which is a contradiction -- I don't get it...

@benjchristensen
Copy link
Member Author

Your .travis.yml file is still the old one.

@zsxwing
Copy link
Member

zsxwing commented Jan 26, 2015

Close as the build script works well now.

@zsxwing zsxwing closed this as completed Jan 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants