From 4fe6a2507e1a574edd4f5bd5823b137538da3f93 Mon Sep 17 00:00:00 2001 From: Brett Logan Date: Mon, 20 Jan 2020 10:33:02 -0500 Subject: [PATCH] [FABCI-482] Update Nexus URL's to Artifactory (#92) Signed-off-by: Brett Logan --- chaincode/abstore/java/build.gradle | 2 +- chaincode/fabcar/java/build.gradle | 2 +- ci/install-fabric.yml | 16 +-- .../dependency-reduced-pom.xml | 4 +- .../digibank/application-java/pom.xml | 2 +- .../digibank/contract-java/build.gradle | 2 +- .../dependency-reduced-pom.xml | 4 +- .../magnetocorp/application-java/pom.xml | 4 +- scripts/Jenkins_Scripts/byfn_eyfn.sh | 112 ------------------ 9 files changed, 16 insertions(+), 132 deletions(-) delete mode 100755 scripts/Jenkins_Scripts/byfn_eyfn.sh diff --git a/chaincode/abstore/java/build.gradle b/chaincode/abstore/java/build.gradle index fbcd7758ec..6a30517a82 100644 --- a/chaincode/abstore/java/build.gradle +++ b/chaincode/abstore/java/build.gradle @@ -17,7 +17,7 @@ repositories { mavenLocal() mavenCentral() maven { - url "https://nexus.hyperledger.org/content/repositories/snapshots/" + url "https://hyperledger.jfrog.io/hyperledger/fabric-maven" } maven { url 'https://jitpack.io' diff --git a/chaincode/fabcar/java/build.gradle b/chaincode/fabcar/java/build.gradle index f6439f4896..b65d862206 100644 --- a/chaincode/fabcar/java/build.gradle +++ b/chaincode/fabcar/java/build.gradle @@ -22,7 +22,7 @@ dependencies { repositories { maven { - url "https://nexus.hyperledger.org/content/repositories/snapshots/" + url "https://hyperledger.jfrog.io/hyperledger/fabric-maven" } jcenter() maven { diff --git a/ci/install-fabric.yml b/ci/install-fabric.yml index 4837ac3ef9..e96cfff64e 100644 --- a/ci/install-fabric.yml +++ b/ci/install-fabric.yml @@ -4,18 +4,14 @@ steps: - script: | - set -ex - mvn dependency:get -DremoteRepositories=https://nexus.hyperledger.org/content/repositories/snapshots -Dartifact=org.hyperledger.fabric:hyperledger-fabric-latest:linux-amd64.latest-SNAPSHOT:tar.gz - mvn dependency:copy -Dartifact=org.hyperledger.fabric:hyperledger-fabric-latest:linux-amd64.latest-SNAPSHOT:tar.gz -DoutputDirectory=/tmp - cd /usr/local - sudo tar xzvf /tmp/hyperledger-fabric-latest-linux-amd64.latest-SNAPSHOT.tar.gz + 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 displayName: Download Fabric CLI - script: | - set -ex - mvn dependency:get -DremoteRepositories=https://nexus.hyperledger.org/content/repositories/snapshots -Dartifact=org.hyperledger.fabric-ca:hyperledger-fabric-ca-latest:linux-amd64.latest-SNAPSHOT:tar.gz - mvn dependency:copy -Dartifact=org.hyperledger.fabric-ca:hyperledger-fabric-ca-latest:linux-amd64.latest-SNAPSHOT:tar.gz -DoutputDirectory=/tmp - cd /usr/local - sudo tar xzvf /tmp/hyperledger-fabric-ca-latest-linux-amd64.latest-SNAPSHOT.tar.gz + 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 displayName: Download Fabric CA CLI - script: bash ci/getDockerImages.sh displayName: Pull Fabric Docker images diff --git a/commercial-paper/organization/digibank/application-java/dependency-reduced-pom.xml b/commercial-paper/organization/digibank/application-java/dependency-reduced-pom.xml index 528b022140..7ff0d0ccdc 100644 --- a/commercial-paper/organization/digibank/application-java/dependency-reduced-pom.xml +++ b/commercial-paper/organization/digibank/application-java/dependency-reduced-pom.xml @@ -44,8 +44,8 @@ hyperledger - Hyperledger Nexus - https://nexus.hyperledger.org/content/repositories/snapshots + Hyperledger Artifactory + https://hyperledger.jfrog.io/hyperledger/fabric-maven jitpack.io diff --git a/commercial-paper/organization/digibank/application-java/pom.xml b/commercial-paper/organization/digibank/application-java/pom.xml index bc74db224d..0a58cee7bb 100644 --- a/commercial-paper/organization/digibank/application-java/pom.xml +++ b/commercial-paper/organization/digibank/application-java/pom.xml @@ -64,7 +64,7 @@ hyperledger Hyperledger Nexus - https://nexus.hyperledger.org/content/repositories/snapshots + https://hyperledger.jfrog.io/hyperledger/fabric-maven diff --git a/commercial-paper/organization/digibank/contract-java/build.gradle b/commercial-paper/organization/digibank/contract-java/build.gradle index a8be6eb177..2f04c43e3a 100644 --- a/commercial-paper/organization/digibank/contract-java/build.gradle +++ b/commercial-paper/organization/digibank/contract-java/build.gradle @@ -13,7 +13,7 @@ repositories { url 'https://jitpack.io' } maven { - url "https://nexus.hyperledger.org/content/repositories/snapshots/" + url "https://hyperledger.jfrog.io/hyperledger/fabric-maven" } } diff --git a/commercial-paper/organization/magnetocorp/application-java/dependency-reduced-pom.xml b/commercial-paper/organization/magnetocorp/application-java/dependency-reduced-pom.xml index 528b022140..7ff0d0ccdc 100644 --- a/commercial-paper/organization/magnetocorp/application-java/dependency-reduced-pom.xml +++ b/commercial-paper/organization/magnetocorp/application-java/dependency-reduced-pom.xml @@ -44,8 +44,8 @@ hyperledger - Hyperledger Nexus - https://nexus.hyperledger.org/content/repositories/snapshots + Hyperledger Artifactory + https://hyperledger.jfrog.io/hyperledger/fabric-maven jitpack.io diff --git a/commercial-paper/organization/magnetocorp/application-java/pom.xml b/commercial-paper/organization/magnetocorp/application-java/pom.xml index 663e6cc756..5cab62e874 100644 --- a/commercial-paper/organization/magnetocorp/application-java/pom.xml +++ b/commercial-paper/organization/magnetocorp/application-java/pom.xml @@ -63,8 +63,8 @@ hyperledger - Hyperledger Nexus - https://nexus.hyperledger.org/content/repositories/snapshots + Hyperledger Artifactory + https://hyperledger.jfrog.io/hyperledger/fabric-maven diff --git a/scripts/Jenkins_Scripts/byfn_eyfn.sh b/scripts/Jenkins_Scripts/byfn_eyfn.sh deleted file mode 100755 index 98c02bf052..0000000000 --- a/scripts/Jenkins_Scripts/byfn_eyfn.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash -# -# Copyright IBM Corp All Rights Reserved -# -# SPDX-License-Identifier: Apache-2.0 -# - -# docker container list -CONTAINER_LIST=(peer0.org1 peer1.org1 peer0.org2 peer1.org2 peer0.org3 peer1.org3 orderer) -COUCHDB_CONTAINER_LIST=(couchdb0 couchdb1 couchdb2 couchdb3 couchdb4 couchdb5) -MARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')" | awk '{print tolower($0)}') -echo "MARCH: $MARCH" -echo "======== PULL fabric BINARIES ========" -echo -# Set Nexus Snapshot URL -NEXUS_URL=https://nexus.hyperledger.org/content/repositories/snapshots/org/hyperledger/fabric/hyperledger-fabric-latest/$MARCH.latest-SNAPSHOT - -# Download the maven-metadata.xml file -curl $NEXUS_URL/maven-metadata.xml > maven-metadata.xml -if grep -q "not found in local storage of repository" "maven-metadata.xml"; then - echo "FAILED: Unable to download from $NEXUS_URL" -else - # Set latest tar file to the VERSION - VERSION=$(grep value maven-metadata.xml | sort -u | cut -d "<" -f2|cut -d ">" -f2) - # Download tar.gz file and extract it - cd $BASE_FOLDER/fabric-samples || exit - mkdir -p $BASE_FOLDER/fabric-samples/bin - curl $NEXUS_URL/hyperledger-fabric-latest-$VERSION.tar.gz | tar xz - if [ $? -ne 0 ]; then - echo -e "\033[31m FAILED to download binaries" "\033[0m" - exit 1 - fi - rm hyperledger-fabric-*.tar.gz - rm -f maven-metadata.xml - echo "Finished pulling fabric binaries..." - echo -fi - -cd $BASE_FOLDER/fabric-samples/first-network || exit -export PATH=$BASE_FOLDER/fabric-samples/bin:$PATH - -logs() { - -# Create Logs directory -mkdir -p $WORKSPACE/Docker_Container_Logs - -for CONTAINER in ${CONTAINER_LIST[*]}; do - docker logs $CONTAINER.example.com >& $WORKSPACE/Docker_Container_Logs/$CONTAINER-$1.log - echo -done -} - -if [ ! -z $2 ]; then - - for CONTAINER in ${COUCHDB_CONTAINER_LIST[*]}; do - docker logs $CONTAINER >& $WORKSPACE/Docker_Container_Logs/$CONTAINER-$1.log - echo - done -fi - -copy_logs() { - -# Call logs function -logs $2 $3 - -if [ $1 != 0 ]; then - echo -e "\033[31m $2 test case is FAILED" "\033[0m" - exit 1 -fi -} - -echo "############## BYFN,EYFN DEFAULT CHANNEL TEST ###################" -echo "#################################################################" -echo y | ./byfn.sh -m down -echo y | ./byfn.sh -m up -t 60 -copy_logs $? default-channel -echo y | ./eyfn.sh -m up -t 60 -copy_logs $? default-channel -echo y | ./eyfn.sh -m down -echo - -echo "############### BYFN,EYFN CUSTOM CHANNEL WITH COUCHDB TEST ##############" -echo "#########################################################################" -echo y | ./byfn.sh -m up -c custom-channel-couchdb -s couchdb -t 75 -d 15 -copy_logs $? custom-channel-couch couchdb -echo y | ./eyfn.sh -m up -c custom-channel-couchdb -s couchdb -t 75 -d 15 -copy_logs $? custom-channel-couch -echo y | ./eyfn.sh -m down -echo - -echo "############### BYFN,EYFN WITH JAVASCRIPT Chaincode. TEST ################" -echo "####################################################################" -echo y | ./byfn.sh -m up -l javascript -t 60 -copy_logs $? default-channel-javascript -echo y | ./eyfn.sh -m up -l javascript -t 60 -copy_logs $? default-channel-javascript -echo y | ./eyfn.sh -m down -echo - -echo "############### BYFN WITH CA TEST ################" -echo "##################################################" -echo y | ./byfn.sh -m up -a -copy_logs $? default-channel-ca -echo y | ./byfn.sh -m down -a -echo - -echo "############### BYFN WITH NO CHAINCODE TEST ################" -echo "############################################################" -echo y | ./byfn.sh -m up -n -copy_logs $? default-channel-ca -echo y | ./byfn.sh -m down -n -echo \ No newline at end of file