Skip to content

Commit

Permalink
Add Azure Pipelines configuration (contributes to #69) (#100)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Stone <[email protected]>
  • Loading branch information
Simon Stone authored Mar 25, 2020
1 parent bb96707 commit 44fdab8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
# SPDX-License-Identifier: Apache-2.0
#
---
trigger:
branches:
include:
- "*"
tags:
include:
- "*"
pool:
vmImage: "ubuntu-latest"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.x"
displayName: Use Python 3.x
- script: pip install ansible ansible-lint yamllint yq
displayName: Install Python dependencies
- script: |
set -ex
wget -qO fabric-bins.tar.gz https://github.com/hyperledger/fabric/releases/download/v1.4.6/hyperledger-fabric-linux-amd64-1.4.6.tar.gz
sudo tar xvf fabric-bins.tar.gz -C /usr/local
rm fabric-bins.tar.gz
displayName: Download Fabric CLI
- script: |
set -ex
wget -qO fabric-ca-bins.tar.gz https://github.com/hyperledger/fabric-ca/releases/download/v1.4.6/hyperledger-fabric-ca-linux-amd64-1.4.6.tar.gz
sudo tar xvf fabric-ca-bins.tar.gz -C /usr/local
rm fabric-ca-bins.tar.gz
displayName: Download Fabric CA CLI
- script: |
set -ex
flake8 .
ansible-lint .
for ROLE in roles/*; do ansible-lint ${ROLE}; done
yamllint .
displayName: Lint
- script: |
set -ex
ansible-galaxy collection build
displayName: Build collection artifact
- script: |
set -ex
VERSION=$(yq -r .version galaxy.yml)
ansible-galaxy collection publish --api-key $(Ansible Galaxy API Key) ibm-blockchain_platform-${VERSION}.tar.gz
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags'))
displayName: Publish collection to Ansible Galaxy
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
---
namespace: ibm
name: blockchain_platform
version: 0.0.4
version: 0.0.5
readme: README.md
authors:
- Simon Stone
Expand Down

0 comments on commit 44fdab8

Please sign in to comment.