Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
63955d5b
Unverified
Commit
63955d5b
authored
Jan 27, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added image tagging
parent
ba1b5eaa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
25 deletions
+97
-25
dockerimagesim.yml
.github/workflows/dockerimagesim.yml
+8
-2
docker_build.py
scripts/docker_build.py
+2
-9
docker_push.py
scripts/docker_push.py
+65
-0
docker_test.py
scripts/docker_test.py
+22
-14
No files found.
.github/workflows/dockerimagesim.yml
View file @
63955d5b
...
...
@@ -19,6 +19,12 @@ jobs:
-
uses
:
actions/checkout@v1
-
name
:
submodule update
run
:
git submodule update --init --recursive
-
name
:
build and push
run
:
python3 scripts/docker_build_push.py ${GITHUB_REF##*/}
-
name
:
build
run
:
python3 scripts/docker_build.py ${GITHUB_REF##*/}
-
name
:
test
run
:
python3 scripts/docker_test.py ${GITHUB_REF##*/}
-
name
:
push
run
:
python3 scripts/docker_test.py ${GITHUB_REF##*/}
scripts/docker_build
_push
.py
→
scripts/docker_build.py
View file @
63955d5b
...
...
@@ -63,14 +63,7 @@ sys.exit(-1);
print
"Running build"
assert
subprocess
.
call
([
"docker"
,
"build"
,
topDir
,
"--file"
,
topDir
+
"/DockerfileSimulation"
,
"--tag"
,
print
"Running push"
"skalenetwork/sgxwalletsim:latest"
])
==
0
assert
subprocess
.
call
([
"docker"
,
"run"
,
"-v"
,
topDir
+
"/sgx_data:/usr/src/sdk/sgx_data"
,
"-d"
,
"--network=host"
,
"skalenetwork/sgxwalletsim:latest"
])
==
0
time
.
sleep
(
5
);
assert
subprocess
.
call
([
"docker"
,
"push"
,
"skalenetwork/sgxwalletsim:latest"
])
==
0
;
assert
subprocess
.
call
([
"docker"
,
"build"
,
topDir
,
"--file"
,
topDir
+
"/DockerfileSimulation"
,
"--tag"
,
"skalenetwork/sgxwalletsim:latest"
])
==
0
;
print
(
"Build and push successfull."
)
scripts/docker_push.py
0 → 100755
View file @
63955d5b
#!/usr/bin/env python
# ------------------------------------------------------------------------------
# Bash script to build cpp-ethereum within TravisCI.
#
# The documentation for cpp-ethereum is hosted at http://cpp-ethereum.org
#
# ------------------------------------------------------------------------------
# This file is part of cpp-ethereum.
#
# cpp-ethereum is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# cpp-ethereum is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>
#
# (c) 2016 cpp-ethereum contributors.
# ------------------------------------------------------------------------------
#
# Copyright (C) 2018-2019 SKALE Labs
#
# This file is part of skale-consensus.
#
# skale-consensus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eithe r version 3 of the License, or
# (at your option) any later version.
#
# skale-consensus is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with skale-consensus. If not, see <http://www.gnu.org/licenses/>.
#
# @file docker_build_push.py
# @author Stan Kladko
# @date 2018
#
import
sys
,
os
,
subprocess
,
time
os
.
chdir
(
".."
)
topDir
=
os
.
getcwd
()
print
(
"Starting build push"
)
print
(
"Top directory is:"
+
topDir
)
dockerExecutable
=
subprocess
.
check_output
([
"which"
,
"docker"
])
SCRIPTS_DIR
=
topDir
+
"/scripts"
print
(
topDir
);
sys
.
exit
(
-
1
);
#print(sys.argv[1]);
#print(sys.argv[2]);
assert
subprocess
.
call
([
"docker"
,
"push"
,
"skalenetwork/sgxwalletsim:latest"
])
==
0
;
scripts/docker_test.py
View file @
63955d5b
...
...
@@ -6,19 +6,28 @@
# @date 2020
#
import
sys
import
os
import
subprocess
import
socket
assert
os
.
path
.
isdir
(
'sgx_data/sgxwallet.db'
)
assert
os
.
path
.
isdir
(
'sgx_data/cert_data'
);
assert
os
.
path
.
isdir
(
'sgx_data/CSR_DB'
);
assert
os
.
path
.
isdir
(
'sgx_data/CSR_STATUS_DB'
);
assert
os
.
path
.
isfile
(
'sgx_data/cert_data/SGXServerCert.crt'
)
assert
os
.
path
.
isfile
(
'sgx_data/cert_data/SGXServerCert.key'
)
assert
os
.
path
.
isfile
(
'sgx_data/cert_data/rootCA.pem'
)
assert
os
.
path
.
isfile
(
'sgx_data/cert_data/rootCA.key'
)
import
sys
,
os
,
subprocess
,
socket
,
time
os
.
chdir
(
".."
)
topDir
=
os
.
getcwd
()
print
(
"Starting build push"
)
print
(
"Top directory is:"
+
topDir
)
dockerExecutable
=
subprocess
.
check_output
([
"which"
,
"docker"
])
SCRIPTS_DIR
=
topDir
+
"/scripts"
print
(
"Running test"
);
assert
subprocess
.
call
([
"docker"
,
"run"
,
"-v"
,
topDir
+
"/sgx_data:/usr/src/sdk/sgx_data"
,
"-d"
,
"--network=host"
,
"skalenetwork/sgxwalletsim:latest"
])
==
0
time
.
sleep
(
5
);
assert
os
.
path
.
isdir
(
topDir
+
'/sgx_data/sgxwallet.db'
)
assert
os
.
path
.
isdir
(
topDir
+
'sgx_data/cert_data'
);
assert
os
.
path
.
isdir
(
topDir
+
'sgx_data/CSR_DB'
);
assert
os
.
path
.
isdir
(
topDir
+
'sgx_data/CSR_STATUS_DB'
);
assert
os
.
path
.
isfile
(
topDir
+
'sgx_data/cert_data/SGXServerCert.crt'
)
assert
os
.
path
.
isfile
(
topDir
+
'sgx_data/cert_data/SGXServerCert.key'
)
assert
os
.
path
.
isfile
(
topDir
+
'sgx_data/cert_data/rootCA.pem'
)
assert
os
.
path
.
isfile
(
topDir
+
'sgx_data/cert_data/rootCA.key'
)
s1
=
socket
.
socket
()
s2
=
socket
.
socket
()
...
...
@@ -37,4 +46,3 @@ s3.close()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment