-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-11665] Publish Beam GCP BOM #13737
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
90561ac
Publish beam gcp bom
kileys 8a7269c
move beam bom to dep
kileys b9d4d34
refactor
kileys e49030d
ignore bom in javadoc project
kileys 8f8e296
fix urls, rename artifact
kileys 1768113
Merge branch 'master' of github.com:apache/beam into beam-bom
kileys f829c05
add new archetype project
kileys a6c0e15
scripts to run examples with bom
kileys c02ffe7
add task to run bom examples
kileys 969dfe7
add maven archetype for beam gcp bom
kileys c5b7295
add to release script
kileys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
release/src/main/groovy/GoogleCloudPlatformBomArchetype.groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #!groovy | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| class GoogleCloudPlatformBomArchetype { | ||
| def static generate(TestScripts t) { | ||
| // Generate a maven project from the snapshot repository | ||
| String output_text = t.run """mvn archetype:generate \ | ||
| --update-snapshots \ | ||
| -DarchetypeGroupId=org.apache.beam \ | ||
| -DarchetypeArtifactId=beam-sdks-java-maven-archetypes-gcp-bom-examples \ | ||
| -DarchetypeVersion=${t.ver()} \ | ||
| -DgroupId=org.example \ | ||
| -DartifactId=word-count-beam \ | ||
| -Dversion="0.1" \ | ||
| -Dpackage=org.apache.beam.examples \ | ||
| -DinteractiveMode=false""" | ||
|
|
||
| // Check if it was generated | ||
| t.see "[INFO] BUILD SUCCESS", output_text | ||
| t.run "cd word-count-beam" | ||
| output_text = t.run "ls" | ||
| t.see "pom.xml", output_text | ||
| t.see "src", output_text | ||
| String wordcounts = t.run "ls src/main/java/org/apache/beam/examples/" | ||
| t.see "WordCount.java", wordcounts | ||
| String games = t.run "ls src/main/java/org/apache/beam/examples/complete/game/" | ||
| t.see "UserScore.java", games | ||
| } | ||
| } |
61 changes: 61 additions & 0 deletions
61
release/src/main/groovy/mobilegaming-java-dataflowbom.groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #!groovy | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| t = new TestScripts(args) | ||
| mobileGamingCommands = new MobileGamingCommands(testScripts: t) | ||
|
|
||
| /* | ||
| * Run the mobile game examples on Dataflow. | ||
| * https://beam.apache.org/get-started/mobile-gaming-example/ | ||
| */ | ||
|
|
||
| t.describe ('Run Apache Beam Java SDK Mobile Gaming Examples using GCP BOM - Dataflow') | ||
|
|
||
| GoogleCloudPlatformBomArchetype.generate(t) | ||
|
|
||
| def runner = "DataflowRunner" | ||
| String command_output_text | ||
|
|
||
| /** | ||
| * Run the UserScore example on DataflowRunner | ||
| * */ | ||
|
|
||
| t.intent("Running: UserScore example with Beam GCP BOM on DataflowRunner") | ||
| t.run(mobileGamingCommands.createPipelineCommand("UserScore", runner)) | ||
| command_output_text = t.run "gsutil cat gs://${t.gcsBucket()}/${mobileGamingCommands.getUserScoreOutputName(runner)}* | grep user19_BananaWallaby" | ||
| t.see "total_score: 231, user: user19_BananaWallaby", command_output_text | ||
| t.success("UserScore successfully run on DataflowRunner.") | ||
| t.run "gsutil rm gs://${t.gcsBucket()}/${mobileGamingCommands.getUserScoreOutputName(runner)}*" | ||
|
|
||
|
|
||
| /** | ||
| * Run the HourlyTeamScore example on DataflowRunner | ||
| * */ | ||
|
|
||
| t.intent("Running: HourlyTeamScore example with Beam GCP BOM on DataflowRunner") | ||
| t.run(mobileGamingCommands.createPipelineCommand("HourlyTeamScore", runner)) | ||
| command_output_text = t.run "gsutil cat gs://${t.gcsBucket()}/${mobileGamingCommands.getHourlyTeamScoreOutputName(runner)}* | grep AzureBilby " | ||
| t.see "total_score: 2788, team: AzureBilby", command_output_text | ||
| t.success("HourlyTeamScore successfully run on DataflowRunner.") | ||
| t.run "gsutil rm gs://${t.gcsBucket()}/${mobileGamingCommands.getHourlyTeamScoreOutputName(runner)}*" | ||
|
|
||
| new LeaderBoardRunner().run(runner, t, mobileGamingCommands, false) | ||
| new LeaderBoardRunner().run(runner, t, mobileGamingCommands, true) | ||
|
|
||
| t.done() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * License); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an AS IS BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| apply plugin: 'org.apache.beam.module' | ||
| apply plugin: 'maven-publish' | ||
| apply plugin: 'java-platform' | ||
|
|
||
| javaPlatform { | ||
| allowDependencies() | ||
| } | ||
|
|
||
| def isRelease(Project project) { | ||
| return project.hasProperty('isRelease') | ||
| } | ||
|
|
||
| publishing { | ||
| publications { | ||
| mavenJava(MavenPublication) { | ||
| groupId = project.mavenGroupId | ||
| artifactId = archivesBaseName | ||
| version = project.version | ||
| pom { | ||
| name = project.description | ||
| if (project.hasProperty("summary")) { | ||
| description = project.summary | ||
| } | ||
| url = "https://beam.apache.org" | ||
| inceptionYear = "2016" | ||
| licenses { | ||
| license { | ||
| name = "Apache License, Version 2.0" | ||
| url = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
| distribution = "repo" | ||
| } | ||
| } | ||
| scm { | ||
| connection = "scm:git:https://gitbox.apache.org/repos/asf/beam.git" | ||
| developerConnection = "scm:git:https://gitbox.apache.org/repos/asf/beam.git" | ||
| url = "https://gitbox.apache.org/repos/asf?p=beam.git;a=summary" | ||
| } | ||
| issueManagement { | ||
| system = "jira" | ||
| url = "https://issues.apache.org/jira/browse/BEAM" | ||
| } | ||
| mailingLists { | ||
| mailingList { | ||
| name = "Beam Dev" | ||
| subscribe = "dev-subscribe@beam.apache.org" | ||
| unsubscribe = "dev-unsubscribe@beam.apache.org" | ||
| post = "dev@beam.apache.org" | ||
| archive = "https://www.mail-archive.com/dev@beam.apache.org" | ||
| } | ||
| mailingList { | ||
| name = "Beam User" | ||
| subscribe = "user-subscribe@beam.apache.org" | ||
| unsubscribe = "user-unsubscribe@beam.apache.org" | ||
| post = "user@beam.apache.org" | ||
| archive = "https://www.mail-archive.com/user@beam.apache.org" | ||
| } | ||
| mailingList { | ||
| name = "Beam Commits" | ||
| subscribe = "commits-subscribe@beam.apache.org" | ||
| unsubscribe = "commits-unsubscribe@beam.apache.org" | ||
| post = "commits@beam.apache.org" | ||
| archive = "https://www.mail-archive.com/commits@beam.apache.org" | ||
| } | ||
| } | ||
| developers { | ||
| developer { | ||
| name = "The Apache Beam Team" | ||
| email = "dev@beam.apache.org" | ||
| url = "https://beam.apache.org" | ||
| organization = "Apache Software Foundation" | ||
| organizationUrl = "https://www.apache.org" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| pom.withXml { | ||
| def elem = asElement() | ||
| def hdr = elem.getOwnerDocument().createComment( | ||
| ''' | ||
| Licensed to the Apache Software Foundation (ASF) under one or more | ||
| contributor license agreements. See the NOTICE file distributed with | ||
| this work for additional information regarding copyright ownership. | ||
| The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| (the "License"); you may not use this file except in compliance with | ||
| the License. You may obtain a copy of the License at | ||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| ''') | ||
| elem.insertBefore(hdr, elem.getFirstChild()) | ||
| } | ||
|
|
||
| from components.javaPlatform | ||
| } | ||
| } | ||
|
|
||
| repositories project.ext.repositories | ||
| } | ||
|
|
||
| // Only sign artifacts if we are performing a release | ||
| if (isRelease(project) && !project.hasProperty('noSigning')) { | ||
| apply plugin: "signing" | ||
| signing { | ||
| useGpgCmd() | ||
| sign publishing.publications | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * License); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an AS IS BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| apply from: '../common.gradle' | ||
|
|
||
| dependencies { | ||
| api platform(project(":sdks:java:bom")) | ||
| api platform(project.library.java.google_cloud_platform_libraries_bom) | ||
| constraints { | ||
| api project.library.java.guava | ||
| } | ||
| } | ||
|
|
||
| publishing { | ||
| publications { | ||
| mavenJava(MavenPublication) { | ||
| artifactId = 'beam-sdks-java-google-cloud-platform-bom' | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be included as part of the release validation spreadsheet?
In other words, is this required to pass to validate the RC?