Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #24 from hyperledger/master
Browse files Browse the repository at this point in the history
Merging master from hyperledger
  • Loading branch information
anastasia-tarasova authored Aug 21, 2017
2 parents e7179e1 + ffe424d commit 25d0376
Show file tree
Hide file tree
Showing 116 changed files with 1,715 additions and 1,434 deletions.
144 changes: 31 additions & 113 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ try {
notifyingSuccess()
} catch (err) {
notifyingFailure(err)
throw err
}

def testing() {
Expand All @@ -30,12 +31,10 @@ def publishing() {
}

parallel([
'liblindy-to-cargo' : { publishingLibindyToCargo() },
'libindy-rpm-files' : { publishingLibindyRpmFiles() },
'libindy-deb-files' : { publishingLibindyDebFiles() },
'libindy-win-files' : { publishingLibindyWinFiles() },
'python-wrapper-deb-files': { publishingPythonWrapperDebFiles() },
'python-wrapper-to-pipy' : { publishingPythonWrapperToPipy() }
'libindy-rpm-files' : { publishingLibindyRpmFiles() },
'libindy-deb-files' : { publishingLibindyDebFiles() },
'libindy-win-files' : { publishingLibindyWinFiles() },
'python-wrapper-to-pipy': { publishingPythonWrapperToPipy() }
])
}
}
Expand All @@ -54,15 +53,16 @@ def notifyingFailure(err) {
node('ubuntu-master') {
sendNotification.fail([slack: env.BRANCH_NAME == 'master'])
}
throw err
}

def openPool(env_name, network_name) {
def openPool(env_name, network_name, pool_ver, plenum_ver, anoncreds_ver, node_ver) {
echo "${env_name} Test: Create docker network (${network_name}) for nodes pool and test image"
sh "docker network create --subnet=10.0.0.0/8 ${network_name}"

echo "${env_name} Test: Build docker image for nodes pool"
def poolEnv = dockerHelpers.build('indy_pool', 'ci/indy-pool.dockerfile ci', '--build-arg pool_ip=10.0.0.2')
echo "${env_name} Test: Build docker image for nodes pool ver. ${pool_ver}"
echo "${env_name} Test: Building nodes pool for versions: plenum ${plenum_ver}, anoncreds ${anoncreds_ver}, node ${node_ver}"
def poolEnv = dockerHelpers.build("indy_pool_${pool_ver}", 'ci/indy-pool.dockerfile ci',
"--build-arg pool_ip=10.0.0.2 --build-arg indy_plenum_ver=${plenum_ver} --build-arg indy_anoncreds_ver=${anoncreds_ver} --build-arg indy_node_ver=${node_ver}")
echo "${env_name} Test: Run nodes pool"
return poolEnv.run("--ip=\"10.0.0.2\" --network=${network_name}")
}
Expand Down Expand Up @@ -100,11 +100,9 @@ def libindyTest(file, env_name, run_interoperability_tests, network_name) {
echo "${env_name} Test: Checkout csm"
checkout scm

sh "cp -r ci libindy"
poolInst = openPool(env_name, network_name, '105', '1.0.95', '1.0.25', '1.0.105')

dir('libindy') {
poolInst = openPool(env_name, network_name)

echo "${env_name} Test: Build docker image"
def testEnv = dockerHelpers.build('libindy', file)

Expand Down Expand Up @@ -152,7 +150,7 @@ def libindyWindowsTesting() {

dir('libindy') {
echo "Windows Test: Download prebuilt dependencies"
bat 'wget -O prebuilt.zip "https://repo.evernym.com/deb/windows-bins/indy-sdk-deps/indy-sdk-deps.zip"'
bat 'wget -O prebuilt.zip "https://repo.evernym.com/libindy/windows/deps/indy-sdk-deps.zip"'
bat 'unzip prebuilt.zip -d prebuilt'

echo "Windows Test: Build"
Expand Down Expand Up @@ -220,11 +218,9 @@ def javaWrapperUbuntuTesting() {
echo "${env_name} Test: Checkout csm"
checkout scm

sh "cp -r ci wrappers/java"
poolInst = openPool(env_name, network_name, '84', '1.0.82', '1.0.25', '1.0.84')

dir('wrappers/java') {
poolInst = openPool("Ubuntu Java", network_name)

echo "${env_name} Test: Build docker image"
def testEnv = dockerHelpers.build('java-indy-sdk', 'ci/java.dockerfile ci')

Expand Down Expand Up @@ -252,12 +248,9 @@ def pythonWrapperUbuntuTesting() {
echo "${env_name} Test: Checkout csm"
checkout scm

sh "cp -r ci wrappers/python"
poolInst = openPool(env_name, network_name, '84', '1.0.82', '1.0.25', '1.0.84')

dir('wrappers/python') {

poolInst = openPool(env_name, network_name)

echo "${env_name} Test: Build docker image"
def testEnv = dockerHelpers.build('python-indy-sdk', 'ci/python.dockerfile ci')

Expand All @@ -278,52 +271,13 @@ def pythonWrapperUbuntuTesting() {
}
}

def publishingLibindyToCargo() {
node('ubuntu') {
stage('Publish Libindy to Cargo') {
try {
echo 'Publish to Cargo: Checkout csm'
checkout scm

sh "cp -r ci libindy"

dir('libindy') {
echo 'Publish to Cargo: Build docker image'
def testEnv = dockerHelpers.build('indy-sdk')

testEnv.inside {
echo 'Update version'

sh 'chmod -R 777 ci'
sh "ci/libindy-update-package-version.sh $env.BUILD_NUMBER"

withCredentials([string(credentialsId: 'cargoSecretKey', variable: 'SECRET')]) {
sh 'cargo login $SECRET'
}

sh 'cargo package --allow-dirty'

sh 'cargo publish --allow-dirty'
}
}
}
finally {
echo 'Publish to cargo: Cleanup'
step([$class: 'WsCleanup'])
}
}
}
}

def publishingLibindyRpmFiles() {
node('ubuntu') {
stage('Publish Libindy RPM Files') {
try {
echo 'Publish Rpm files: Checkout csm'
checkout scm

sh "cp -r ci libindy"

commit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim()

dir('libindy') {
Expand Down Expand Up @@ -355,9 +309,6 @@ def publishingLibindyDebFiles() {
echo 'Publish Deb files: Checkout csm'
checkout scm

sh "cp -r ci libindy"
sh "cp -r debian libindy"

commit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim()

dir('libindy') {
Expand Down Expand Up @@ -393,7 +344,7 @@ def publishingLibindyWinFiles() {

dir('libindy') {
echo "Publish Windows files: Download prebuilt dependencies"
bat 'wget -O prebuilt.zip "https://repo.evernym.com/deb/windows-bins/indy-sdk-deps/indy-sdk-deps.zip"'
bat 'wget -O prebuilt.zip "https://repo.evernym.com/libindy/windows/deps/indy-sdk-deps.zip"'
bat 'unzip prebuilt.zip -d prebuilt'

echo "Publish Windows files: Build"
Expand All @@ -408,47 +359,14 @@ def publishingLibindyWinFiles() {
]) {
bat "cargo build --release"
}
}

withCredentials([file(credentialsId: 'EvernymRepoSSHKey', variable: 'evernym_repo_key')]) {
sh "./ci/libindy-win-zip-and-upload.sh $commit '${evernym_repo_key}' $env.BUILD_NUMBER"
}
}
finally {
echo 'Publish Windows files: Cleanup'
step([$class: 'WsCleanup'])
}
}
}
}

def publishingPythonWrapperDebFiles() {
node('ubuntu') {
stage('Publish Python Wrapper DEB Files') {
try {
echo 'Publish Python Wrapper Deb files: Checkout csm'
checkout scm

sh "cp -r ci wrappers/python"

dir('wrappers/python') {

echo 'Publish Python Wrapper Deb: Build docker image'
def testEnv = dockerHelpers.build('python-indy-sdk', 'ci/python.dockerfile ci')

testEnv.inside('-u 0:0') {
sh 'chmod -R 777 ci'

sh "ci/python-wrapper-update-package-version.sh $env.BUILD_NUMBER"

withCredentials([file(credentialsId: 'EvernymRepoSSHKey', variable: 'evernym_repo_key')]) {
sh "./ci/python-wrapper-deb-build-and-upload.sh $evernym_repo_key"
}
withCredentials([file(credentialsId: 'EvernymRepoSSHKey', variable: 'evernym_repo_key')]) {
sh "./ci/libindy-win-zip-and-upload.sh $commit '${evernym_repo_key}' $env.BUILD_NUMBER"
}
}
}
finally {
echo 'Publish Python Wrapper Deb: Cleanup'
echo 'Publish Windows files: Cleanup'
step([$class: 'WsCleanup'])
}
}
Expand All @@ -462,23 +380,23 @@ def publishingPythonWrapperToPipy() {
echo 'Publish Deb files: Checkout csm'
checkout scm

echo 'Publish Deb: Build docker image'
def testEnv = dockerHelpers.build('python-indy-sdk', 'ci/python.dockerfile ci')
dir('wrappers/python') {
echo 'Publish Deb: Build docker image'
def testEnv = dockerHelpers.build('python-indy-sdk', 'ci/python.dockerfile ci')

testEnv.inside('-u 0:0') {
testEnv.inside('-u 0:0') {

withCredentials([file(credentialsId: 'pypi_credentials', variable: 'credentialsFile')]) {
sh 'cp $credentialsFile ./wrappers/python/'
sh "cp -r ci wrappers/python"
withCredentials([file(credentialsId: 'pypi_credentials', variable: 'credentialsFile')]) {
sh 'cp $credentialsFile ./'

sh "chmod -R 777 ci"
sh "ci/python-wrapper-update-package-version.sh $env.BUILD_NUMBER"
sh "chmod -R 777 ci"
sh "ci/python-wrapper-update-package-version.sh $env.BUILD_NUMBER"

sh '''
cd wrappers/python
python3.6 setup.py sdist
python3.6 -m twine upload dist/* --config-file .pypirc
'''
sh '''
python3.6 setup.py sdist
python3.6 -m twine upload dist/* --config-file .pypirc
'''
}
}
}
}
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,18 @@ us on [Jira's Rocket.Chat](chat.hyperledger.org) at #indy-sdk to discuss.
* [Ubuntu based distro (Ubuntu 16.04)](doc/ubuntu-build.md)
* [RHEL based distro (Amazon Linux 2017.03)](doc/rhel-build.md)
* [Windows](doc/windows-build.md)
* [iOS](doc/ios-build.md)
* [MacOS](doc/mac-build.md)

## Wrappers documentation
* [.Net](wrappers/dotnet/README.md)
* [Java](wrappers/java/README.md)
* [Python](wrappers/python/README.md)
* [iOS](wrappers/ios/ios-build.md)

## Binaries
Builded binaries can be downloaded from https://repo.evernym.com/libindy:
* ubuntu/{master,stable,rc} - Ubuntu deb packages
* windows/{master,stable,rc} - Windows zip-archive with all required DLLs (include libindy itself) and headers
* windows/deps/ - Windows zip archive with dependencies (DLLs and headers) to build libindy from sources
* ios/stable/ - Pods for iOS
* rhel/{master,stable,rc} - RHEL rpms
2 changes: 1 addition & 1 deletion Specs/libindy-core/0.1.1/libindy-core.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"ios": "10.0"
},
"source": {
"http": "https://repo.evernym.com/deb/pods-ios/libindy-core/0.1.1/libindy-core-ios.tar.gz"
"http": "https://repo.evernym.com/libindy/ios/stable/libindy-core/0.1.1/libindy-core-ios.tar.gz"
},
"source_files": "*.h",
"vendored_libraries": "*.a",
Expand Down
2 changes: 1 addition & 1 deletion Specs/milagro/3.0.0/milagro.podspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"osx": "10.7"
},
"source": {
"http": "https://repo.evernym.com/deb/pods-ios/milagro/3.0.0/milagro-crypto-c-3.0.0-ios.tar.gz"
"http": "https://repo.evernym.com/libindy/ios/stable/milagro/3.0.0/milagro-crypto-c-3.0.0-ios.tar.gz"
},
"source_files": [
"src/*.{h,hpp,c,cc,cpp}",
Expand Down
10 changes: 7 additions & 3 deletions ci/indy-pool.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ RUN echo "deb https://repo.sovrin.org/deb xenial master" >> /etc/apt/sources.lis

RUN useradd -ms /bin/bash -u $uid sovrin

ARG indy_plenum_ver=1.0.95
ARG indy_anoncreds_ver=1.0.25
ARG indy_node_ver=1.0.105

RUN apt-get update -y && apt-get install -y \
indy-plenum=1.0.82 \
indy-anoncreds=1.0.25 \
indy-node=1.0.84
indy-plenum=${indy_plenum_ver} \
indy-anoncreds=${indy_anoncreds_ver} \
indy-node=${indy_node_ver}

RUN echo '[supervisord]\n\
logfile = /tmp/supervisord.log\n\
Expand Down
9 changes: 0 additions & 9 deletions ci/libindy-update-package-version.sh

This file was deleted.

44 changes: 0 additions & 44 deletions ci/python-wrapper-deb-build-and-upload.sh

This file was deleted.

5 changes: 5 additions & 0 deletions doc/libindy-agent-2-agent.puml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ RA -> RL: <b>2. indy_agent_listen
RL -> RS: Start listening
RL -> RA: Listener handle (cb)

RA -> RL: <b>3. indy_add_identity \ncan be performed multiply times for same listener and different DID
RL -> RW: Check my_did in wallet
RL -> RL: Start accepting incomming connections for the DID
RL -> RA: Add identity result (cb)

=== Establish connection ==

SA -> SL: <b>3. indy_create_and_store_my_did
Expand Down
2 changes: 1 addition & 1 deletion doc/windows-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Get/build dependencies

All prebuilt can be downloaded from
https://repo.evernym.com/deb/windows-bins/indy-sdk-deps/
https://repo.evernym.com/libindy/windows/deps/

### Binary deps

Expand Down
Loading

0 comments on commit 25d0376

Please sign in to comment.