rmetzger commented on a change in pull request #11372: [FLINK-16480] Improve 
error reporting on AZP
URL: https://github.com/apache/flink/pull/11372#discussion_r393572339
 
 

 ##########
 File path: tools/travis/common-logging.sh
 ##########
 @@ -0,0 +1,123 @@
+#!/usr/bin/env 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.
+################################################################################
+
+# Maximum times to retry uploading artifacts file to transfer.sh
+TRANSFER_UPLOAD_MAX_RETRIES=2
+
+# The delay between two retries to upload artifacts file to transfer.sh. The 
default exponential
+# backoff algorithm should be too long for the last several retries.
+TRANSFER_UPLOAD_RETRY_DELAY=5
+
+# E.g. travis-artifacts/apache/flink/1595/1595.1
+UPLOAD_TARGET_PATH="travis-artifacts/${TRAVIS_REPO_SLUG}/${TRAVIS_BUILD_NUMBER}/"
+# These variables are stored as secure variables in '.travis.yml', which are 
generated per repo via
+# the travis command line tool.
+UPLOAD_BUCKET=$ARTIFACTS_AWS_BUCKET
+UPLOAD_ACCESS_KEY=$ARTIFACTS_AWS_ACCESS_KEY
+UPLOAD_SECRET_KEY=$ARTIFACTS_AWS_SECRET_KEY
+
+
+SCRIPT_DIR="`dirname \"$0\"`"
+SCRIPT_DIR="`( cd \"${SCRIPT_DIR}\" && pwd -P)`"
+export FLINK_ROOT="`( cd \"${SCRIPT_DIR}/..\" && pwd -P)`"
+if [ -z "${FLINK_ROOT}" ] ; then
+       # error; for some reason, the path is not accessible
+       # to the script (e.g. permissions re-evaled after suid)
+       exit 1  # fail
+fi
+
+prepare_artifacts() {
+       export ARTIFACTS_DIR="${SCRIPT_DIR}/artifacts"
+
+       mkdir -p $ARTIFACTS_DIR || { echo "FAILURE: cannot create log directory 
'${ARTIFACTS_DIR}'." ; exit 1; }
+}
+
+upload_artifacts() {
+       ARTIFACTS_FILE=${TRAVIS_JOB_NUMBER}.tar.gz
+       if [ ! -z "$TF_BUILD" ] ; then
+               # set proper artifacts file name on Azure Pipelines
+               ARTIFACTS_FILE=${BUILD_BUILDNUMBER}.tar.gz
+               if [ ! -z "$MODULE" ] ; then
+                       ARTIFACTS_FILE=${BUILD_BUILDNUMBER}-$(echo $MODULE | tr 
-dc '[:alnum:]\n\r').tar.gz
+               fi
+       fi
+
+       echo "PRODUCED build artifacts."
 
 Review comment:
   That's what I tried to do. There's a commit introducing core dump collection 
for regular tests, and another commit for introducing it for end to end tests.
   
   I could not find any guidelines on how to exactly split the commits. How do 
you want it?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to