Skip to content

Commit 869f107

Browse files
Brett Loganmbwhite
authored andcommitted
[FABCI-482] Update Nexus URL's to Artifactory
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
1 parent b296d0a commit 869f107

File tree

3 files changed

+18
-65
lines changed

3 files changed

+18
-65
lines changed

ci/azure-pipelines.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -200,22 +200,6 @@ stages:
200200
npm audit
201201
displayName: 'Run npm audit'
202202
203-
# Publish the snapshot images
204-
- job: snapshot_publish
205-
condition: and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
206-
dependsOn: fvt
207-
steps:
208-
- task: DownloadPipelineArtifact@2
209-
inputs:
210-
artifact: nodeenv-docker-image
211-
path: $(Build.SourcesDirectory)/build
212-
- script: ./ci/scripts/publish_docker.sh
213-
env:
214-
NEXUS_USERNAME: $(nexus-user)
215-
NEXUS_PASSWORD: $(nexus-password)
216-
NEXUS_URL: nexus3.hyperledger.org:10003/hyperledger
217-
displayName: 'docker push to nexus'
218-
219203
# Publish a new version, triggered by a git tag
220204
- stage: Publish_tag
221205
dependsOn: Build_and_Test
@@ -257,14 +241,13 @@ stages:
257241
inputs:
258242
artifact: nodeenv-docker-image
259243
path: $(Build.SourcesDirectory)/build
260-
244+
261245
- script: |
262246
wget -qO "$PWD/manifest-tool" https://github.com/estesp/manifest-tool/releases/download/v1.0.0/manifest-tool-linux-amd64
263247
chmod +x ./manifest-tool
264248
265249
docker image load --input build/fabric-nodeenv.tar.gz
266250
docker images
267-
# Publish docker images to nexus repository
268251
docker login ${DOCKER_REGISTRY_URL} --username=${DOCKER_REGISTRY_USERNAME} --password=${DOCKER_REGISTRY_PASSWORD}
269252
echo "Logged in to docker registry"
270253
# tag nodeenv image to PACKAGE_VERSION
@@ -275,4 +258,4 @@ stages:
275258
./manifest-tool push from-args --platforms linux/amd64 --template "hyperledger/fabric-nodeenv:amd64-$(BuildData.PACKAGE_VERSION)-beta" --target "hyperledger/fabric-nodeenv:2.0"
276259
env:
277260
DOCKER_REGISTRY_USERNAME: $(DockerHub-Username)
278-
DOCKER_REGISTRY_PASSWORD: $(DockerHub-Password)
261+
DOCKER_REGISTRY_PASSWORD: $(DockerHub-Password)

ci/scripts/publish_docker.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

tools/getEdgeDocker.sh

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/bin/bash -e
2-
set -o pipefail
2+
set -euo pipefail
33

44
echo "======== PULL DOCKER IMAGES ========"
55

6-
##########################################################
7-
# Pull and Tag the fabric and fabric-ca images from Nexus
8-
##########################################################
9-
echo "Fetching images from Nexus"
10-
NEXUS_URL=nexus3.hyperledger.org:10001
11-
ORG_NAME="hyperledger/fabric"
6+
###############################################################
7+
# Pull and Tag the fabric and fabric-ca images from Artifactory
8+
###############################################################
9+
echo "Fetching images from Artifactory"
10+
ARTIFACTORY_URL=hyperledger-fabric.jfrog.io
11+
ORG_NAME="hyperledger"
1212

1313
VERSION=2.0.0
1414
ARCH="amd64"
@@ -25,39 +25,21 @@ dockerTag() {
2525
for IMAGES in peer orderer ca ca orderer baseos ccenv tools; do
2626
echo "Images: $IMAGES"
2727
echo
28-
docker pull $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG
29-
if [ $? != 0 ]; then
28+
docker pull $ARTIFACTORY_URL/fabric-$IMAGES:$STABLE_TAG
29+
if [[ $? != 0 ]]; then
3030
echo "FAILED: Docker Pull Failed on $IMAGES"
3131
exit 1
3232
fi
33-
docker tag $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG $ORG_NAME-$IMAGES
34-
docker tag $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG $ORG_NAME-$IMAGES:$MASTER_TAG
35-
echo "$ORG_NAME-$IMAGES:$MASTER_TAG"
36-
echo "Deleting Nexus docker images: $IMAGES"
37-
docker rmi -f $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG
38-
done
39-
}
40-
41-
dockerTag2() {
42-
for IMAGES in baseos ccenv; do
43-
echo "Images: $IMAGES"
44-
echo
45-
docker pull $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG
46-
if [ $? != 0 ]; then
47-
echo "FAILED: Docker Pull Failed on $IMAGES"
48-
exit 1
49-
fi
50-
docker tag $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG $ORG_NAME-$IMAGES
51-
docker tag $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG $ORG_NAME-$IMAGES:$VERSION
52-
echo "$ORG_NAME-$IMAGES:$VERSION"
53-
echo "Deleting Nexus docker images: $IMAGES"
54-
docker rmi -f $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG
33+
docker tag $ARTIFACTORY_URL/fabric-$IMAGES:$STABLE_TAG $ORG_NAME/fabric-$IMAGES
34+
docker tag $ARTIFACTORY_URL/fabric-$IMAGES:$STABLE_TAG $ORG_NAME/fabric-$IMAGES:$MASTER_TAG
35+
echo "$ORG_NAME/fabric-$IMAGES:$MASTER_TAG"
36+
echo "Deleting Artifcatory docker images: $IMAGES"
37+
docker rmi -f $ARTIFACTORY_URL/fabric-$IMAGES:$STABLE_TAG
5538
done
5639
}
5740

5841
dockerTag
59-
dockerTag2
6042

6143
echo
62-
docker images | grep "hyperledger*"
63-
echo
44+
docker images | grep "hyperledger"
45+
echo

0 commit comments

Comments
 (0)