This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export GRAFANA_API_TOKEN= | |
export GRAFANA_URL=https://grafana.local/api | |
mkdir -p dashboards | |
uids_out=$(curl -s -H "Authorization: Bearer $GRAFANA_API_TOKEN" -X GET "$GRAFANA_URL/search?query=&" | jq -r '.[] | select(.type == "dash-db") | .uid') | |
for uid in $(echo $uids_out); do | |
curl -H "Authorization: Bearer $GRAFANA_API_TOKEN" "$GRAFANA_URL/dashboards/uid/$uid" | jq -r > dashboards/${uid}.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hudson.model.* | |
import hudson.security.* | |
import hudson.tasks.Mailer | |
def instance = jenkins.model.Jenkins.instance | |
def user = instance.securityRealm.createAccount("username", "Amin12345#") | |
user.addProperty(new Mailer.UserProperty("[email protected]")); | |
user.setFullName("Full Name") | |
user.setDescription("Account via groovy generated") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
options { | |
disableConcurrentBuilds() | |
timestamps() | |
ansiColor('xterm') | |
} | |
parameters { | |
choice(choices: '[email protected]', description: 'The vcenter User ', name: 'VCENTER_USER') | |
password(description: 'Password for vCenter', name: 'VCENTER_PASSWORD') |