From 59c664114d3b5bff88aea07d5ee3b059622b848d Mon Sep 17 00:00:00 2001 From: Brett Logan Date: Mon, 30 Mar 2020 12:51:39 -0400 Subject: [PATCH] Change Download Location of Fabric Binaries (#143) The current scripts download the fabric binaries and place them in `/usr/local`. Modifying the host system in CI is generally bad practice. The `bootstrap.sh` script also downloads the binaries into the root of the `fabric-samples` repo. It is good practice for us to do the same in CI. We also have several samples that make an assumption about the location of these scripts. In the future we should re-evaluate these examples. Signed-off-by: Brett Logan --- .gitignore | 1 + ci/azure-pipelines.yml | 1 + ci/install-fabric.yml | 6 ++---- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 91fd87a1f3..cf8cb35a65 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ vendor/ .vscode .gradle +.idea diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index c9278068c9..6f2db0262a 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -8,6 +8,7 @@ trigger: variables: NODE_VER: '12.x' + PATH: $(Agent.BuildDirectory)/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin jobs: - job: fabcar_go diff --git a/ci/install-fabric.yml b/ci/install-fabric.yml index e96cfff64e..dc31c375b6 100644 --- a/ci/install-fabric.yml +++ b/ci/install-fabric.yml @@ -5,13 +5,11 @@ steps: - script: | set -eo pipefail - wget -q -P /tmp https://hyperledger.jfrog.io/hyperledger/fabric-binaries/hyperledger-fabric-linux-amd64-latest.tar.gz - sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C /usr/local + curl -L --retry 5 --retry-delay 3 https://hyperledger.jfrog.io/hyperledger/fabric-binaries/hyperledger-fabric-linux-amd64-latest.tar.gz | tar xz displayName: Download Fabric CLI - script: | set -eo pipefail - wget -q -P /tmp https://hyperledger.jfrog.io/hyperledger/fabric-binaries/hyperledger-fabric-ca-linux-amd64-latest.tar.gz - sudo tar xzvf /tmp/hyperledger-fabric-ca-linux-amd64-latest.tar.gz -C /usr/local + curl -L --retry 5 --retry-delay 3 https://hyperledger.jfrog.io/hyperledger/fabric-binaries/hyperledger-fabric-ca-linux-amd64-latest.tar.gz | tar xz displayName: Download Fabric CA CLI - script: bash ci/getDockerImages.sh displayName: Pull Fabric Docker images