Skip to content

Commit

Permalink
feat: support NO_COLOR (#99) update jenkins slack calls (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Schmidt authored Mar 9, 2022
1 parent a07e33a commit 7244220
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 40 deletions.
9 changes: 7 additions & 2 deletions bin/start_aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,14 @@ else
pulumi config set prometheus:adminpass -C ${script_dir}/../pulumi/python/config
fi

# Show colorful fun headers if the right utils are installed
# Show colorful fun headers if the right utils are installed and NO_COLOR is not set
#
function header() {
"${script_dir}"/../pulumi/python/venv/bin/fart --no_copy -f standard "$1" | "${script_dir}"/../pulumi/python/venv/bin/lolcat
if [ -v ${NO_COLOR} ]; then
"${script_dir}"/../pulumi/python/venv/bin/fart --no_copy -f standard "$1"
else
"${script_dir}"/../pulumi/python/venv/bin/fart --no_copy -f standard "$1" | "${script_dir}"/../pulumi/python/venv/bin/lolcat
fi
}

function add_kube_config() {
Expand Down
9 changes: 7 additions & 2 deletions bin/start_do.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,14 @@ else
pulumi config set prometheus:adminpass -C ${script_dir}/../pulumi/python/config
fi

# Show colorful fun headers if the right utils are installed
# Show colorful fun headers if the right utils are installed and NO_COLOR is not set
#
function header() {
"${script_dir}"/../pulumi/python/venv/bin/fart --no_copy -f standard "$1" | "${script_dir}"/../pulumi/python/venv/bin/lolcat
if [ -v ${NO_COLOR} ]; then
"${script_dir}"/../pulumi/python/venv/bin/fart --no_copy -f standard "$1"
else
"${script_dir}"/../pulumi/python/venv/bin/fart --no_copy -f standard "$1" | "${script_dir}"/../pulumi/python/venv/bin/lolcat
fi
}

function add_kube_config() {
Expand Down
9 changes: 7 additions & 2 deletions bin/start_kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,14 @@ echo "Configuring all Pulumi projects to use the stack: ${PULUMI_STACK}"
# Do not change the tools directory of add-ons.
find "${script_dir}/../pulumi" -mindepth 2 -maxdepth 6 -type f -name Pulumi.yaml -not -path "*/tools/*" -execdir pulumi stack select --create "${PULUMI_STACK}" \;

# Show colorful fun headers if the right utils are installed
# Show colorful fun headers if the right utils are installed and NO_COLOR is not set
#
function header() {
"${script_dir}"/../pulumi/python/venv/bin/fart --no_copy -f standard "$1" | "${script_dir}"/../pulumi/python/venv/bin/lolcat
if [ -v ${NO_COLOR} ]; then
"${script_dir}"/../pulumi/python/venv/bin/fart --no_copy -f standard "$1"
else
"${script_dir}"/../pulumi/python/venv/bin/fart --no_copy -f standard "$1" | "${script_dir}"/../pulumi/python/venv/bin/lolcat
fi
}

function retry() {
Expand Down
1 change: 1 addition & 0 deletions config/pulumi/Pulumi.stackname.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ config:
#
# kubernetes:infra_type: AWS
# kubernetes:infra_type: kubeconfig
# kubernetes:infra_type: DO
#
# NOTE: For kubernetes installations that are using the kubeconfig file, there are three
# other variables that need to be set. This includes the fully qualified path to the
Expand Down
7 changes: 1 addition & 6 deletions extras/jenkins/AWS/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pipeline {
AWS_SECRET_ACCESS_KEY = credentials('AWS_SECRET_ACCESS_KEY')
AWS_SESSION_TOKEN = credentials('AWS_SESSION_TOKEN')
NGINX_JWT = credentials('NGINX_JWT')
NO_COLOR = "TRUE"

}

Expand Down Expand Up @@ -189,12 +190,6 @@ pipeline {
}

post {
always {
/*
* We always notify via slack (configured in Jenkins).
*/
slackSend()
}
failure {

/*
Expand Down
7 changes: 1 addition & 6 deletions extras/jenkins/DigitalOcean/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pipeline {
environment {
DIGITALOCEAN_TOKEN = credentials('DO_TOKEN')
NGINX_JWT = credentials('NGINX_JWT')
NO_COLOR = "TRUE"
}
stages {

Expand Down Expand Up @@ -177,12 +178,6 @@ pipeline {

}
post {
always {
/*
* We always notify via slack (configured in Jenkins).
*/
slackSend()
}
failure {

/*
Expand Down
14 changes: 3 additions & 11 deletions extras/jenkins/K3S/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ pipeline {
*/

environment {
NGINX_JWT = credentials('NGINX_JWT')
POSTRUN_CMD = credentials('POSTRUN_CMD')
NGINX_JWT = credentials('NGINX_JWT')
POSTRUN_CMD = credentials('POSTRUN_CMD')
NO_COLOR = "TRUE"
}

stages {
Expand Down Expand Up @@ -213,15 +214,6 @@ pipeline {

}
post {
always {

/*
* We always notify via slack (configured in Jenkins).
*/

slackSend()
}

failure {

/*
Expand Down
14 changes: 3 additions & 11 deletions extras/jenkins/MicroK8s/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ pipeline {
*/

environment {
NGINX_JWT = credentials('NGINX_JWT')
POSTRUN_CMD = credentials('POSTRUN_CMD')
NGINX_JWT = credentials('NGINX_JWT')
POSTRUN_CMD = credentials('POSTRUN_CMD')
NO_COLOR = "TRUE"
}

stages {
Expand Down Expand Up @@ -218,15 +219,6 @@ pipeline {

}
post {
always {

/*
* We always notify via slack (configured in Jenkins).
*/

slackSend()
}

failure {

/*
Expand Down

0 comments on commit 7244220

Please # to comment.