Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: support NO_COLOR (#99) update jenkins slack calls #106

Merged
merged 4 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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