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
8ba24402
Commit
8ba24402
authored
7 years ago
by
roadscape
Browse files
Options
Downloads
Patches
Plain Diff
add schema.py hash to docker build
parent
8754af7a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile
+2
-0
2 additions, 0 deletions
Dockerfile
hooks/build
+9
-1
9 additions, 1 deletion
hooks/build
with
11 additions
and
1 deletion
Dockerfile
+
2
−
0
View file @
8ba24402
...
...
@@ -8,6 +8,8 @@ ENV LC_ALL en_US.UTF-8
ENV
PIPENV_VENV_IN_PROJECT 1
ARG
SOURCE_COMMIT
ENV
SOURCE_COMMIT ${SOURCE_COMMIT}
ARG
SCHEMA_HASH
ENV
SCHEMA_HASH ${SCHEMA_HASH}
ARG
DOCKER_TAG
ENV
DOCKER_TAG ${DOCKER_TAG}
...
...
This diff is collapsed.
Click to expand it.
hooks/build
+
9
−
1
View file @
8ba24402
...
...
@@ -5,4 +5,12 @@ if [[ -z "$SOURCE_COMMIT" ]]; then
echo
"
Updating SOURCE_COMMIT from git rev-parse HEAD
"
echo
"
SOURCE_COMMIT: $SOURCE_COMMIT
"
fi
docker
build
-
t
"
${IMAGE_NAME}
"
--
build
-
arg
SOURCE_COMMIT
=
"
${SOURCE_COMMIT}
"
--
build
-
arg
DOCKER_TAG
=
"
${DOCKER_TAG}
"
.
echo
"
SCHEMA_HASH: $SCHEMA_HASH
"
if
[[
-
z
"
$SCHEMA_HASH
"
]];
then
export
SCHEMA_HASH
=
"
${SCHEMA_HASH:-$(shasum hive/db/schema.py | cut -c1-8)}
"
echo
"
Updating SCHEMA_HASH from sha1 of hive/db/schema.py
"
echo
"
SCHEMA_HASH: $SCHEMA_HASH
"
fi
docker
build
-
t
"
${IMAGE_NAME}
"
--
build
-
arg
SOURCE_COMMIT
=
"
${SOURCE_COMMIT}
"
--
build
-
arg
SCHEMA_HASH
=
"
${SCHEMA_HASH}
"
--
build
-
arg
DOCKER_TAG
=
"
${DOCKER_TAG}
"
.
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