Skip to content

Commit 53613e0

Browse files
authored
Merge pull request hyperledger-indy#644 from Artemkaaas/feature/pipeline-cleaning
Deleted interoperability belongings from pipeline and docker file
2 parents 3514451 + e18ab47 commit 53613e0

File tree

3 files changed

+31
-86
lines changed

3 files changed

+31
-86
lines changed

Jenkinsfile.cd

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void getSrcVersion() {
150150
return version
151151
}
152152

153-
def linuxTesting(file, env_name, run_interoperability_tests, network_name, stashBuildResults) {
153+
def linuxTesting(file, env_name, network_name, stashBuildResults) {
154154
def poolInst
155155
try {
156156
echo "${env_name} Test: Checkout csm"
@@ -168,17 +168,11 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
168168
echo "${env_name} Test: Test"
169169

170170
try {
171-
def featuresArgs = ''
172-
if (run_interoperability_tests) {
173-
sh 'chmod -R 777 /home/indy/indy-anoncreds/'
174-
featuresArgs = '--features "interoperability_tests"'
175-
}
176-
177171
echo "${env_name} Libindy Test: Build"
178-
sh "RUST_BACKTRACE=1 cargo test --release $featuresArgs --no-run"
172+
sh "RUST_BACKTRACE=1 cargo test --release --no-run"
179173

180174
echo "${env_name} Libindy Test: Run tests"
181-
sh "RUST_BACKTRACE=1 RUST_LOG=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release $featuresArgs"
175+
sh "RUST_BACKTRACE=1 RUST_LOG=indy::,zmq=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release"
182176

183177
if (stashBuildResults) {
184178
stash includes: 'target/release/libindy.so,target/release/libindy.a', name: 'LibindyUbuntuBuildResult'
@@ -201,7 +195,7 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
201195
testEnv.inside("--ip=\"10.0.0.3\" --network=${network_name}") {
202196
echo "${env_name} Libindy Test: Test java wrapper"
203197

204-
sh "RUST_LOG=trace TEST_POOL_IP=10.0.0.2 mvn clean test"
198+
sh "RUST_LOG=indy::,zmq=trace TEST_POOL_IP=10.0.0.2 mvn clean test"
205199
}
206200
}
207201

@@ -212,7 +206,7 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
212206

213207
sh '''
214208
python3.5 -m pip install --user -e .
215-
LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_LOG=trace TEST_POOL_IP=10.0.0.2 python3.5 -m pytest
209+
LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_LOG=indy::,zmq=trace TEST_POOL_IP=10.0.0.2 python3.5 -m pytest
216210
'''
217211
}
218212
}
@@ -227,7 +221,7 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name, stash
227221
sh "LIBRARY_PATH=./ RUST_BACKTRACE=1 cargo test --release --no-run"
228222

229223
echo "${env_name} Indy Cli Test: Run tests"
230-
sh 'LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_BACKTRACE=1 RUST_LOG=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release'
224+
sh 'LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_BACKTRACE=1 RUST_LOG=indy::,zmq=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test --release'
231225

232226
if (stashBuildResults) {
233227
stash includes: 'target/release/indy-cli', name: 'IndyCliUbuntuBuildResult'
@@ -277,7 +271,7 @@ def windowsTesting() {
277271
echo "Windows Libindy Test: Run tests"
278272
withEnv([
279273
"RUST_TEST_THREADS=1",
280-
"RUST_LOG=trace",
274+
"RUST_LOG=indy::,zmq=trace",
281275
"TEST_POOL_IP=$INDY_SDK_SERVER_IP"
282276
]) {
283277
bat "cargo test --release"
@@ -305,7 +299,7 @@ def windowsTesting() {
305299
echo "Windows Indy Cli Test: Run tests"
306300
withEnv([
307301
"RUST_TEST_THREADS=1",
308-
"RUST_LOG=trace",
302+
"RUST_LOG=indy::,zmq=trace",
309303
"TEST_POOL_IP=$INDY_SDK_SERVER_IP"
310304
]) {
311305
bat "cargo test --release"
@@ -337,15 +331,15 @@ def windowsTesting() {
337331
def ubuntuTesting() {
338332
node('ubuntu') {
339333
stage('Ubuntu Test') {
340-
linuxTesting("ci/ubuntu.dockerfile ci", "Ubuntu", false, "pool_network", true)
334+
linuxTesting("ci/ubuntu.dockerfile ci", "Ubuntu", "pool_network", true)
341335
}
342336
}
343337
}
344338

345339
def rhelTesting() {
346340
node('ubuntu') {
347341
stage('RedHat Test') {
348-
linuxTesting("ci/amazon.dockerfile ci", "RedHat", false, "pool_network", false)
342+
linuxTesting("ci/amazon.dockerfile ci", "RedHat", "pool_network", false)
349343
}
350344
}
351345
}

Jenkinsfile.ci

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def windowsTesting() {
5050
echo "Windows Libindy Test: Run tests"
5151
withEnv([
5252
"RUST_TEST_THREADS=1",
53-
"RUST_LOG=trace",
53+
"RUST_LOG=indy::,zmq=trace",
5454
"TEST_POOL_IP=$INDY_SDK_SERVER_IP"
5555
]) {
5656
bat "cargo test"
@@ -74,7 +74,7 @@ def windowsTesting() {
7474
echo "Windows Indy Cli Test: Run tests"
7575
withEnv([
7676
"RUST_TEST_THREADS=1",
77-
"RUST_LOG=trace",
77+
"RUST_LOG=indy::,zmq=trace",
7878
"TEST_POOL_IP=$INDY_SDK_SERVER_IP"
7979
]) {
8080
bat "cargo test"
@@ -176,20 +176,20 @@ def iosTesting() {
176176
def ubuntuTesting() {
177177
node('ubuntu') {
178178
stage('Ubuntu Test') {
179-
linuxTesting("ci/ubuntu.dockerfile ci", "Ubuntu", false, "pool_network")
179+
linuxTesting("ci/ubuntu.dockerfile ci", "Ubuntu", "pool_network")
180180
}
181181
}
182182
}
183183

184184
def rhelTesting() {
185185
node('ubuntu') {
186186
stage('RedHat Test') {
187-
linuxTesting("ci/amazon.dockerfile ci", "RedHat", false, "pool_network")
187+
linuxTesting("ci/amazon.dockerfile ci", "RedHat", "pool_network")
188188
}
189189
}
190190
}
191191

192-
def linuxTesting(file, env_name, run_interoperability_tests, network_name) {
192+
def linuxTesting(file, env_name, network_name) {
193193
def poolInst
194194
try {
195195
echo "${env_name} Test: Checkout csm"
@@ -198,19 +198,14 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name) {
198198
poolInst = openPool(env_name, network_name)
199199

200200
def testEnv
201-
def featuresArgs = ''
202201

203202
dir('libindy') {
204203
echo "${env_name} Libindy Test: Build docker image"
205204
testEnv = dockerBuild('libindy', file)
206205

207-
if (run_interoperability_tests) {
208-
featuresArgs = '--features "interoperability_tests"'
209-
}
210-
211206
testEnv.inside("--ip=\"10.0.0.3\" --network=${network_name}") {
212207
echo "${env_name} Libindy Test: Build"
213-
sh "cargo build $featuresArgs"
208+
sh "cargo build"
214209
}
215210
}
216211

@@ -229,14 +224,10 @@ def linuxTesting(file, env_name, run_interoperability_tests, network_name) {
229224
echo "${env_name} Libindy Test: Test"
230225

231226
echo "${env_name} Libindy Test: Build Test"
232-
sh "RUST_BACKTRACE=1 cargo test $featuresArgs --no-run"
233-
234-
if (run_interoperability_tests) {
235-
sh 'chmod -R 777 /home/indy/indy-anoncreds/'
236-
}
227+
sh "RUST_BACKTRACE=1 cargo test --no-run"
237228

238229
echo "${env_name} Libindy Test: Run tests"
239-
sh "RUST_BACKTRACE=1 RUST_LOG=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test $featuresArgs"
230+
sh "RUST_BACKTRACE=1 RUST_LOG=indy::,zmq=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test"
240231
}
241232
}
242233
},
@@ -279,7 +270,7 @@ def linuxJavaTesting(env_name, network_name, testEnv) {
279270
testEnv.inside("--network=${network_name}") {
280271
echo "${env_name} Libindy Test: Test java wrapper"
281272

282-
sh "RUST_LOG=trace TEST_POOL_IP=10.0.0.2 mvn clean test"
273+
sh "RUST_LOG=indy::,zmq=trace TEST_POOL_IP=10.0.0.2 mvn clean test"
283274
}
284275
}
285276
}
@@ -292,7 +283,7 @@ def linuxPythonTesting(env_name, network_name, testEnv) {
292283

293284
sh '''
294285
python3.5 -m pip install --user -e .
295-
LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_LOG=trace TEST_POOL_IP=10.0.0.2 python3.5 -m pytest
286+
LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_LOG=indy::,zmq=trace TEST_POOL_IP=10.0.0.2 python3.5 -m pytest
296287
'''
297288
}
298289
}
@@ -306,7 +297,7 @@ def linuxCLITesting(env_name, network_name, testEnv) {
306297
sh "LIBRARY_PATH=./ RUST_BACKTRACE=1 cargo test --no-run"
307298

308299
echo "${env_name} Indy Cli Test: Run tests"
309-
sh 'LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_BACKTRACE=1 RUST_LOG=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test'
300+
sh 'LD_LIBRARY_PATH=./:${LD_LIBRARY_PATH} RUST_BACKTRACE=1 RUST_LOG=indy::,zmq=trace RUST_TEST_THREADS=1 TEST_POOL_IP=10.0.0.2 cargo test'
310301
}
311302
}
312303
}

libindy/ci/ubuntu.dockerfile

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,67 +19,27 @@ RUN apt-get update && \
1919
apt-transport-https \
2020
ca-certificates \
2121
debhelper \
22-
wget
23-
24-
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68DB5E88
25-
RUN echo "deb https://repo.sovrin.org/deb xenial master" >> /etc/apt/sources.list
26-
RUN apt-get update -y && apt-get install -y \
27-
python3-charm-crypto
22+
wget \
23+
devscripts \
24+
libncursesw5-dev \
25+
libzmq3-dev
2826

2927
RUN pip3 install -U \
3028
pip \
3129
setuptools \
32-
virtualenv
33-
34-
ENV RUST_ARCHIVE=rust-1.25.0-x86_64-unknown-linux-gnu.tar.gz
35-
ENV RUST_DOWNLOAD_URL=https://static.rust-lang.org/dist/$RUST_ARCHIVE
36-
37-
RUN mkdir -p /rust
38-
WORKDIR /rust
39-
40-
RUN curl -fsOSL $RUST_DOWNLOAD_URL \
41-
&& curl -s $RUST_DOWNLOAD_URL.sha256 | sha256sum -c - \
42-
&& tar -C /rust -xzf $RUST_ARCHIVE --strip-components=1 \
43-
&& rm $RUST_ARCHIVE \
44-
&& ./install.sh
45-
46-
ENV PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin"
30+
virtualenv \
31+
twine \
32+
plumbum \
33+
deb-pkg-tools
4734

4835
RUN apt-get update && apt-get install openjdk-8-jdk -y
49-
5036
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
51-
5237
RUN apt-get update && apt-get install -y maven
5338

5439
RUN useradd -ms /bin/bash -u $uid indy
5540
USER indy
5641

57-
RUN cargo install --git https://github.com/DSRCorporation/cargo-test-xunit
42+
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.25.0
43+
ENV PATH /home/indy/.cargo/bin:$PATH
5844

5945
WORKDIR /home/indy
60-
61-
USER root
62-
RUN pip3 install \
63-
twine
64-
65-
RUN apt-get install -y devscripts \
66-
libncursesw5-dev
67-
68-
RUN apt-get install -y libzmq3-dev
69-
70-
ARG anoncreds_revision=1.0.32-master
71-
USER indy
72-
RUN git clone https://github.com/hyperledger/indy-anoncreds.git
73-
RUN cd indy-anoncreds && git checkout $anoncreds_revision
74-
RUN virtualenv -p python3.5 /home/indy/test
75-
RUN cp -r /usr/local/lib/python3.5/dist-packages/Charm_Crypto-0.0.0.egg-info /home/indy/test/lib/python3.5/site-packages/Charm_Crypto-0.0.0.egg-info
76-
RUN cp -r /usr/local/lib/python3.5/dist-packages/charm /home/indy/test/lib/python3.5/site-packages/charm
77-
USER root
78-
RUN ln -sf /home/indy/test/bin/python /usr/local/bin/python3
79-
RUN ln -sf /home/indy/test/bin/pip /usr/local/bin/pip3
80-
USER indy
81-
RUN pip3 install \
82-
/home/indy/indy-anoncreds \
83-
pytest
84-
85-
RUN pip3 install -U pip plumbum deb-pkg-tools

0 commit comments

Comments
 (0)