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
c7cc387b
Unverified
Commit
c7cc387b
authored
May 19, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2202 build and test for sim mode
parent
9a6b6f2c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
20 deletions
+34
-20
dockerimagesim.yml
.github/workflows/dockerimagesim.yml
+11
-8
build_image.sh
scripts/build_image.sh
+1
-11
calculate_version.sh
scripts/calculate_version.sh
+1
-1
publish_image.sh
scripts/publish_image.sh
+21
-0
No files found.
.github/workflows/dockerimagesim.yml
View file @
c7cc387b
...
@@ -13,13 +13,8 @@ jobs:
...
@@ -13,13 +13,8 @@ jobs:
-
uses
:
actions/checkout@v1
-
uses
:
actions/checkout@v1
-
name
:
submodule update
-
name
:
submodule update
run
:
git submodule update --init --recursive
run
:
git submodule update --init --recursive
-
name
:
build
-
name
:
init enviroment variables
:
run
:
python3 scripts/docker_build.py DockerfileSimulation sgxwalletsim ${GITHUB_SHA}
run
:
|
-
name
:
test
run
:
python3 scripts/docker_test.py ${GITHUB_REF##*/} DockerfileSimulation sgxwalletsim
-
name
:
deploy docker image
#if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run
:
|
export BRANCH=${GITHUB_REF##*/}
export BRANCH=${GITHUB_REF##*/}
echo "Branch $BRANCH"
echo "Branch $BRANCH"
export VERSION=$(cat VERSION)
export VERSION=$(cat VERSION)
...
@@ -29,7 +24,15 @@ jobs:
...
@@ -29,7 +24,15 @@ jobs:
echo "Version $VERSION"
echo "Version $VERSION"
export RELEASE=true
export RELEASE=true
echo "::set-env name=RELEASE::$RELEASE"
echo "::set-env name=RELEASE::$RELEASE"
bash ./scripts/build_and_publish.sh DockerfileSimulation
bash ./scripts/build_image.sh DockerfileSimulation
-
name
:
build
run
:
python3 scripts/docker_build.py DockerfileSimulation sgxwalletsim ${GITHUB_SHA}
-
name
:
test
run
:
python3 scripts/docker_test.py ${GITHUB_REF##*/} DockerfileSimulation sgxwalletsim
-
name
:
deploy docker image
#if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run
:
|
bash ./scripts/publish_image.sh DockerfileSimulation
-
name
:
Create Release
-
name
:
Create Release
if
:
contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
if
:
contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
id
:
create_release
id
:
create_release
...
...
scripts/build_
and_publish
.sh
→
scripts/build_
image
.sh
100755 → 100644
View file @
c7cc387b
...
@@ -21,14 +21,4 @@ docker build -f "${DIR}"/../"${DOCKERFILE}" -t "${IMAGE_NAME}" . || exit $?
...
@@ -21,14 +21,4 @@ docker build -f "${DIR}"/../"${DOCKERFILE}" -t "${IMAGE_NAME}" . || exit $?
docker tag
"
${
IMAGE_NAME
}
"
"
${
LATEST_IMAGE_NAME
}
"
docker tag
"
${
IMAGE_NAME
}
"
"
${
LATEST_IMAGE_NAME
}
"
echo
"========================================================================================="
echo
"========================================================================================="
echo
"Built
$IMAGE_NAME
"
echo
"Built
$IMAGE_NAME
"
\ No newline at end of file
# Publish image
:
"
${
DOCKER_USERNAME
?Need to set DOCKER_USERNAME
}
"
:
"
${
DOCKER_PASSWORD
?Need to set DOCKER_PASSWORD
}
"
echo
"
$DOCKER_PASSWORD
"
| docker login
--username
"
$DOCKER_USERNAME
"
--password-stdin
docker push
"
$IMAGE_NAME
"
||
exit
$?
docker push
"
$LATEST_IMAGE_NAME
"
||
exit
$?
scripts/calculate_version.sh
View file @
c7cc387b
...
@@ -43,7 +43,7 @@ for (( VERSION_NUMBER=0; ; VERSION_NUMBER++ ))
...
@@ -43,7 +43,7 @@ for (( VERSION_NUMBER=0; ; VERSION_NUMBER++ ))
do
do
if
[
"
$VERSION
"
=
"1.49"
]
&&
[
"
$VERSION_NUMBER
"
-le
4
]
if
[
"
$VERSION
"
=
"1.49"
]
&&
[
"
$VERSION_NUMBER
"
-le
4
]
then
then
VERSION_NUMBER
=
4
VERSION_NUMBER
=
123
fi
fi
RESULT_VERSION
=
"
$CONTAINER
.
$VERSION
-
$LABEL
.
$VERSION_NUMBER
"
RESULT_VERSION
=
"
$CONTAINER
.
$VERSION
-
$LABEL
.
$VERSION_NUMBER
"
if
!
[
$(
git tag
-l
?
$RESULT_VERSION
)
]
if
!
[
$(
git tag
-l
?
$RESULT_VERSION
)
]
...
...
scripts/publish_image.sh
0 → 100755
View file @
c7cc387b
#!/usr/bin/env bash
set
-e
DOCKERFILE
=
$1
:
"
${
VERSION
?Need to set VERSION
}
"
:
"
${
BRANCH
?Need to set BRANCH
}
"
NAME
=
sgx
REPO_NAME
=
skalenetwork/
$NAME
IMAGE_NAME
=
$REPO_NAME
:
$VERSION
LATEST_IMAGE_NAME
=
$REPO_NAME
:
$BRANCH
-latest
:
"
${
DOCKER_USERNAME
?Need to set DOCKER_USERNAME
}
"
:
"
${
DOCKER_PASSWORD
?Need to set DOCKER_PASSWORD
}
"
echo
"
$DOCKER_PASSWORD
"
| docker login
--username
"
$DOCKER_USERNAME
"
--password-stdin
docker push
"
$IMAGE_NAME
"
||
exit
$?
docker push
"
$LATEST_IMAGE_NAME
"
||
exit
$?
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