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

Moving release process to Bintray #1037

Merged
merged 1 commit into from
Jul 4, 2019

Conversation

langsmith
Copy link

This pr resolves #995 by moving the Java SDK artifact release process to Bintray. The work in this pr is largely based off of similar work done in mapbox-gl-native and discussion that's happened in #995.

@langsmith
Copy link
Author

I believe the only remaining work on this pr is figuring out how to delineate whether a version is a SNAPSHOT or a stable/alpha version as mentioned by @LukasPaczos at #995 (comment)

@langsmith langsmith force-pushed the ls-moving-release-process-to-bintray branch from d39b7d1 to 9f5db83 Compare May 17, 2019 23:38
@langsmith
Copy link
Author

figuring out how to delineate whether a version is a SNAPSHOT or a stable/alpha version

9f5db83 added logic to circle.yml to determine this.

@langsmith langsmith requested a review from LukasPaczos May 17, 2019 23:40
@langsmith langsmith marked this pull request as ready for review May 17, 2019 23:40
@langsmith
Copy link
Author

@LukasPaczos , I need to request OSS Jfrog access for SNAPSHOTs of each of the 4 Java packages https://bintray.com/message/addPackageToJCenter?pkgPath=%2Fmapbox%2Fmapbox%2Fmapbox-sdk-turf&tab=general 👇
Screen Shot 2019-05-17 at 4 59 05 PM

When you did this for the Maps SDK, do you remember what you checked/entered?

I tried 👇
Screen Shot 2019-05-17 at 5 01 09 PM

However, that gives me the following error in the red box. Have you seen this before? What was your work around, if any?

Screen Shot 2019-05-17 at 5 01 56 PM

@langsmith
Copy link
Author

Or can I make up some sort of unique ID such as com.mapbox.mapboxsdk.mapbox-sdk-turf?

https://www.jfrog.com/confluence/display/RTF/Deploying+Snapshots+to+oss.jfrog.org#DeployingSnapshotstooss.jfrog.org-GettingStartedwithOJO

@LukasPaczos
Copy link
Contributor

I did those exact steps while setting up Maps SDK. It's weird that you wouldn't be able to publish another artifact under the same Group ID to Artifactory. Could you try pushing them anyway? The package structure is established on JCenter, so maybe it'll pick it up?

If not, the best way would be to contact support - maybe that's not an expected use-case.

@langsmith
Copy link
Author

Hm, ok. Will look into it @LukasPaczos . Contacted support as backup.

@LukasPaczos
Copy link
Contributor

Any progress here @langsmith? Have you tried pushing the SNAPSHOT? Any news from the support?

@langsmith langsmith force-pushed the ls-moving-release-process-to-bintray branch from 698e45f to 3ced3c8 Compare May 24, 2019 21:52
@langsmith
Copy link
Author

news from the support

No news, probably because we're not Enterprise customers, so there's no urgency on their part.

Could you try pushing them anyway
Have you tried pushing the SNAPSHOT

You mean publishing the test SNAPSHOT as if it were a stable release, correct?

@langsmith
Copy link
Author

langsmith commented May 24, 2019

Could you try pushing them anyway
Have you tried pushing the SNAPSHOT

As a cautious first step I just did a test run of the 4 modules. Then I published 4.9.0-SNAPSHOT of only Turf rather than all 4 modules: https://bintray.com/mapbox/mapbox/mapbox-sdk-turf/4.9.0-SNAPSHOT

When I clicked on Click here to get it included. link
Screen Shot 2019-05-24 at 3 05 09 PM

I got the following error message

Screen Shot 2019-05-24 at 3 05 02 PM

So yea. The hunt continues.

@langsmith
Copy link
Author

This is the Turf POM file

Screen Shot 2019-05-24 at 3 07 35 PM

@langsmith
Copy link
Author

Think I found at least one error with the POM file. Looks like the Turf POM file above incorrectly has services-geojson for the geojson dependency artifact id. Based on https://search.maven.org/search?q=Mapbox, it should be mapbox-sdk-geojson.

@langsmith
Copy link
Author

Ok, I adjusted so that the correct artifact-id is added to the POM file.

artifactId project.ext.mapboxArtifactId

Deleted all other Java SDK files from Bintray, built release files on my local machine and then re-published to Bintray. Better Turf POM file is created:

Screen Shot 2019-05-24 at 3 45 16 PM

services module POM file:

Screen Shot 2019-05-24 at 3 49 13 PM

But darn. Despite all of this, still getting the error message.

Screen Shot 2019-05-24 at 3 50 30 PM

@langsmith
Copy link
Author

Do the POM files need a <packaging>jar</packaging> line? Doesn't seem to be in https://search.maven.org/artifact/com.mapbox.mapboxsdk/mapbox-sdk-services/4.8.0/jar

@langsmith
Copy link
Author

So weird.

https://search.maven.org/artifact/com.mapbox.mapboxsdk/mapbox-sdk-services/4.8.0/jar compared with the services POM file above (found at https://bintray.com/mapbox/mapbox/download_file?file_path=com%2Fmapbox%2Fmapboxsdk%2Fmapbox-sdk-services%2F4.9.0-SNAPSHOT%2Fmapbox-sdk-services-4.9.0-SNAPSHOT.pom) , reveals no major differences. The name, description, and url tags are in a different location. The bintray POM doesn't have the test scope dependencies either. Not sure whether any of those would lead to the red Bintray error message.

@LukasPaczos
Copy link
Contributor

You mean publishing the test SNAPSHOT as if it were a stable release, correct?

No, I meant publishing a SNAPSHOT to an actual SNAPSHOT repository to test possible JCenter compatibility (publishing to artifactory job). The POM does look fine, and I see the "4.9.0-SNAPSHOT" marked as released https://bintray.com/mapbox/mapbox/mapbox-sdk-turf/4.9.0-SNAPSHOT, it also seems to be resolvable by Gradle (well, it's missing mapbox-sdk-geojson, but the mapbox-sdk-turf looks fine). Did you succeed after all?

@langsmith
Copy link
Author

No news from Bintray support. I don't expect any to arrive.

Tried make build-release and then make publish-snapshot. Got the following 401 for each of the 4 modules:

Screen Shot 2019-05-29 at 8 27 25 PM

I haven't tried accessing the SNAPSHOT via an actual project though.

@LukasPaczos
Copy link
Contributor

Since we are still blocked on the JCenter front, I'd suggest removing all SNAPSHOT changes and focus on the MavenCentral release flow. We can still publish snapshots to Sonatype and revisit the setup when we know more about the JCenter repositories. What do you think @langsmith?

@langsmith langsmith force-pushed the ls-moving-release-process-to-bintray branch 5 times, most recently from 4ba9094 to 0267e0e Compare July 1, 2019 20:35
@langsmith
Copy link
Author

I was testing with 4.9.0-SNAPSHOT. The -SNAPSHOT ending isn't allowed in the pom file 🤦‍♂

https://central.sonatype.org/pages/requirements.html:
Screen Shot 2019-07-01 at 1 20 59 PM

When I switched to 4.9.0 for a test run of a new release, the MavenCentral request successfully went through:
Screen Shot 2019-07-01 at 1 19 44 PM
Screen Shot 2019-07-01 at 1 16 28 PM

Now we wait for the Bintray team to accept my request so that we have the option to sync the 4 modules' files with MavenCentral 🤞 I won't actually sync because this wasn't a true 4.9.0 release.

@langsmith langsmith force-pushed the ls-moving-release-process-to-bintray branch 2 times, most recently from 25da773 to 468a2e6 Compare July 2, 2019 16:54
@langsmith
Copy link
Author

Now we wait for the Bintray team to accept my request so that we have the option to sync the 4 modules' files with MavenCentral

They gave us permission and we're now able to sync files with MavenCentral. SNAPSHOTs also look setup in our Bintray account. This pr is ready for review.

Copy link
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release process is missing the step that changes the version name and removes the SNAPSHOT reference in order to support a full tag release. Check out this step. This should be applied for each artifact.

Also, the readme should be updated with the new snapshot repository URL.

Makefile Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
circle.yml Outdated Show resolved Hide resolved
services-core/gradle.properties Outdated Show resolved Hide resolved
@langsmith
Copy link
Author

Also, the readme should be updated with the new snapshot repository URL.

Updated

@langsmith langsmith force-pushed the ls-moving-release-process-to-bintray branch from 48a0524 to 38b0aae Compare July 3, 2019 15:42
@langsmith
Copy link
Author

The release process is missing the step that changes the version name and removes the SNAPSHOT reference in order to support a full tag release. Check out this step. This should be applied for each artifact.

Added the step to circle.yml and wrote it the way that I did because I deleted VERSION_NAME from each nested gradle.properties file. The VERSION_NAME is the same for all 4 modules/artifacts and it's already declared in the top level gradle.properties file.

@langsmith
Copy link
Author

Ok @LukasPaczos , pushed a commit that addressed your latest review.

@langsmith langsmith force-pushed the ls-moving-release-process-to-bintray branch from 38b0aae to 3c2054e Compare July 3, 2019 15:45
circle.yml Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
build.gradle Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@langsmith langsmith force-pushed the ls-moving-release-process-to-bintray branch from 3c2054e to 9d6593d Compare July 4, 2019 07:55
Copy link
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@tobrun tobrun merged commit 131df81 into master Jul 4, 2019
@tobrun tobrun deleted the ls-moving-release-process-to-bintray branch July 4, 2019 08:04
@tobrun
Copy link
Member

tobrun commented Jul 4, 2019

@langsmith tried creating a snapshot but hitting:

Task :artifactoryDeploy FAILED
Deploying artifact: http://oss.jfrog.org/oss-snapshot-local/com/mapbox/mapboxsdk/mapbox-sdk-core/4.9.2-SNAPSHOT/mapbox-sdk-core-4.9.2-SNAPSHOT.jar

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':artifactoryDeploy'.

java.io.IOException: Failed to deploy file. Status code: 403 Response message: Artifactory returned the following errors:
User mapbox-bot is not permitted to deploy 'com/mapbox/mapboxsdk/mapbox-sdk-core/4.9.2-SNAPSHOT/mapbox-sdk-core-4.9.2-SNAPSHOT.jar' into 'oss-snapshot-local:com/mapbox/mapboxsdk/mapbox-sdk-core/4.9.2-SNAPSHOT/mapbox-sdk-core-4.9.2-SNAPSHOT.jar'. Status code: 403

@langsmith
Copy link
Author

Java SDK SNAPSHOTs should be working and available now @tobrun https://oss.jfrog.org/artifactory/oss-snapshot-local/com/mapbox/mapboxsdk/

Screen Shot 2019-07-09 at 5 55 58 PM

Screen Shot 2019-07-09 at 5 57 41 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move to Bintray for Mapbox Java SDK releases
3 participants