Unverified Commit 63955d5b authored by kladko's avatar kladko

Added image tagging

parent ba1b5eaa
......@@ -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##*/}
......@@ -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.")
#!/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;
......@@ -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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment