Skip to content

Commit

Permalink
feat: make env unde db consistent with app (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
basejump authored Jul 31, 2021
1 parent fe566d5 commit 0b6ecb0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/docmark
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function docmark.shell {
docker.start "$DOCMARK_DOCKER_NAME" --rm -it \
--entrypoint /bin/bash \
-p 8000:8000 \
-v "$(pwd)":/project:delegated \
-v "$(pwd)":/project \
-e GITHUB_TOKEN="${GITHUB_TOKEN}" \
"$DOCMARK_DOCKER_IMAGE"

Expand Down
6 changes: 0 additions & 6 deletions bin/init_env
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ function circle_init_env {
fi
}



# if it has a DBMS then this kicks in the db related variables
function init_db_env {
if [ ! "${DBMS:-}" ]; then
Expand All @@ -158,10 +156,6 @@ function init_db_env {
# arg $1 must always be the database, defaults to mysql if nothing specified
setVar DBMS "$DBMS"
setVar DOCK_DB_BUILD_NAME "$DBMS-build"
: "${DB_VERSION:=$VERSIONX}"
: "${DOCKER_DB_REPO:=dock9/nine-db}"
: "${DOCKER_DB_TAG:=${DBMS}-${DB_VERSION}}"
setVar DOCKER_DB_URL "$DOCKER_DB_REPO:$DOCKER_DB_TAG"

# **** DB Vars (MYSQL by default) ****
setVar DB_HOST 127.0.0.1
Expand Down
6 changes: 4 additions & 2 deletions makefiles/docmark.make
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ GROOVYDOC_BUILD_DIR ?= $(BUILD_DIR)/docs/groovydoc
# --- Dockers ---

## serves the docmark docs from docker, alias to docker.dockmark-up
docmark.start: | _verify-DOCKER_CMD
make docker.dockmark-$(DOCKER_CMD)
docmark.start: docker.dockmark-up

## serves the docmark docs from docker, alias to docker.dockmark-up
docmark.shell: docker.dockmark-shell

## docker for docmark docs, follow with a docker cmd up, down, shell or pull
docker.dockmark: | _verify-DOCKER_CMD
Expand Down
7 changes: 7 additions & 0 deletions makefiles/kubectl-config.make
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ kubectl.config: | _verify_K8_SERVER _verify_K8_USER _verify_K8_TOKEN
echo "$@ success"

.PHONY: kubectl.config

kubectl.get-contexts:
kubectl config get-contexts

kubectl.use-context.%:
kubectl config use-context $*

4 changes: 3 additions & 1 deletion makefiles/secrets.make
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(GIT_SECRET_SH):
cd $(SHIPKIT_INSTALLS)/git-secret && make build

secrets.decrypt-vault: secrets.import-gpg-key $(GIT_SECRET_SH) | _verify_VAULT_URL _verify_GPG_PASS
@[ ! -e $(VAULT_DIR) ] && git clone $(VAULT_URL) $(VAULT_DIR) || :;
[ ! -e $(VAULT_DIR) ] && git clone $(VAULT_URL) $(VAULT_DIR) || :;
cd build/vault && $(GIT_SECRET_SH) reveal -p "$(GPG_PASS)"

secrets.import-gpg-key: | _verify_BOT_EMAIL
Expand All @@ -36,6 +36,8 @@ secrets.help:
echo "$(ccyan)secrets.list $(cnormal)| list files and authorized users"
echo "$(ccyan)secrets.clean $(cnormal)| removes all the hidden files"
echo
echo -e "${cbold}If using a gir repo as a vault linked the VAULT_URL variable then\n"
echo "$(ccyan)secrets.decrypt-vault $(cnormal)| clone in VAULT_DIR and decrypt/reveal. bot.env here is used in other shipkit scripts"

# Shows the git-secret version
secrets.show-version: $(GIT_SECRET_SH)
Expand Down

0 comments on commit 0b6ecb0

Please sign in to comment.