mirror of
https://github.com/valitydev/capi-v2.git
synced 2024-11-06 01:55:20 +00:00
489d9ca89d
* MSPF-191: Remove containerpilot integration * MSPF-191: Refactor Makefile a bit * MSPF-191: Bump to rbkmoney/genlib@82ff16f * MSPF-191: Fix jwt authorizer setup when no signee is specified
27 lines
1.0 KiB
Bash
Executable File
27 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
cat <<EOF
|
|
FROM $BASE_IMAGE
|
|
MAINTAINER Artem Ocheredko <a.ocheredko@rbkmoney.com>
|
|
COPY ./_build/prod/rel/capi /opt/capi
|
|
WORKDIR /opt/capi
|
|
CMD /opt/capi/bin/capi foreground
|
|
EXPOSE 8080
|
|
# 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.build_img=build \
|
|
com.rbkmoney.$SERVICE_NAME.build_img_tag=$BUILD_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)
|
|
EOF
|