To get oh-my-zsh
Append at the final of your
~/.zshrc
file the code bellow
function ocp_prompt_info() {
WILDCARD_DOMAIN=$(oc whoami --show-console 2> /dev/null | cut -d '.' -f2- | cut -d ':' -f1)
local result=''
#!/usr/bin/env bash | |
INPUT_ADOC=README.adoc | |
GIT_DATE=$(TZ=UTC git log -1 --pretty=format:%cd --date=format-local:%Y-%m-%d-%H-%M-%S) | |
# get customer short name | |
CUSTOMER_SHORT_NAME=$(sed -En 's/^:cust: (.*)/\1/p' vars/customer-vars.adoc) | |
CLEAN_CUSTOMER_SHORT_NAME=$(echo "${CUSTOMER_SHORT_NAME}" | sed 's/ /_/g') |
To get oh-my-zsh
Append at the final of your
~/.zshrc
file the code bellow
function ocp_prompt_info() {
WILDCARD_DOMAIN=$(oc whoami --show-console 2> /dev/null | cut -d '.' -f2- | cut -d ':' -f1)
local result=''
apiVersion: v1 | |
kind: Secret | |
metadata: | |
labels: | |
app: keycloak | |
keycloak: rhsso | |
name: credential-rhsso | |
namespace: my-namespace | |
stringData: | |
ADMIN_USERNAME: my-super-user |
openapi: 3.1.0 | |
info: | |
title: CIAM | |
contact: {} | |
version: '1.0' | |
jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/base | |
servers: | |
- url: https://develop.example.com | |
variables: {} | |
- url: https://stage.example.com |
URL_TMP=$(crc version 2>&1 | grep -oP 'has been published on\s\K.*') | |
TAR_FILE=~/tmp/crc-linux-amd64.tar.xz | |
OUTPUT_FILE=$(which crc) | |
if [ ! -z "$URL_TMP" ] | |
then | |
URL=${URL_TMP::-1} | |
echo "Downloading: ${URL}" | |
curl -L -o $TAR_FILE $URL |
WILDCARD_DOMAIN=$(oc whoami --show-console 2> /dev/null | cut -d '.' -f2- | cut -d ':' -f1) | |
NAME_KEYCOAK=admin-rhbk | |
SECRET_NAME=keycloak-admin-tls-secret | |
openssl req -subj "/CN=${NAME_KEYCOAK}.${WILDCARD_DOMAIN}/O=Test RHBK./C=BR" -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem | |
oc create secret tls ${SECRET_NAME} --cert certificate.pem --key key.pem | |
oc create route passthrough rhbk-dev-admin --service=rhbk-dev-service --port=https --hostname="${NAME_KEYCOAK}.${WILDCARD_DOMAIN}" | |
echo "created secret ${SECRET_NAME} for host: https://${NAME_KEYCOAK}.${WILDCARD_DOMAIN}" |
crc config set consent-telemetry no | |
crc config set cpus 12 | |
crc config set memory 30971 | |
crc config set kubeadmin-password xxxx |
--- | |
# Senha do banco de dados | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: database-secret | |
type: Opaque | |
stringData: | |
username: 'my-username' | |
password: 'my-pass' |
{ | |
"actions": [ | |
{ | |
"type": "command", | |
"label": "Send to VSCode", | |
"command_line": "code ${PWD}", | |
"use_shell": true, | |
"cwd": "%f", | |
"max_items": 1, | |
"filetypes": ["directory"] |
--- | |
apiVersion: tekton.dev/v1 | |
kind: Pipeline | |
metadata: | |
name: pipeline-agnostic | |
spec: | |
params: | |
- name: APP_NAME | |
type: string | |
default: 'react-openshift-example' |