tvalentyn commented on a change in pull request #13393: URL: https://github.com/apache/beam/pull/13393#discussion_r527990338
########## File path: .test-infra/jenkins/job_Publish_SDK_Image_Snapshots.groovy ########## @@ -0,0 +1,52 @@ +/* + * 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. + */ + +import CommonJobProperties as commonJobProperties + +// This job publishes regular snapshots of the SDK harness containers for +// testing purposes. It builds and pushes the SDK container to the +// specified GCR repo, tagged at the current Git commit. +job('beam_Publish_Beam_SDK_Snapshots') { + description('Builds SDK harness images snapshots regularly for testing purposes.') + + // Set common parameters. + commonJobProperties.setTopLevelMainJobProperties(delegate) + + // // Runs once per hour. + commonJobProperties.setAutoJob(delegate, '0 * * * *') + + // Use jenkins env var interpolation - leave in single quotes + def imageRepo = 'gcr.io/apache-beam-testing/beam-sdk' + def imageTag = '${GIT_COMMIT}' + + steps { + shell("echo 'Pushing SDK snapshots to ${imageRepo} at tag: ${imageTag}") + gradle { + rootBuildScriptDir(commonJobProperties.checkoutDir) + commonJobProperties.setGradleSwitches(delegate) + tasks(':sdks:go:container:dockerPush') + tasks(':sdks:python:container:java8:dockerPush') + tasks(':sdks:python:container:java11:dockerPush') + tasks(':sdks:python:container:py36:dockerPush') Review comment: let's not hardcode the specific python versions to have less places to change, when we have a new python version to add. Btw, similar concern may soon apply to Java as well. Consider adding an entry to: https://github.com/apache/beam/blob/85b30233910efc1daf93afc76ea03d7eef2d6257/.test-infra/jenkins/PythonTestProperties.groovy and populate gradle tasks based on the configuration, similar to https://github.com/apache/beam/blob/31fd516dd1e5e345f7e30f005afa2110942accce/.test-infra/jenkins/job_PostCommit_CrossLanguageValidatesRunner_Dataflow.groovy#L43 We could also choose better name for PythonTestProperties down the road. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
