Unverified Commit 53faa41e authored by kladko's avatar kladko

Added image tagging

parent 70b73971
......@@ -18,11 +18,11 @@ jobs:
- name: ls
run: echo $PWD;
- name: build
run: python3 scripts/docker_build.py ${GITHUB_REF##*/}
run: python3 scripts/docker_build.py ${GITHUB_REF##*/} DockerfileSimulation sgxwalletsim
- name: test
run: python3 scripts/docker_test.py ${GITHUB_REF##*/}
run: python3 scripts/docker_test.py ${GITHUB_REF##*/} DockerfileSimulation sgxwalletsim
- name: push
run: python3 scripts/docker_test.py ${GITHUB_REF##*/}
run: python3 scripts/docker_test.py ${GITHUB_REF##*/} DockerfileSimulation sgxwalletsim
......@@ -50,6 +50,8 @@ import sys, os, subprocess, time
os.chdir("..")
topDir = os.getcwd() + "/sgxwallet"
BRANCH = sys.argv[1];
DOCKER_FILE_NAME = sys.argv[2];
IMAGE_NAME = sys.argv[3];
if (BRANCH == "develop") :
TAG_POSTFIX = "latest";
else :
......@@ -60,7 +62,6 @@ 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:" + TAG_POSTFIX]) == 0;
assert subprocess.call(["docker", "build", topDir, "--file", topDir + "/" + DOCKER_FILE_NAME, "--tag",
"skalenetwork/" + IMAGE_NAME + ":" + TAG_POSTFIX]) == 0;
......@@ -54,6 +54,8 @@ print("Top directory is:" + topDir)
SCRIPTS_DIR = topDir + "/scripts"
BRANCH = sys.argv[1];
DOCKER_FILE_NAME = sys.argv[2];
IMAGE_NAME = sys.argv[3];
if (BRANCH == "develop") :
TAG_POSTFIX = "latest";
else :
......@@ -64,5 +66,5 @@ else :
#print(sys.argv[1]);
#print(sys.argv[2]);
assert subprocess.call(["docker", "push", "skalenetwork/sgxwalletsim:" + TAG_POSTFIX]) == 0;
assert subprocess.call(["docker", "push", "skalenetwork/" + IMAGE_NAME + ":" + TAG_POSTFIX]) == 0;
......@@ -14,6 +14,9 @@ print("Top directory is:" + topDir)
SCRIPTS_DIR = topDir + "/scripts"
BRANCH = sys.argv[1];
DOCKER_FILE_NAME = sys.argv[2];
IMAGE_NAME = sys.argv[3];
if (BRANCH == "develop") :
TAG_POSTFIX = "latest";
else :
......@@ -21,7 +24,7 @@ else :
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:" + TAG_POSTFIX]) == 0
"-d", "--network=host", "skalenetwork/" + IMAGE_NAME +":" + 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