Unverified Commit 70b73971 authored by kladko's avatar kladko

Added image tagging

parent 513b0106
......@@ -49,16 +49,18 @@
import sys, os, subprocess, time
os.chdir("..")
topDir = os.getcwd() + "/sgxwallet"
print("Starting build", flush=True)
print("Top directory is:" + topDir, flush=True)
print(sys.argv[1], flush=True);
#print(sys.argv[2]);
BRANCH = sys.argv[1];
if (BRANCH == "develop") :
TAG_POSTFIX = "latest";
else :
TAG_POSTFIX = "latest_commit"
print("Starting build for branch " + BRANCH, flush=True)
assert subprocess.call(["pwd"]) == 0;
assert subprocess.call(["docker", "build", topDir, "--file", topDir + "/DockerfileSimulation", "--tag",
"skalenetwork/sgxwalletsim:latest"]) == 0;
"skalenetwork/sgxwalletsim:" + TAG_POSTFIX]) == 0;
......@@ -53,9 +53,16 @@ print("Starting build push")
print("Top directory is:" + topDir)
SCRIPTS_DIR = topDir + "/scripts"
BRANCH = sys.argv[1];
if (BRANCH == "develop") :
TAG_POSTFIX = "latest";
else :
TAG_POSTFIX = "latest_commit"
#print(sys.argv[1]);
#print(sys.argv[2]);
assert subprocess.call(["docker", "push", "skalenetwork/sgxwalletsim:latest"]) == 0;
assert subprocess.call(["docker", "push", "skalenetwork/sgxwalletsim:" + TAG_POSTFIX]) == 0;
......@@ -13,9 +13,15 @@ print("Starting build push")
print("Top directory is:" + topDir)
SCRIPTS_DIR = topDir + "/scripts"
print("Running test");
BRANCH = sys.argv[1];
if (BRANCH == "develop") :
TAG_POSTFIX = "latest";
else :
TAG_POSTFIX = "latest_commit"
print("Running tests for branch " + BRANCH);
assert subprocess.call(["docker", "run", "-v", topDir + "/sgx_data:/usr/src/sdk/sgx_data",
"-d", "--network=host", "skalenetwork/sgxwalletsim:latest"]) == 0
"-d", "--network=host", "skalenetwork/sgxwalletsim:" + TAG_POSTFIX]) == 0
time.sleep(5);
......
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