mirror of
https://github.com/valitydev/image-columbus.git
synced 2024-11-06 02:25:16 +00:00
add geo data just as files without slf
This commit is contained in:
parent
8f6a8749be
commit
7535abe1dc
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
[submodule "build_utils"]
|
||||
path = build_utils
|
||||
url = git@github.com:rbkmoney/build_utils.git
|
||||
branch = master
|
29
Dockerfile.sh
Executable file
29
Dockerfile.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
cat <<EOF
|
||||
FROM $CUSTOM_BASE_IMAGE
|
||||
MAINTAINER Yevgeniy Poluektov <e.poluektov@rbkmoney.com>
|
||||
|
||||
COPY geo_data/GeoLite2-city.mmdb /var/geodata/GeoLite2-city.mmdb
|
||||
COPY geo_data/GeoLite2-City-Locations-en.csv /var/geodata/GeoLite2-City-Locations-en.csv
|
||||
COPY geo_data/GeoLite2-City-Locations-ru.csv /var/geodata/GeoLite2-City-Locations-ru.csv
|
||||
VOLUME /var/geodata
|
||||
|
||||
# A bit of magic below to get a proper branch name
|
||||
# even when the HEAD is detached (Hey Jenkins!
|
||||
# BRANCH_NAME is available in Jenkins env).
|
||||
LABEL com.rbkmoney.$SERVICE_NAME.parent=$BASE_IMAGE_NAME \
|
||||
com.rbkmoney.$SERVICE_NAME.parent_tag=$BASE_IMAGE_TAG \
|
||||
com.rbkmoney.$SERVICE_NAME.commit_id=$(git rev-parse HEAD) \
|
||||
com.rbkmoney.$SERVICE_NAME.commit_number=$(git rev-list --count HEAD) \
|
||||
com.rbkmoney.$SERVICE_NAME.branch=$( \
|
||||
if [ "HEAD" != $(git rev-parse --abbrev-ref HEAD) ]; then \
|
||||
echo $(git rev-parse --abbrev-ref HEAD); \
|
||||
elif [ -n "$BRANCH_NAME" ]; then \
|
||||
echo $BRANCH_NAME; \
|
||||
else \
|
||||
echo $(git name-rev --name-only HEAD); \
|
||||
fi)
|
||||
ENTRYPOINT ["/bin/containerpilot", "-config", "file:///etc/containerpilot.json", "/docker-entrypoint.sh"]
|
||||
CMD ["postgres"]
|
||||
EOF
|
||||
|
30
Jenkinsfile
vendored
Normal file
30
Jenkinsfile
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
#!groovy
|
||||
|
||||
build('image-columbus', 'docker-host') {
|
||||
checkoutRepo()
|
||||
loadBuildUtils()
|
||||
|
||||
def pipeDefault
|
||||
runStage('load pipeline') {
|
||||
env.JENKINS_LIB = "build_utils/jenkins_lib"
|
||||
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
|
||||
}
|
||||
|
||||
pipeDefault() {
|
||||
runStage('build postgres image') {
|
||||
sh "make build_image"
|
||||
}
|
||||
try {
|
||||
if (env.BRANCH_NAME == 'master') {
|
||||
runStage('push postgresimage') {
|
||||
sh "make push_image"
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
runStage('rm local image') {
|
||||
sh 'make rm_local_image'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
24
Makefile
Normal file
24
Makefile
Normal file
@ -0,0 +1,24 @@
|
||||
UTILS_PATH := build_utils
|
||||
TEMPLATES_PATH := .
|
||||
|
||||
SERVICE_NAME := postgres-geodata
|
||||
SERVICE_IMAGE_TAG ?= $(shell git rev-parse HEAD)
|
||||
SERVICE_IMAGE_PUSH_TAG ?= $(SERVICE_IMAGE_TAG)
|
||||
|
||||
BASE_IMAGE_NAME := rbkmoney/postgres
|
||||
BASE_IMAGE_TAG := e7c8a9d97e4243a3ed9320528616365af27727a0
|
||||
|
||||
-include $(UTILS_PATH)/make_lib/utils_image.mk
|
||||
CUSTOM_BASE_IMAGE := $(REGISTRY)/$(BASE_IMAGE_NAME):$(BASE_IMAGE_TAG)
|
||||
export CUSTOM_BASE_IMAGE
|
||||
|
||||
$(SUBTARGETS): %/.git: %
|
||||
git submodule update --init $<
|
||||
touch $@
|
||||
|
||||
submodules: $(SUBTARGETS)
|
||||
|
||||
|
||||
clean:
|
||||
rm Dockerfile
|
||||
|
14
README.md
Normal file
14
README.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Image Postgres + geo data for columbus[![Build Status](http://ci.rbkmoney.com/buildStatus/icon?job=rbkmoney_private/image-columbus/master)](http://ci.rbkmoney.com/job/rbkmoney_private/job/image-columbus/job/master/)
|
||||
|
||||
|
||||
Собрать _rbkmoney_ `postgres-geodata` образ:
|
||||
|
||||
```
|
||||
make build_image
|
||||
```
|
||||
|
||||
Запушить образ
|
||||
|
||||
```
|
||||
make push_image
|
||||
```
|
1
build_utils
Submodule
1
build_utils
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit b9a3a1d845b76b07bd964bbcb363a48249e2a0e7
|
102851
geo_data/GeoLite2-City-Locations-en.csv
Normal file
102851
geo_data/GeoLite2-City-Locations-en.csv
Normal file
File diff suppressed because it is too large
Load Diff
102851
geo_data/GeoLite2-City-Locations-ru.csv
Normal file
102851
geo_data/GeoLite2-City-Locations-ru.csv
Normal file
File diff suppressed because it is too large
Load Diff
BIN
geo_data/GeoLite2-city.mmdb
Normal file
BIN
geo_data/GeoLite2-city.mmdb
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 MiB |
Loading…
Reference in New Issue
Block a user