This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy path.envrc
98 lines (76 loc) · 3.95 KB
/
.envrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/env bash
# This file is both used via direnv, as well as by directly sourcing it in a
# shell (when being run from CI).
if type source_up >/dev/null 2>/dev/null; then
# Using direnv; load any higher up .envrc
source_up || true
else
# (**)
PWD="$(unset CDPATH ; cd "$(dirname "${BASH_SOURCE[0]:-${KSH_VERSION:+${.sh.file}}${KSH_VERSION:-$0}}")" && pwd)"
fi
export FISSILE_GIT_ROOT=$PWD
# Get version information
. "${PWD}/bin/common/versions.sh"
# The Docker repository name used for images, the registry itself, and the org to use.
# Note, this replaces "make/include/registry" and its IMAGE_* variables
export FISSILE_REPOSITORY=${FISSILE_REPOSITORY:-scf}
export FISSILE_DOCKER_REGISTRY="${FISSILE_DOCKER_REGISTRY:+${FISSILE_DOCKER_REGISTRY%/}/}"
export FISSILE_DOCKER_ORGANIZATION=${FISSILE_DOCKER_ORGANIZATION:-'splatform'}
export FISSILE_DOCKER_REPO=${FISSILE_DOCKER_REPO:-'fissile-stemcell-opensuse'}
# This is a comma separated list of paths to the local repositories
# of all the releases that make up SCF
FISSILE_RELEASE=""
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/scf-release"
FISSILE_RELEASE="${FISSILE_RELEASE},${PWD}/src/app-autoscaler-release"
export FISSILE_RELEASE="${FISSILE_RELEASE#,}"
# Note: Both role manifest and light opinions are assembled by the
# fissile wrapper, see `(output)/bin/fissile`. Here we only
# initialize various env variables referencing all the parts, making
# it easier on the wrapper.
# Path to an SCF role manifest, common parts, final destination.
# Note that we cannot place this in the output directory, that would
# break the paths to the scripts.
export FISSILE_ROLE_MANIFEST="${PWD}/container-host-files/etc/scf/config/role-manifest.yml"
export FISSILE_LIGHT_OPINIONS="${PWD}/container-host-files/etc/scf/config/opinions.yml"
# Path to a BOSH deployment manifest that contains dark opinions
export FISSILE_DARK_OPINIONS="${PWD}/container-host-files/etc/scf/config/dark-opinions.yml"
# Path to a location where all fissile output is stored
# This will be ~/.fissile in vagrant
export FISSILE_WORK_DIR="${FISSILE_WORK_DIR:-${PWD}/output/fissile}"
# This is the location of the local BOSH cache
# You shouldn't need to override this
# This will be ~/.bosh/cache in vagrant
export FISSILE_CACHE_DIR="${FISSILE_CACHE_DIR:-${PWD}/output/bosh-cache}"
# Path where fissile stores the downloaded tarballs of final releases referenced in the role manifest.
export FISSILE_FINAL_RELEASES_DIR="${PWD}/container-host-files/etc/scf/config/.final_releases"
# Metrics for the build
export FISSILE_METRICS="${FISSILE_GIT_ROOT}/scf_metrics.csv"
# Path to fissile binary (not actually used by fissile)
export FISSILE_BINARY="${FISSILE_BINARY:-${PWD}/output/bin/fissile}"
mkdir -p "$(dirname "${FISSILE_BINARY}")"
PATH="$(dirname "${FISSILE_BINARY}")${PATH:+:${PATH}}"
export PATH
# This is the configuration base prefix
export FISSILE_CONFIG_PREFIX=scf
# We will persist compilation results to the VM here
export SCF_PACKAGE_COMPILATION_CACHE="${SCF_PACKAGE_COMPILATION_CACHE:-${PWD}/.fissile/compilation}"
# The following is for fish support: run this script as `bash $0 fish`, and it
# will print out the fish commands for you to source.
if test "${BASH_ARGV:+${BASH_ARGV[0]}}" = "fish" ; then
for var in $(env | grep -E '^(FISSILE_|SCF_)' | cut -d= -f1) ; do
echo "set -x ${var} '${!var}'"
done
fi
if ! type source_up >/dev/null 2>/dev/null; then
# Restore the variable from the start of the script
PWD="$(pwd)"
fi
FISSILE_DEFAULT_STEMCELL=${FISSILE_DOCKER_REGISTRY}${FISSILE_DOCKER_ORGANIZATION}/${FISSILE_DOCKER_REPO}:${FISSILE_STEMCELL_VERSION}
# The fissile stemcell image that is used as the base
export FISSILE_STEMCELL=${FISSILE_STEMCELL:-$FISSILE_DEFAULT_STEMCELL}
# fissile build kube|helm (output, env)
# The defaults are all for helm.
# The make/kube script performs overrides for kube output.
export FISSILE_AUTH_TYPE=rbac
export FISSILE_OUTPUT_DIR="${FISSILE_OUTPUT_DIR:-${PWD}/output/helm}"
export FISSILE_DEFAULTS_FILE=