The following snippet contains an example for GoLang Generics for Structs:
package main
import "fmt"
// Structs definition
type ObjectOne struct {
Name string `json:"name"`
// Source: https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-masters/how-to-generate-change-an-apitoken | |
import hudson.model.* | |
import jenkins.model.* | |
import jenkins.security.* | |
import jenkins.security.apitoken.* | |
// script parameters | |
def userName = 'admin' | |
def tokenName = 'token' |
The following snippet contains an example for GoLang Generics for Structs:
package main
import "fmt"
// Structs definition
type ObjectOne struct {
Name string `json:"name"`
format.txt
file with the following content:time_namelookup: %{time_namelookup}s\n
time_connect: %{time_connect}s\n
time_appconnect: %{time_appconnect}s\n
time_pretransfer: %{time_pretransfer}s\n
time_redirect: %{time_redirect}s\n
time_starttransfer: %{time_starttransfer}s\n
----------\n
#!/usr/bin/python | |
import os | |
import stashy | |
projects = [ | |
"PROJ-1", | |
"PROJ-2", | |
"PROJ-3", | |
] |
from requests import get | |
from sys import argv, exit | |
from os import environ | |
from requests.models import HTTPBasicAuth | |
def main(): | |
if len(argv) < 3: | |
print('invalid input, expected arguments: `python3.9 script.py <account-name> <search-string>`') | |
exit(1) |
import jenkins.* | |
import jenkins.model.* | |
import hudson.* | |
import hudson.model.* | |
def jenkinsCredentials = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials( | |
com.cloudbees.plugins.credentials.Credentials.class, | |
Jenkins.instance, | |
null, | |
null |
This script will list all active repositories in an organization with GitHub Actions workflows.
repo
scope and replace <TOKEN>
<ORGANIZATION>
with your organizaiton name#!/bin/sh
token="<TOKEN>"
#!/usr/bin/env bash | |
CYAN='\033[0;36m' | |
RED='\033[0;31m' | |
NOCOLOR='\033[0m' | |
function log { | |
echo -e "${CYAN}INFO${NOCOLOR} $*" | |
} | |
function logerror { |