diff --git a/.build/publish-docker.sh b/.build/publish-caliper.sh similarity index 98% rename from .build/publish-docker.sh rename to .build/publish-caliper.sh index 4afeb39a1..4f73133e7 100755 --- a/.build/publish-docker.sh +++ b/.build/publish-caliper.sh @@ -25,4 +25,5 @@ cp ./README.md ./packages/caliper-fisco-bcos/README.md cd ./packages/caliper-publish/ npm i +./publish.js npm ./publish.js docker --publish diff --git a/.build/publish-npm.sh b/.build/publish-npm.sh deleted file mode 100755 index 467e68eed..000000000 --- a/.build/publish-npm.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# 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 -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Exit on first error -set -e - -# distribute root README file before publishing -cp ./README.md ./packages/caliper-cli/README.md -cp ./README.md ./packages/caliper-core/README.md -cp ./README.md ./packages/caliper-ethereum/README.md -cp ./README.md ./packages/caliper-fabric/README.md -cp ./README.md ./packages/caliper-fisco-bcos/README.md - -cd ./packages/caliper-publish/ -npm i -./publish.js npm diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 542e6f549..b2b887d0e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -104,26 +104,16 @@ stages: # having a blind succeeded here will not work if a preceding stage was skipped condition: and(not(failed('UnitTests')), eq(variables['Build.Reason'], 'IndividualCI')) jobs: - - job: PublishNPM - displayName: "Publish Caliper NPM packages" + - job: PublishCaliper + displayName: "Publish Caliper to NPM and DockerHub" steps: - task: NodeTool@0 inputs: versionSpec: "10.x" displayName: "Install Node.js" - - script: .build/publish-npm.sh - displayName: Publish packages + - script: .build/publish-caliper.sh + displayName: Publish Caliper env: NPM_TOKEN: "$(npm)" - - job: PublishDocker - displayName: "Publish Caliper Docker images" - steps: - - task: NodeTool@0 - inputs: - versionSpec: "10.x" - displayName: "Install Node.js" - - script: .build/publish-docker.sh - displayName: Publish packages - env: DOCKER_USER: "$(DockerHub-Username)" DOCKER_TOKEN: "$(DockerHub-Password)"