Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
127a6ca7
Commit
127a6ca7
authored
10 months ago
by
Michal Zander
Committed by
Bartek Wrona
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Add reputation_tracker to setup
parent
9e5014c5
No related branches found
No related tags found
2 merge requests
!827
Merge develop changes to master
,
!710
(Reptracker in flush) Move reptracker to flush
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+1
-0
1 addition, 0 deletions
Dockerfile
docker/docker_entrypoint.sh
+24
-0
24 additions, 0 deletions
docker/docker_entrypoint.sh
with
25 additions
and
0 deletions
Dockerfile
+
1
−
0
View file @
127a6ca7
...
@@ -118,6 +118,7 @@ COPY --from=builder --chown=hivemind:hivemind /home/hivemind/app/haf/scripts/cr
...
@@ -118,6 +118,7 @@ COPY --from=builder --chown=hivemind:hivemind /home/hivemind/app/haf/scripts/cr
COPY
--from=builder --chown=hivemind:hivemind /home/hivemind/app/haf/scripts/common.sh /home/hivemind/haf/scripts/common.sh
COPY
--from=builder --chown=hivemind:hivemind /home/hivemind/app/haf/scripts/common.sh /home/hivemind/haf/scripts/common.sh
COPY
--from=builder --chown=hivemind:hivemind /home/hivemind/app/mock_data/block_data /home/hivemind/app/mock_data/block_data
COPY
--from=builder --chown=hivemind:hivemind /home/hivemind/app/mock_data/block_data /home/hivemind/app/mock_data/block_data
COPY
--from=builder --chown=hivemind:hivemind /home/hivemind/app/mock_data/vops_data /home/hivemind/app/mock_data/vops_data
COPY
--from=builder --chown=hivemind:hivemind /home/hivemind/app/mock_data/vops_data /home/hivemind/app/mock_data/vops_data
COPY
--from=builder --chown=hivemind:hivemind /home/hivemind/app/reputation_tracker /home/hivemind/app/reputation_tracker
# JSON rpc service
# JSON rpc service
EXPOSE
${HTTP_PORT}
EXPOSE
${HTTP_PORT}
...
...
This diff is collapsed.
Click to expand it.
docker/docker_entrypoint.sh
+
24
−
0
View file @
127a6ca7
...
@@ -15,6 +15,8 @@ function log () {
...
@@ -15,6 +15,8 @@ function log () {
log
"global"
"Parameters passed directly to Hivemind docker entrypoint:
$*
"
log
"global"
"Parameters passed directly to Hivemind docker entrypoint:
$*
"
SCRIPT_DIR
=
"
$(
realpath
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
)
"
COMMAND
=
"
$1
"
COMMAND
=
"
$1
"
HIVEMIND_ARGS
=()
HIVEMIND_ARGS
=()
ADD_MOCKS
=
${
ADD_MOCKS
:-
false
}
ADD_MOCKS
=
${
ADD_MOCKS
:-
false
}
...
@@ -23,6 +25,10 @@ POSTGRES_URL=${POSTGRES_URL:-}
...
@@ -23,6 +25,10 @@ POSTGRES_URL=${POSTGRES_URL:-}
POSTGRES_ADMIN_URL
=
${
POSTGRES_ADMIN_URL
:-}
POSTGRES_ADMIN_URL
=
${
POSTGRES_ADMIN_URL
:-}
INSTALL_APP
=
0
INSTALL_APP
=
0
DO_SCHEMA_UPGRADE
=
0
DO_SCHEMA_UPGRADE
=
0
DO_INSTALL_REPTRACKER
=
0
REPTRACKER_SCHEMA
=
reptracker_app
reptracker_dir
=
"
$SCRIPT_DIR
/../reputation_tracker"
while
[
$#
-gt
0
]
;
do
while
[
$#
-gt
0
]
;
do
case
"
$1
"
in
case
"
$1
"
in
...
@@ -46,10 +52,16 @@ while [ $# -gt 0 ]; do
...
@@ -46,10 +52,16 @@ while [ $# -gt 0 ]; do
--install-app
)
--install-app
)
INSTALL_APP
=
1
INSTALL_APP
=
1
;;
;;
--reptracker-schema
=
*
)
REPTRACKER_SCHEMA
=
"
${
1
#*=
}
"
;;
--upgrade-schema
)
--upgrade-schema
)
INSTALL_APP
=
1
INSTALL_APP
=
1
DO_SCHEMA_UPGRADE
=
1
DO_SCHEMA_UPGRADE
=
1
;;
;;
--only-hivemind
=
*
)
SKIP_REPTRACKER
=
1
;;
*
)
*
)
HIVEMIND_ARGS+
=(
"
$1
"
)
HIVEMIND_ARGS+
=(
"
$1
"
)
esac
esac
...
@@ -92,6 +104,13 @@ setup() {
...
@@ -92,6 +104,13 @@ setup() {
cd
/home/hivemind/app
cd
/home/hivemind/app
./setup_postgres.sh
--postgres-url
=
"
${
POSTGRES_ADMIN_URL
}
"
./setup_postgres.sh
--postgres-url
=
"
${
POSTGRES_ADMIN_URL
}
"
./install_app.sh
--postgres-url
=
"
${
POSTGRES_ADMIN_URL
}
"
./install_app.sh
--postgres-url
=
"
${
POSTGRES_ADMIN_URL
}
"
if
[
"
${
SKIP_REPTRACKER
}
"
-eq
0
]
;
then
pushd
"
$reptracker_dir
"
./scripts/install_app.sh
--postgres-url
=
"
${
POSTGRES_ADMIN_URL
}
"
--schema
=
"{
$REPTRACKER_SCHEMA
}"
popd
fi
if
[[
"
$ADD_MOCKS
"
==
"true"
]]
;
then
if
[[
"
$ADD_MOCKS
"
==
"true"
]]
;
then
log
"setup"
"Adding mocks to database..."
log
"setup"
"Adding mocks to database..."
# shellcheck source=/dev/null
# shellcheck source=/dev/null
...
@@ -113,6 +132,11 @@ uninstall_app() {
...
@@ -113,6 +132,11 @@ uninstall_app() {
log
"setup"
"Cleaning up an application specific contents located in the database:
${
POSTGRES_ADMIN_URL
}
"
log
"setup"
"Cleaning up an application specific contents located in the database:
${
POSTGRES_ADMIN_URL
}
"
cd
/home/hivemind/app
cd
/home/hivemind/app
./uninstall_app.sh
--postgres-url
=
"
${
POSTGRES_ADMIN_URL
}
"
./uninstall_app.sh
--postgres-url
=
"
${
POSTGRES_ADMIN_URL
}
"
if
[
"
${
SKIP_REPTRACKER
}
"
-eq
0
]
;
then
"
${
SCRIPT_DIR
}
/../reputation_tracker/scripts/uninstall_app.sh"
--postgres-url
=
"
${
POSTGRES_ADMIN_URL
}
"
fi
}
}
case
"
$COMMAND
"
in
case
"
$COMMAND
"
in
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment