Unverified Commit 685980a0 authored by kladko's avatar kladko

Added image tagging

parent dc8774d6
......@@ -7,12 +7,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: test
run: echo ${GITHUB_REF##*/}
- name: test2
run: if [ ${GITHUB_REF##*/} = "two_docker_images" ]; then TAG="${GITHUB_REF##*/}"; else export TAG="haha"; fi;
- name: test3
run: echo ${TAG}
- name: Login to docker
......@@ -22,12 +19,6 @@ jobs:
- uses: actions/checkout@v1
- name: submodule update
run: git submodule update --init --recursive
- name: Build the Docker image
run: docker build . --file DockerfileSimulation --tag skalenetwork/sgxwalletsim:latest
- name: run docker image
run: docker run -v ${PWD}/sgx_data:/usr/src/sdk/sgx_data -d --network=host skalenetwork/sgxwalletsim:latest
- name: sleep and check
run: sleep 5; scripts/docker_test.py
- name: push docker image
run: docker push skalenetwork/sgxwalletsim:latest
- name: build and push
run: python3 scripts/build_push.py
#!/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"
assert subprocess.call(["docker", "build", ".", "--file", "DockerfileSimulation", "--tag",
"skalenetwork/sgxwalletsim:latest"])
assert subprocess.call(["docker", "run", "-v", topDir + "/sgx_data:/usr/src/sdk/sgx_data",
"-d", "--network=host", "skalenetwork/sgxwalletsim:latest"]);
time.sleep(5);
assert subprocess.call(["docker", "push", "skalenetwork/sgxwalletsim:latest"]);
print("Build and push successfull.")
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