Avoid ci-management archiving files twice 94/20394/9
authorVratko Polak <vrpolak@cisco.com>
Tue, 2 Jul 2019 14:37:12 +0000 (16:37 +0200)
committerVratko Polak <vrpolak@cisco.com>
Fri, 12 Jul 2019 12:56:28 +0000 (12:56 +0000)
https://gerrit.fd.io/r/20119
has changed the way archival works,
everything should now go to logs.fd.io
(instead of appearing on run page in jenkins.fd.io).

The glob pattern for archiving is quite eager,
doing recursive search. That is good, as it can find
also misplaced useful outputs.
But it also means our usage of copy_archives function
creates two copies of archived directories,
usually archives/ and archives/archive/.

This change simply removes copy_archives,
relying on the new recursive search.

A solution with changing ARCHIVE_DIR and moving if needed
would be better, but looking at amout of jobs
and various func bootstraps, it is not worth the effort.

Change-Id: Iad2bc09455944307e59eecafa64d1db6dc8befe8
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
resources/libraries/bash/entry/bootstrap_verify_perf.sh
resources/libraries/bash/entry/bootstrap_vpp_device.sh
resources/libraries/bash/entry/per_patch_device.sh
resources/libraries/bash/entry/per_patch_perf.sh
resources/libraries/bash/function/common.sh

index b9299b1..1e742c5 100644 (file)
@@ -48,5 +48,4 @@ select_tags || die
 compose_pybot_arguments || die
 run_pybot || die
 untrap_and_unreserve_testbed || die
-copy_archives || die
 die_on_pybot_error || die
index 209943f..32c77c9 100755 (executable)
@@ -45,5 +45,4 @@ activate_docker_topology || die
 select_vpp_device_tags || die
 compose_pybot_arguments || die
 run_pybot || die
-copy_archives || die
 die_on_pybot_error || die
index ac2c4a4..4c9399a 100644 (file)
@@ -55,6 +55,5 @@ activate_docker_topology || die
 select_vpp_device_tags || die
 compose_pybot_arguments || die
 run_pybot || die
-copy_archives || die
 archive_test_results "csit_current" || die
 die_on_pybot_error || die
index 195d1a7..fd2d789 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-# Copyright (c) 2018 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
 # Licensed 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:
@@ -70,7 +70,6 @@ for ((iter=0; iter<iterations; iter++)); do
     select_build "build_parent" || die
     check_download_dir || die
     run_pybot || die
-    copy_archives || die
     archive_parse_test_results "csit_parent/${iter}" || die
     die_on_pybot_error || die
     # TODO: Use less heavy way to avoid apt remove failures.
@@ -78,7 +77,6 @@ for ((iter=0; iter<iterations; iter++)); do
     select_build "build_current" || die
     check_download_dir || die
     run_pybot || die
-    copy_archives || die
     archive_parse_test_results "csit_current/${iter}" || die
     die_on_pybot_error || die
 done
index ae00886..b0b97e0 100644 (file)
@@ -282,31 +282,6 @@ function compose_pybot_arguments () {
 }
 
 
-function copy_archives () {
-
-    # Create additional archive if workspace variable is set.
-    # This way if script is running in jenkins all will be
-    # automatically archived to logs.fd.io.
-    #
-    # Variables read:
-    # - WORKSPACE - Jenkins workspace, copy only if the value is not empty.
-    #   Can be unset, then it speeds up manual testing.
-    # - ARCHIVE_DIR - Path to directory with content to be copied.
-    # Directories updated:
-    # - ${WORKSPACE}/archives/ - Created if does not exist.
-    #   Content of ${ARCHIVE_DIR}/ is copied here.
-    # Functions called:
-    # - die - Print to stderr and exit.
-
-    set -exuo pipefail
-
-    if [[ -n "${WORKSPACE-}" ]]; then
-        mkdir -p "${WORKSPACE}/archives/" || die "Archives dir create failed."
-        cp -rf "${ARCHIVE_DIR}"/* "${WORKSPACE}/archives" || die "Copy failed."
-    fi
-}
-
-
 function deactivate_docker_topology () {
 
     # Deactivate virtual vpp-device topology by removing containers.