[ 
https://issues.apache.org/jira/browse/BEAM-5109?focusedWorklogId=134606&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-134606
 ]

ASF GitHub Bot logged work on BEAM-5109:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Aug/18 17:21
            Start Date: 14/Aug/18 17:21
    Worklog Time Spent: 10m 
      Work Description: aaltay closed pull request #6185: [BEAM-5109] create 
python nightly snapshots
URL: https://github.com/apache/beam/pull/6185
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.test-infra/jenkins/job_Release_Python_NightlySnapshot.groovy 
b/.test-infra/jenkins/job_Release_Python_NightlySnapshot.groovy
new file mode 100644
index 00000000000..969313364e1
--- /dev/null
+++ b/.test-infra/jenkins/job_Release_Python_NightlySnapshot.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 creates the Python nightly snapshot build. Into 
gs://beam-python-nightly-snapshots.
+job('beam_Release_Python_NightlySnapshot') {
+    description('Publish a nightly snapshot for Python SDK.')
+
+    // Execute concurrent builds if necessary.
+    concurrentBuild()
+
+    // Set common parameters.
+    commonJobProperties.setTopLevelMainJobProperties(delegate)
+
+    // This is a post-commit job that runs once per day, not for every push.
+    commonJobProperties.setAutoJob(
+            delegate,
+            '0 7 * * *',
+            '[email protected]')
+
+    // Allows triggering this build against pull requests.
+    commonJobProperties.enablePhraseTriggeringFromPullRequest(
+            delegate,
+            'Create Python SDK Nightly Snapshot',
+            'Run Python Publish')
+
+    steps {
+      gradle {
+        rootBuildScriptDir(commonJobProperties.checkoutDir)
+        tasks(':beam-sdks-python:sdist')
+        commonJobProperties.setGradleSwitches(delegate)
+      }
+      shell('cd ' + commonJobProperties.checkoutDir +
+        ' && bash sdks/python/scripts/run_snapshot_publish.sh')
+    }
+}
diff --git a/sdks/python/scripts/run_snapshot_publish.sh 
b/sdks/python/scripts/run_snapshot_publish.sh
new file mode 100755
index 00000000000..88231493f2b
--- /dev/null
+++ b/sdks/python/scripts/run_snapshot_publish.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+#    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.
+#
+
+
+VERSION=$(awk '/__version__/{print $3}' 
$WORKSPACE/src/sdks/python/apache_beam/version.py)
+VERSION=$(echo $VERSION | cut -c 2- | rev | cut -c 2- | rev)
+time=$(date +"%Y-%m-%dT%H:%M:%S")
+SNAPSHOT="apache-beam-$VERSION-$time.zip"
+BUCKET=gs://beam-python-nightly-snapshots
+
+cd $WORKSPACE/src/sdks/python/build
+
+# rename the file to be apache-beam-{VERSION}-{datetime}.zip
+for file in "apache-beam-$VERSION*.zip"; do
+  mv $file $SNAPSHOT
+done
+
+# upload to gcs bucket
+gsutil cp $SNAPSHOT $BUCKET/$VERSION/


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 134606)
    Time Spent: 4.5h  (was: 4h 20m)

> Build nightly snapshot for Python SDK
> -------------------------------------
>
>                 Key: BEAM-5109
>                 URL: https://issues.apache.org/jira/browse/BEAM-5109
>             Project: Beam
>          Issue Type: Bug
>          Components: build-system
>            Reporter: yifan zou
>            Assignee: yifan zou
>            Priority: Major
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to