Page MenuHomeDevCentral

run-report.sh
No OneTemporary

run-report.sh

#!/bin/sh
# -------------------------------------------------------------
# Run report
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Description: Wrapper to run nasqueron-reports container
# License: BSD-2-Clause
# Source file: roles/paas-docker/wrappers/files/run-report.sh
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
set -e
# -------------------------------------------------------------
# Arguments
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ "$#" -eq 0 ]; then
echo "Usage: $0 <report to generate>" 1>&2;
exit 1
fi
REPORT=$1
# -------------------------------------------------------------
# Credentials
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DB_USERNAME=$(credential nasqueron/reports/acquisitariat username)
DB_PASSWORD=$(credential nasqueron/reports/acquisitariat)
# -------------------------------------------------------------
# Container
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
docker run --rm \
--link acquisitariat:mysql \
-e "DB_USERNAME=$DB_USERNAME" -e "DB_PASSWORD=$DB_PASSWORD" \
nasqueron/reports run-report "$REPORT"

File Metadata

Mime Type
text/x-shellscript
Expires
Fri, Nov 21, 16:17 (15 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3176091
Default Alt Text
run-report.sh (1 KB)

Event Timeline