Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
| MAX_BUILDS = 5 | |
| MAX_ENV_BUILDS = 2 | |
| Jenkins.instance.getAllItems(org.jenkinsci.plugins.workflow.job.WorkflowJob.class).each { it -> | |
| def job = Jenkins.instance.getItemByFullName(it.fullName, Job.class) | |
| def limit = (it.fullName =~ /^environment/) ? MAX_ENV_BUILDS : MAX_BUILDS | |
| def recent = job.getBuilds().limit(limit) | |
| println "Processing job " + it.fullName + " " + it.class + " BuildCount: " + job.getBuilds().size() + " Limit: " + limit | |
| # this script uses syntax for bitbucket server. | |
| # For bitbucket cloud see https://confluence.atlassian.com/bitbucket/use-the-bitbucket-cloud-rest-apis-222724129.html | |
| # | |
| # Note: replace username, password and PROJECTNAME with your values | |
| USERNAME=xxxx | |
| PASSWORD=xxxx | |
| PROJECTNAME=xxxxx | |
| # jq syntax helpful links: |
| # cat /etc/fail2ban/filter.d/gitlab.conf | |
| # fail2ban filter configuration for gitlab | |
| # Author: Pawel Chmielinski | |
| [Init] | |
| maxlines = 6 | |
| [Definition] | |
| # The relevant log file is in /var/log/gitlab/gitlab-rails/production.log |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <opml version="1.0"> | |
| <head> | |
| <title>Stephen subscriptions in feedly Cloud</title> | |
| </head> | |
| <body> | |
| <outline text="Companies" title="Companies"> | |
| <outline type="rss" text="Trello" title="Trello" xmlUrl="https://trello.engineering/feed.xml" htmlUrl="http://tech.trello.com/"/> | |
| <outline type="rss" text="IMVU" title="IMVU" xmlUrl="http://engineering.imvu.com/feed/" htmlUrl="https://engineering.imvu.com"/> |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
| configure { | |
| it / 'publishers' / 'jenkins.plugins.slack.SlackNotifier'(plugin: "slack@2.0.1") { | |
| teamDomain('myteam') | |
| authToken('mytoken') | |
| buildServerUrl('http://mydomain:8080/') | |
| room('#my-room') | |
| notifyUnstable(true) | |
| notifyFailure(true) | |
| notifyBackToNormal(true) | |
| includeTestSummary(true) |
Bash is the JavaScript of systems programming. Although in some cases it's better to use a systems language like C or Go, Bash is an ideal systems language for smaller POSIX-oriented or command line tasks. Here's three quick reasons why:
This document is how I write Bash and how I'd like collaborators to write Bash with me in my open source projects. It's based on a lot of experience and time collecting best practices. Most of them come from these two articles, but here integrated, slightly modified, and focusing on the most bang for buck items. Plus some ne