contractor/scripts/ci:main.sh

23 lines
434 B
Bash
Raw Normal View History

#!/usr/bin/env bash
set -e
CMD_PREFIX=""
if [[ -n "$CI_PREFIX" ]]; then
CMD_PREFIX="$CI_PREFIX"
else
cd ci || return 1
cargo build
cd - || return 1
CMD_PREFIX="ci/target/debug/ci"
fi
$CMD_PREFIX main \
--docker-image "$DOCKER_IMAGE" \
--golang-builder-image "$GOLANG_BUILDER_IMAGE" \
--production-image "$PRODUCTION_IMAGE" \
--image "$REGISTRY/$SERVICE" \
--tag "main-$(date +%s)" \
--bin-name "$SERVICE"