blob: 8dca21f0b0afff48b8c484657431f9820abed7df [file] [log] [blame]
Miguel Young de la Sotab4df8602019-11-21 12:44:11 -06001# Copyright lowRISC contributors.
2# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3# SPDX-License-Identifier: Apache-2.0
4
5# Azure template for downloading pipeline step outputs and unpacking them.
6#
7# This template will download all artifacts from upstream jobs (which are
8# expected to use upload_artifacts_template.yml) and unpack them.
9#
10# This template expects that a variable $BUILD_ROOT is set to a writeable
11# directory; the results will be available in $BIN_DIR. See
12# util/build_consts.sh for more information.
13
14steps:
15 - task: DownloadPipelineArtifact@2
16 inputs:
17 buildType: current
18 targetPath: '$(BUILD_ROOT)/downloads'
19 displayName: 'Download upstream outputs'
20 - bash: |
21 set -e
22 test -n "$BUILD_ROOT"
23 . util/build_consts.sh
24 mkdir -p "$BIN_DIR"
25
26 sudo apt-get install -y tree
27
28 tree "$BUILD_ROOT"
29 find "$BUILD_ROOT/downloads" \
30 -name 'build-bin.tar' \
31 -exec \
32 tar -C "$BIN_DIR" \
33 --strip-components=1 \
34 --overwrite \
35 -xvf {} \;
36 tree "$BUILD_ROOT"
37 displayName: 'Unpack upstream outputs'
38