Skip to content

Instantly share code, notes, and snippets.

@caarlos0
caarlos0 / list-git-branches.groovy
Last active October 13, 2023 12:12 — forked from ThabetAmer/list-git-branches.groovy
Jenkins Groovy script to read Git repo branches and list them in an array, can be suited with Active Choice Jenkins Plugin
#!/usr/bin/env groovy
/**
* List all Git branches of a repo.
* @author thabet.amer@gmail.com
* @since Jenkins 2.204.1
* @params String url for Git repo URL, String credentialID, Bool activeChoice if ActiveChoice plugin used, String defaultBranch
* @return String array of branch names
*
* Dependencies:
@caarlos0
caarlos0 / .goreleaser.yaml
Created March 26, 2022 02:06
reproducible builds with goreleaser
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
mod_timestamp: '{{ .CommitTimestamp }}'
name: goreleaser
on:
push:
tags:
- '*'
permissions:
contents: write
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/Project",
"definitions": {
"Announce": {
"properties": {
"twitter": {
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/Twitter"
}

GoReleaser Contributor License Agreement

I give GoReleaser permission to license my contributions on any terms they like. I am giving them this license in order to make it possible for them to accept my contributions into their project.

As far as the law allows, my contributions come as is, without any warranty or condition, and I will not be liable to anyone for any damages related to this software or this license, under any kind of legal claim.

#!/bin/sh
for size in XL XXL XS S M L; do
curl -sf -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/kubernetes/kubernetes/labels/size/$size" |
jq '. | { "name": .name, "color": .color, "description": .description }' |
curl -sfXPOST -d @- -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/$REPO/labels
done
@caarlos0
caarlos0 / five.md
Created November 26, 2019 01:47 — forked from mfridman/five.md
top 5 most common .goreleaser files

10666361bf2ddb7070c9ea6756b1e8ce327a9edb

8 found

builds:
  # List of builds
  - # First Build
    env:
    - CGO_ENABLED=0
@caarlos0
caarlos0 / top-50.md
Created November 26, 2019 01:45 — forked from mfridman/top-50.md
top 50 project (by stars) using goreleaser
@caarlos0
caarlos0 / clone-all-org-repos.rb
Created November 26, 2015 18:48
Clone all repositories in any given organization.
# clone-all-org-repos.rb
#
# Clone all repositories in any given organization.
#
# Dependencies:
# - octokit
# - celluloid
#
# Usage:
# TOKEN="your-token" ruby clone-all-org-repos.rb TheOrganizationName
prometheus-operator:
kubelet:
serviceMonitor:
metricRelabelings:
- sourceLabels: ["__name__"]
regex: 'storage_operation.*'
action: drop
cAdvisorMetricRelabelings:
- sourceLabels: ["__name__"]
regex: '(container_network_tcp.*|container_network_udp.*|container_fs_.*|container_tasks_state.*|container_memory_failures_total|.*swap.*)'