Skip to content

Commit

Permalink
[FAB-16711] Push JSDoc to the ghpages repo
Browse files Browse the repository at this point in the history
Same approach as the previous Jenkins scripts.

Signed-off-by: Matthew B White <whitemat@uk.ibm.com>
Change-Id: Ifcc770e84888718c7cd14ebb3ed52fcc96568795
  • Loading branch information
mbwhite committed Nov 11, 2019
1 parent 9683443 commit d35c86b
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,56 @@ stages:
npm install --registry http://localhost:4873 fabric-shim fabric-shim-crypto fabric-shim-api fabric-contract-api --save
npm audit
# Publish the snapshot images etc.
# Original source of these is https://github.com/hyperledger/ci-management/blob/master/jjb/fabric-chaincode-java/shell/include-raw-publish-docker-jar.sh
- job: snapshot_publish
condition: and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
dependsOn: main
steps:
- task: DownloadPipelineArtifact@2
inputs:
artifact: nodeenv-docker-image
path: $(Build.SourcesDirectory)/build
- script: |
docker image load --input build/fabric-nodeenv.tar.gz # gets the build image of nodeenv
docker images
# Publish docker images to nexus repository
docker login ${DOCKER_REGISTRY_URL} --username=${DOCKER_REGISTRY_USERNAME} --password=${DOCKER_REGISTRY_PASSWORD}
echo "Logged in to docker registry"
# tag javaenv image to $PUSH_VERSION
docker tag hyperledger/fabric-javaenv ${DOCKER_REGISTRY_URL}/fabric-javaenv:amd64-${MAPPED_VERSION}
# push javaenv to nexus repository
docker push ${DOCKER_REGISTRY_URL}/fabric-javaenv:amd64-${MAPPED_VERSION}
env:
DOCKER_REGISTRY_USERNAME: vsts
DOCKER_REGISTRY_PASSWORD: $(GITHUB_PAT)
DOCKER_REGISTRY_URL: docker.pkg.github.com/hyperledger/fabric-chaincode-java
MAPPED_VERSION: $(PUSH_VERSION)
- script: |
node common/scripts/install-run-rush.js install
cd ${BUILD_SOURCEBRANCH}/docs/apidocs
CHAINCODE_NODE_COMMIT=$(git rev-parse --short HEAD)
echo "---------> CHAINCODE_NODE_COMMIT:" $CHAINCODE_NODE_COMMIT
TARGET_REPO=$CHAINCODE_NODE_USERNAME.github.io.git
git config --global user.email "fabric.shim@gmail.com"
git config --global user.name "fabric-shim"
git clone https://github.com/$CHAINCODE_NODE_USERNAME/$TARGET_REPO
# build docs
DOCS_ROOT=$CHAINCODE_NODE_USERNAME.github.io gulp -f docs.js docs
cd $CHAINCODE_NODE_USERNAME.github.io
git add .
git commit -m "CHAINCODE_NODE commit - $CHAINCODE_NODE_COMMIT"
git config remote.gh-pages.url https://$CHAINCODE_NODE_USERNAME:$CHAINCODE_NODE_PASSWORD@github.com/$CHAINCODE_NODE_USERNAME/$TARGET_REPO
# Push API docs to Target repository
git push gh-pages master
env:
CHAINCODE_NODE_USERNAME: fabric-shim
# Publish tag for the Merge build of a regular PRi.e. w
- stage: Publish_tag
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
Expand Down

0 comments on commit d35c86b

Please sign in to comment.