Skip to content

Instantly share code, notes, and snippets.

View AronllStone's full-sized avatar
🏠
Working from home

Konstantin Apanchyonok AronllStone

🏠
Working from home
  • Minsk, Belarus
View GitHub Profile
@AronllStone
AronllStone / create_fileCredential.groovy
Created May 12, 2023 14:13
Example of the fileCredentials creation in Jenkins
import jenkins.model.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey
import org.jenkinsci.plugins.plaincredentials.StringCredentials
import org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl
instance = Jenkins.instance
domain = Domain.global()
@AronllStone
AronllStone / iap-enable.sh
Last active August 1, 2022 14:57
This script allows to create IAP client and enable IAP auth on necessary backend services
#!/usr/bin/env bash
set -e
HELP="
NAME
$0 - turning on IAP policy for WEB backend services
USAGE
Usage: $0 [ -org ORGANIZATION ] [ -env ENVIRONMENT ] [ -key OAUTH_SECRET_KEY ] [ -id OAUTH_ID ]