Skip to content

Commit

Permalink
Pipeline improvements (hyperledger-archives#25)
Browse files Browse the repository at this point in the history
* initial commit to get help debugging

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* Fixed to use detached

Signed-off-by: Michael Lodder <redmike7@gmail.com>

* PoC of pack and unpack with JWEs working

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added additional pack and unpack tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* updated tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* tests running with command layer added

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed types in APIs

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* finished unpack api

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* removed microledger work from branch

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* "removed forward functionality for this PR"

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed compilation warnings

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* remove route table functionality - moving to separate PR

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* aligning code current HIPE descriptions

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkpoint commit not compiling

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit - compiles but needs testing

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin compiling but test fail

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit cargo test not building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* rustfmt code; fixed first test; needs further updates to unpack return data

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* changed dependencies to fix warnings

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactor additional texts

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fix rebase mistakes - all tests passing

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added vscode to gitignore

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added python wrapper

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactors to align HIPE in progress

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactors to align HIPE in progress

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* intermediate checkin commit

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit - not building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed cargo files - not building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactored API layer

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit refactor in progress and not building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit - building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed tests - all passing

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* HIPE alignment refactor in progress

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit command layer work

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin command layer WIP

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added detached with aad functons

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactored encrypt_plaintext and decrypt_ciphertext to use detached functionality now

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* needs c headers and tests - but compiles code upto API layer

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* build properly - pack_message test throws segfault

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed seg fault issue first test passing

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added additional tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added high level tests for pack_message

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added additional tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* initial commit to get help debugging

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* Fixed to use detached

Signed-off-by: Michael Lodder <redmike7@gmail.com>

* PoC of pack and unpack with JWEs working

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added additional pack and unpack tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* updated tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* tests running with command layer added

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed types in APIs

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* finished unpack api

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* "removed forward functionality for this PR"

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed compilation warnings

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* remove route table functionality - moving to separate PR

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* aligning code current HIPE descriptions

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkpoint commit not compiling

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit - compiles but needs testing

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin compiling but test fail

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit cargo test not building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* rustfmt code; fixed first test; needs further updates to unpack return data

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* changed dependencies to fix warnings

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactor additional texts

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fix rebase mistakes - all tests passing

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added vscode to gitignore

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added python wrapper

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactors to align HIPE in progress

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactors to align HIPE in progress

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* intermediate checkin commit

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit - not building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed cargo files - not building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactored API layer

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit refactor in progress and not building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit - building

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed tests - all passing

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* HIPE alignment refactor in progress

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin commit command layer work

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* checkin command layer WIP

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added detached with aad functons

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* refactored encrypt_plaintext and decrypt_ciphertext to use detached functionality now

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* needs c headers and tests - but compiles code upto API layer

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* build properly - pack_message test throws segfault

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed seg fault issue first test passing

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added additional tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added high level tests for pack_message

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added additional tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added python pack message api

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added python wrapper tests (WIP)

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* start sdk architecture overview doc

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* changed from message pack encoding to base64 encoding

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* updated cargo.lock

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* Sync rebase and origin history

Signed-off-by: Sergey Minaev <sergey.minaev@dsr-corporation.com>

* refactored encoding to support both message_pack and base64

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added deprecate message to API

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* non-building checkin commit need to fix zeroize trait for chacha key

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed changes that were started for zeroize - key_mem happens in sodiumoxide

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* change nonce to iv for pack/unpack

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* changed to reflect ietf implementation

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added basicmessage message family format to tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fix to use null opt_c_str macro

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fix base64 changes

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fixed encode and decode tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* jovfer code review comment updates

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* removed sdk architecture docs - they're available on a separate branch PR

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* push python wrapper updates

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* fix header to use u32 instead of u64

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* remove python wrapper - move to separate PR

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* remove "C" from API layer

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* update cargo.lock

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* added recipient_key value to unpack return val

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* updated comments to show proper format

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* Slightly reorganize pack command layer.

Signed-off-by: Sergey Minaev <sergey.minaev@dsr-corporation.com>

* Minor cleanup.

Signed-off-by: Sergey Minaev <sergey.minaev@dsr-corporation.com>

* Fix merge issues.

Signed-off-by: Sergey Minaev <sergey.minaev@dsr-corporation.com>

* Cleanup route.rs.

Signed-off-by: Sergey Minaev <sergey.minaev@dsr-corporation.com>

* Fix integration tests for pack/unpack

Signed-off-by: Sergey Minaev <sergey.minaev@dsr-corporation.com>

* Clean-up API description

Signed-off-by: Sergey Minaev <sergey.minaev@dsr-corporation.com>

* Move pack/unpack into crypto module for python wrapper.

Signed-off-by: Sergey Minaev <sergey.minaev@dsr-company.com>

* Add missed experimental for new API.

Signed-off-by: Sergey Minaev <sergey.minaev@dsr-corporation.com>

* filter payment addresses based on configured payment method

Signed-off-by: Douglas Wightman <douglas.wightman@evernym.com>

* fix indentation

Signed-off-by: Douglas Wightman <douglas.wightman@evernym.com>

* IS-1160 following the pattern of authCrypt

Signed-off-by: matt raffel <matt.raffel@evernym.com>

* IS-1160 removed commented out line

Signed-off-by: matt raffel <matt.raffel@evernym.com>

* updated readme

Signed-off-by: matt raffel <matt.raffel@evernym.com>

* add log statement when address isn't compatible

Signed-off-by: Douglas Wightman <douglas.wightman@evernym.com>

* finishes tests

Signed-off-by: matt raffel <matt.raffel@evernym.com>

* added more tests

Signed-off-by: matt raffel <matt.raffel@evernym.com>

* added a few more tests, renamed misnamed tests

Signed-off-by: matt raffel <matt.raffel@evernym.com>

* fixes agency push notification for a cred offer

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* update python wrapper

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* Add pack and unpack message wrappers. Unit tests.

Signed-off-by: Tomislav Markovski <tmarkovski@gmail.com>

* Updated NodeJS wrapper to support Pack/Unpack functions

Signed-off-by: artem.ivanov <artem.ivanov@dsr-company.com>

* added additional tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* Updated objective-c wrapper to support Pack/Unpack functions

Signed-off-by: artem.ivanov <artem.ivanov@dsr-company.com>

* added additional pack and unpack tests

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* making changes based on feedback from comments

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* more updates based on comments

Signed-off-by: Kyle Den Hartog <kdenhar@gmail.com>

* Code refactoring and fixed some mistakes related to Pack/Unpack function in Java.

Signed-off-by: artem.ivanov <artem.ivanov@dsr-company.com>

* Little update of documentation

Signed-off-by: artem.ivanov <artem.ivanov@dsr-company.com>

* Python wrapper fixes. Added key validation to pack function

Signed-off-by: artem.ivanov <artem.ivanov@dsr-company.com>

* Changed type of returning value for python unpack_message function

Signed-off-by: artem.ivanov <artem.ivanov@dsr-company.com>

* defines indy version in Jenkins file and removes from other places,
and add set_default_logger functionality to ios and android wrappers

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* changes indyTag var name to tag

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* adds def to tag var

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* quieted android dockerfile output and took out progress fn from iosBuild.sh

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* add uid to buildAndroidDocker

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* silent android sdk install

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* next try to silence output

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* fixes indy tags in Jenkins file

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* fixed libindy version in androidBuild.sh

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* fixes libnullpay wget

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* separates libindy build from libindy retrieval in mac build scripts

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* ios uses insecure flag to retrieve libsovtoken

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* mac.03...retrieve removes unused vars

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* changes permissions for mac.03.01.retrieve...

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* reverted back to mac.03.libindy.build.sh && removed retrieve libindy.sh

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* fixex call to mac.05

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* enforces environment vars to be set for shared.functions.sh to be called

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* sets var when checking for env var inside of shared.functions.sh

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>

* pass default rust version to mac.01

Signed-off-by: Ryan Marsh <ryan.marsh44@gmail.com>
  • Loading branch information
rytmarsh authored Jan 30, 2019
1 parent b54dade commit 11204ef
Show file tree
Hide file tree
Showing 16 changed files with 113 additions and 96 deletions.
62 changes: 35 additions & 27 deletions vcx/ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ static String libsovtokenVersion() {
return "0.9.6~-.1.126"
}

static String androidSovtokenArtifact() {
return "libsovtoken_0.9.6-201811211720-4901e95_all.zip"
}

static String iosSovtokenArtifact() {
return "libsovtoken_0.9.6-201811211710-4901e95_all.zip"
}

static String libindyDockerfile() {
return 'vcx/ci/libindy.dockerfile'
}
Expand All @@ -72,21 +80,20 @@ static String indyBranch() {
}


def buildLibindy() {
indyTag=indyTag()
if (indyTag != "") {
indyTag = "~" + indyTag
}

def LIBINDY_VER = libindyVersion() + indyTag
def LIBNULL_VER = libnullVersion() + indyTag
def LIBSOVTOKEN_VER = libsovtokenVersion()
docker.build("libindy", "--build-arg LIBINDY_VER=${LIBINDY_VER} \
--build-arg LIBNULL_VER=${LIBNULL_VER} \
--build-arg LIBSOVTOKEN_VER=${LIBSOVTOKEN_VER} \
def buildLibindyDocker() {
def tag=indyTag()
if (tag != "") { tag = "~" + tag }
docker.build("libindy", "--build-arg LIBINDY_VER=${libindyVersion()}${tag} \
--build-arg LIBNULL_VER=${libnullVersion()}${tag} \
--build-arg LIBSOVTOKEN_VER=${libsovtokenVersion()} \
-f ${libindyDockerfile()} .")
}

def buildAndroidDocker() {
def uid= sh(returnStdout: true, script: 'id -u').trim()
android = docker.build("android", "--build-arg uid=${uid} --build-arg RUST_VER=${rustVersion()} -f vcx/wrappers/java/ci/android.dockerfile .")
}


def mainUbuntu() {
node('ubuntu') {
Expand Down Expand Up @@ -117,11 +124,10 @@ def mainUbuntu() {
stage('Build Libindy Image') {

// ******** Build the libindy base image (pulls down dependent debians from sovrin repo, and installs a majority of the dependencies)
buildLibindy()
buildLibindyDocker()
}
stage('Build Libvcx Image, Tests Rust Code') {
RUST_VERSION = rustVersion()
libvcx = docker.build("libvcx", "--build-arg uid=${uid} --build-arg RUST_VER=${RUST_VERSION} -f ${libvcxDockerfile} .")
libvcx = docker.build("libvcx", "--build-arg uid=${uid} --build-arg RUST_VER=${rustVersion()} -f ${libvcxDockerfile} .")
libvcx.inside() {
sh "vcx/ci/scripts/package.sh ${rustTestFlag}"
}
Expand Down Expand Up @@ -228,13 +234,11 @@ def android() {
try {
checkout scm

def uid= sh(returnStdout: true, script: 'id -u').trim()
stage('Build Libindy Image') {
// ******** Build the libindy base image (pulls down dependent debians from sovrin repo, and installs a majority of the dependencies)
buildLibindy()
buildLibindyDocker()
}
def RUST_VERSION = rustVersion()
android = docker.build("android", "--build-arg uid=${uid} --build-arg RUST_VER=${RUST_VERSION} -f vcx/wrappers/java/ci/android.dockerfile .")
buildAndroidDocker()
stage('Android Packaging') {
//Package .so files into .aar
packageAndroid(android)
Expand Down Expand Up @@ -262,15 +266,16 @@ def ios() {

node('macos-vcx') {
checkout scm
sh "ls -r vcx/ci/*"
sh "ls vcx/libvcx/build_scripts/ios/mac"
stage('iOS Build') {
try {
SCRIPTS_PATH="vcx/libvcx/build_scripts/ios/mac"
WORK_DIR = "/Users/jenkins"

// Build ios architectures
sh "source vcx/ci/scripts/iosBuild.sh"
def tag=indyTag()
if (tag != "") { tag = "-" + tag }

sh "source vcx/ci/scripts/iosBuild.sh ${indyBranch()} ${libindyVersion()}${tag} ${iosSovtokenArtifact()} ${rustVersion()}"

// Publish to Kraken
if (env.BRANCH_NAME == "master") {
Expand Down Expand Up @@ -310,18 +315,21 @@ def buildAndroid(arch) {
try {
checkout scm

def uid= sh(returnStdout: true, script: 'id -u').trim()
stage('Build Libindy Image') {
// ******** Build the libindy base image (pulls down dependent debians from sovrin repo, and installs a majority of the dependencies)
buildLibindy()
buildLibindyDocker()
}
stage('Build and Publish Android') {
android = docker.build("android", "--build-arg uid=${uid} -f vcx/wrappers/java/ci/android.dockerfile .")
buildAndroidDocker()
android.inside {
ANDROID_SCRIPT_PATH = 'vcx/ci/scripts/androidBuild.sh'

sh 'sudo ./vcx/ci/scripts/installCert.sh'
sh "LIBINDY_BRANCH=${indyBranch()} LIBINDY_VERSION=${libindyVersion()} LIBINDY_TAG=${indyTag()} ./${ANDROID_SCRIPT_PATH} ${arch}"

def tag=indyTag()
if (tag != "") { tag = "-" + tag }

sh "./${ANDROID_SCRIPT_PATH} ${arch} ${indyBranch()} ${libindyVersion()}${tag} ${androidSovtokenArtifact()}"

}

Expand All @@ -339,7 +347,7 @@ def buildAndroid(arch) {
sh 'docker system df'
step([$class: 'WsCleanup'])
}
}
}
}

def packageAndroid(android) {
Expand Down
10 changes: 5 additions & 5 deletions vcx/ci/libindy.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ ENV RUST_ARCHIVE=rust-${RUST_VER}-x86_64-unknown-linux-gnu.tar.gz
ENV RUST_DOWNLOAD_URL=https://static.rust-lang.org/dist/$RUST_ARCHIVE

# Install Gradle
RUN wget https://services.gradle.org/distributions/gradle-3.4.1-bin.zip
RUN wget -q https://services.gradle.org/distributions/gradle-3.4.1-bin.zip
RUN mkdir /opt/gradle
RUN unzip -d /opt/gradle gradle-3.4.1-bin.zip
RUN unzip -q -d /opt/gradle gradle-3.4.1-bin.zip

# fpm for deb packaging of npm
RUN gem install fpm
Expand All @@ -66,10 +66,10 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88 && \

# these are default values if they are not passed into the environment with
# the --build-arg flag from 'docker build' command.
ARG LIBINDY_VER="1.7.0"
ARG LIBNULL_VER="1.7.0"
ARG LIBINDY_VER
ARG LIBNULL_VER
ARG LIBSOVTOKEN_VER

ARG LIBSOVTOKEN_VER="0.9.6~-1.126"
RUN apt-get update && apt-get install -y \
libindy=${LIBINDY_VER} \
libnullpay=${LIBNULL_VER}
27 changes: 9 additions & 18 deletions vcx/ci/scripts/androidBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ setup() {
echo "Working Directory: ${PWD}"
set -e
export ARCH=$1
export LIBINDY_BRANCH=$2
export LIBINDY_VERSION=$3
export LIBSOVTOKEN_ZIP=$4

export PATH=$PATH:/opt/gradle/gradle-3.4.1/bin
export PATH=${PATH}:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/build-tools/25.0.2/
Expand Down Expand Up @@ -96,12 +99,7 @@ get_libindy() {
SIMPLE_LIBINDY_VERSION=$(echo ${LIBINDY_VERSION} | cut -f1 -d'-')
if [ ! -d "libindy_${ARCH}" ]; then

if [ "$LIBINDY_BRANCH" = "stable" ]; then
wget https://repo.sovrin.org/android/libindy/${LIBINDY_BRANCH}/${LIBINDY_VERSION}/libindy_android_${ARCH}_${LIBINDY_VERSION}.zip
else
wget https://repo.sovrin.org/android/libindy/${LIBINDY_BRANCH}/1.7.0-934/libindy_android_${ARCH}_${SIMPLE_LIBINDY_VERSION}.zip
fi

wget -q https://repo.sovrin.org/android/libindy/${LIBINDY_BRANCH}/${LIBINDY_VERSION}/libindy_android_${ARCH}_${SIMPLE_LIBINDY_VERSION}.zip
unzip libindy_android_${ARCH}_${SIMPLE_LIBINDY_VERSION}.zip

fi
Expand All @@ -112,12 +110,10 @@ get_libindy() {

get_libsovtoken() {
set -xv
# Todo: This artifact was manually uploaded to this repo. Eventually, the file format will change. That is why it is hardcoded
if [ -z ${LIBSOVTOKEN_DIR} ]; then
LIBSOVTOKEN_ZIP=libsovtoken_0.9.6-201811211720-4901e95_all.zip
if [ ! -d "libsovtoken" ]; then
echo "retrieving libsovtoken prebuilt library"
wget ${SOVRIN_REPO}/${LIBSOVTOKEN_ZIP}
wget -q ${SOVRIN_REPO}/${LIBSOVTOKEN_ZIP}
unzip ${LIBSOVTOKEN_ZIP}
fi
export LIBSOVTOKEN_DIR="${PWD}/libsovtoken/${TRIPLET}"
Expand All @@ -133,12 +129,7 @@ get_libnullpay() {
SIMPLE_LIBINDY_VERSION=$(echo ${LIBINDY_VERSION} | cut -f1 -d'-')
if [ ! -d "libnullpay_${ARCH}" ]; then

if [ "$LIBINDY_BRANCH" = "stable" ]; then
wget https://repo.sovrin.org/android/libnullpay/${LIBINDY_BRANCH}/${LIBINDY_VERSION}/libnullpay_android_${ARCH}_${LIBINDY_VERSION}.zip
else
wget https://repo.sovrin.org/android/libnullpay/${LIBINDY_BRANCH}/1.7.0-934/libnullpay_android_${ARCH}_${SIMPLE_LIBINDY_VERSION}.zip
fi

wget -q https://repo.sovrin.org/android/libnullpay/${LIBINDY_BRANCH}/${LIBINDY_VERSION}/libnullpay_android_${ARCH}_${SIMPLE_LIBINDY_VERSION}.zip
unzip libnullpay_android_${ARCH}_${SIMPLE_LIBINDY_VERSION}.zip

fi
Expand Down Expand Up @@ -177,8 +168,8 @@ build_vcx() {

}

setup $1
get_libindy $1
setup $1 $2 $3 $4
get_libindy
get_libsovtoken
get_libnullpay
build_vcx $1
build_vcx
35 changes: 8 additions & 27 deletions vcx/ci/scripts/iosBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,20 @@ export WRAPPER_BASE="vcx/wrappers/ios/vcx"
export WRAPPER_LIBS="vcx/wrappers/ios/vcx/lib"
IOS_TARGETS="aarch64-apple-ios,armv7-apple-ios,i386-apple-ios,x86_64-apple-ios"
IOS_ARCHS="arm64,armv7,i386,x86_64"
export INDY_BRANCH=$1
export INDY_VERSION=$2
export SOVTOKEN_ZIP=$3
export RUST_VERSION=$4
#IOS_TARGETS="x86_64-apple-ios,i386-apple-ios"
#IOS_ARCHS="x86_64,i386"


function printStartProgress {
echo "=================="
echo "Starting"
echo $1
echo "=================="
echo
}

function printEndProgress {
echo
echo "+++++++++++++++++"
echo "Finished"
echo $1
echo "+++++++++++++++++"
}

function progress {
printStartProgress $1
$1
printEndProgress $1
}

cd ${SCRIPTS_PATH}

progress ./mac.01.libindy.setup.sh
progress ./mac.02.libindy.env.sh
progress ./mac.03.libindy.build.sh
./mac.01.libindy.setup.sh ${RUST_VERSION}
./mac.02.libindy.env.sh
./mac.03.libindy.build.sh
#./mac.04.libvcx.setup.sh
progress 'source ./mac.05.libvcx.env.sh'
./mac.05.libvcx.env.sh
cp -rf ~/OpenSSL-for-iPhone ${BASE_DIR}/.macosbuild
cp -rf ~/libzmq-ios ${BASE_DIR}/.macosbuild
cp -rf ~/combine-libs ${BASE_DIR}/.macosbuild
Expand Down
1 change: 0 additions & 1 deletion vcx/libvcx/build_scripts/android/vcx/build.nondocker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ fi
# LIBSOVTOKEN_DIR="${LIBSOVTOKEN_DIR}/lib"
#fi

echo ${LIBNULLPAY_DIR}
if [ -z "${LIBNULLPAY_DIR}" ] ; then
LIBNULLPAY_DIR="libnullpay"
if [ -d "${LIBNULLPAY_DIR}" ] ; then
Expand Down
3 changes: 2 additions & 1 deletion vcx/libvcx/build_scripts/ios/mac/mac.01.libindy.setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#To get into the if statement below execute the following command...
# mv /Users/norm/.cargo/bin/rustup /Users/norm/.cargo/bin/rustup.bak
RUSTUP_VERSION=`rustup --version`
DEFAULT_RUST_VERSION=$1
if [ "$?" != "0" ]; then
if [ -f $HOME/.cargo/bin/rustup ]; then
echo "You need to add $HOME/.cargo/bin to your PATH environment variable or simply restart your terminal"
Expand Down Expand Up @@ -43,7 +44,7 @@ fi

if [[ $RUSTUP_VERSION =~ ^'rustup ' ]]; then
rustup update
rustup default 1.31.1
rustup default ${DEFAULT_RUST_VERSION}
rustup component add rls-preview rust-analysis rust-src
echo "Using rustc version $(rustc --version)"
# rustup target remove aarch64-linux-android
Expand Down
6 changes: 0 additions & 6 deletions vcx/libvcx/build_scripts/ios/mac/mac.03.libindy.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,7 @@ if [ "$#" -gt 0 ]; then
# cargo update
fi

# To build for macos
#cargo build
# To build for iOS
#echo "cargo lipo --release --verbose --targets=${IOS_TARGETS}"
# cargo lipo --release --verbose --targets="${IOS_TARGETS}"
cargo lipo --release --targets="${IOS_TARGETS}"
#cargo lipo
mkdir -p ${BUILD_CACHE}/libindy/${LIBINDY_VERSION}
cp $WORK_DIR/vcx-indy-sdk/libindy/target/universal/release/libindy.a ${BUILD_CACHE}/libindy/${LIBINDY_VERSION}/libindy.a
for hfile in $(find ${WORK_DIR}/vcx-indy-sdk/libindy -name "*.h")
Expand Down
2 changes: 1 addition & 1 deletion vcx/libvcx/build_scripts/ios/mac/mac.06.libvcx.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fi

git log -1 > $WORK_DIR/evernym.vcx-sdk.git.commit.log

export OPENSSL_LIB_DIR_DARWIN=$OPENSSL_LIB_DIR
export OPENSSL_LIB_DIR_DARWIN=${OPENSSL_LIB_DIR}

bkpIFS="$IFS"
IFS=',()][' read -r -a targets <<<"${IOS_TARGETS}"
Expand Down
10 changes: 7 additions & 3 deletions vcx/libvcx/build_scripts/ios/mac/shared.functions.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/sh

export LIBSOVTOKEN_IOS_BUILD_URL="https://repo.sovrin.org/ios/libsovtoken/stable/libsovtoken_0.9.6-201811211710-4901e95_all.zip"
export LIBINDY_IOS_BUILD_URL="https://repo.sovrin.org/ios/libindy/master/libindy-core/1.7.0-955/libindy.tar.gz"
export LIBNULLPAY_IOS_BUILD_URL="https://repo.sovrin.org/ios/libnullpay/master/libnullpay-core/1.7.0-955/libnullpay.tar.gz"
indyBranch=${INDY_BRANCH:?"Indy branch needs to be set i.e (stbale or master)"}
indyVersion=${INDY_VERSION:?"Indy version needs to be set"}
sovZip=${SOVTOKEN_ZIP:?"Sovtoken zip file needs to be set"}

export LIBSOVTOKEN_IOS_BUILD_URL="https://repo.sovrin.org/ios/libsovtoken/stable/${sovZip}"
export LIBINDY_IOS_BUILD_URL="https://repo.sovrin.org/ios/libindy/${indyBranch}/libindy-core/${indyVersion}/libindy.tar.gz"
export LIBNULLPAY_IOS_BUILD_URL="https://repo.sovrin.org/ios/libnullpay/${indyBranch}/libnullpay-core/${indyVersion}/libnullpay.tar.gz"

export LIBSOVTOKEN_FILE=$(basename ${LIBSOVTOKEN_IOS_BUILD_URL})
export LIBSOVTOKEN_VERSION=$(echo ${LIBSOVTOKEN_FILE} | cut -d'_' -f 2)
Expand Down
2 changes: 2 additions & 0 deletions vcx/wrappers/ios/vcx/ConnectMeVcx.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ extern void VcxWrapperCommonNumberStringCallback(vcx_command_handle_t xcommand_h

- (int)initNullPay;

- (int)setDefaultLogger:(NSString *)logLevel;

- (void)initWithConfig:(NSString *)config
completion:(void (^)(NSError *error))completion;

Expand Down
6 changes: 6 additions & 0 deletions vcx/wrappers/ios/vcx/ConnectMeVcx.m
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ - (int)initNullPay {
return nullpay_init();
}

- (int)vcxSetDefaultLogger:(NSString *) level {

const char *log_level = [level cString];
return vcx_set_default_logger(log_level);
}

- (void)initWithConfig:(NSString *)config
completion:(void (^)(NSError *error))completion
{
Expand Down
3 changes: 3 additions & 0 deletions vcx/wrappers/ios/vcx/vcx.framework/Headers/libvcx.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ vcx_error_t vcx_messages_update_status( vcx_command_handle_t command_handle, con
*/
vcx_error_t vcx_ledger_get_fees(vcx_command_handle_t command_handle, void(*cb)(vcx_command_handle_t xhandle, vcx_error_t error, const char *fees));

/** Logging **/
vcx_error_t vcx_set_default_logger(const char* pattern);

/** For testing purposes only */
void vcx_set_next_agency_response(int);
#ifdef __cplusplus
Expand Down
12 changes: 5 additions & 7 deletions vcx/wrappers/java/ci/android.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ RUN apt-get update -y && apt-get install -y \

# Install Android SDK and NDK
RUN mkdir -m 777 -p /home/android/android-sdk-linux
RUN wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip -P /home/android/android-sdk-linux
RUN unzip /home/android/android-sdk-linux/tools_r25.2.3-linux.zip -d /home/android/android-sdk-linux
RUN ls -al /home/android/android-sdk-linux
RUN yes | .//home/android/android-sdk-linux/tools/android update sdk --no-ui
RUN yes | .//home/android/android-sdk-linux/tools/bin/sdkmanager "ndk-bundle"
RUN wget -q https://dl.google.com/android/repository/tools_r25.2.3-linux.zip -P /home/android/android-sdk-linux
RUN unzip -q /home/android/android-sdk-linux/tools_r25.2.3-linux.zip -d /home/android/android-sdk-linux
RUN yes | .//home/android/android-sdk-linux/tools/android update sdk --no-ui >/dev/null 2>&1
RUN yes | .//home/android/android-sdk-linux/tools/bin/sdkmanager "ndk-bundle" >/dev/null 2>&1

RUN echo "android ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# Todo: I thing this ARG can be removed. It is set in the Jenkins file
ARG RUST_VER=1.31.1
ARG RUST_VER
USER android
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain ${RUST_VER}
ENV PATH /home/android/.cargo/bin:$PATH
Loading

0 comments on commit 11204ef

Please sign in to comment.