I hereby claim:
- I am onuralp on github.
- I am onuralptaner (https://keybase.io/onuralptaner) on keybase.
- I have a public key whose fingerprint is BABA 6DF2 F454 EE1B F9E1 CFD5 742B 2458 45D4 5416
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| set -e | |
| # Gets a marvel-charecter slug | |
| NAME=$(marvel-characters) | |
| # For MacOS | |
| echo "$NAME" | iconv -t ascii//TRANSLIT | sed -E s/[^a-zA-Z0-9]+/-/g | sed -E s/^-+\|-+$//g | tr A-Z a-z |
| # update | |
| sudo apt-get update | |
| sudo apt-get -qq update | |
| # Install kubectl | |
| sudo curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl | |
| sudo chmod +x ./kubectl | |
| sudo mv ./kubectl /usr/local/bin/kubectl | |
| # Install kubectx (Switch between Kubernetes contexts/namespaces) |
| #!groovy | |
| // I suggest you to add those functions as Shared Library https://jenkins.io/doc/book/pipeline/shared-libraries/ | |
| @Library('your-shared-lib') _ | |
| pipeline { | |
| stages { | |
| //.. | |
| stage('Run Unit Tests') { | |
| steps { |
| #!/bin/bash | |
| echo xxxxxxxxxxxxxxxxxxxxxx Updating Retention Policies xxxxxxxxxxxxxxxxxxxxxx | |
| RETENTION_IN_DAYS=14 | |
| AWS_REGION=us-west-2 | |
| LOG_GROUPS=$(aws logs describe-log-groups --region $AWS_REGION | jq --raw-output '.logGroups|.[]?|.logGroupName') | |
| for logGroup in $LOG_GROUPS | |
| do | |
| echo EXECUTING: "Updating retention policy for ${logGroup} with ${RETENTION_IN_DAYS} day(s)" |