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 groovy | |
| /** | |
| * Fails the pipeline if project quality doesn't meet the configured quality profile (see https://docs.sonarqube.org/display/SONAR/Quality+Gates AND https://docs.sonarqube.org/display/SONAR/Quality+Profiles). | |
| * This DSL function must be invoked after the quality analisys has been published. Example: | |
| * | |
| * stage('sonar') { | |
| * steps { | |
| * withSonarQubeEnv('sonar') { //there must be a tool named 'sonar' configured on Jenkins (/jenkins/configureTools) | |
| * sh 'mvn sonar:sonar' //publish project quality on sonar |
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
| # Build with: | |
| # docker build -t entrypoint . | |
| FROM alpine | |
| COPY verify.sh ./ | |
| RUN chmod +x verify.sh | |
| ENTRYPOINT ["./verify.sh"] | |
| CMD ["sh"] |
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
| #!/bin/sh | |
| # based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
| # delete all evicted pods from all namespaces | |
| kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
| # delete all containers in ImagePullBackOff state from all namespaces | |
| kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
| # delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces |
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
| #!/bin/sh | |
| # based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
| # delete all evicted pods from all namespaces | |
| kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
| # delete all containers in ImagePullBackOff state from all namespaces | |
| kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
| # delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces |
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
| #!groovy | |
| import groovy.json.JsonOutput | |
| import groovy.json.JsonSlurper | |
| def label = "mypod-${UUID.randomUUID().toString()}" | |
| podTemplate(label: label, yaml: """ | |
| spec: | |
| containers: | |
| - name: mvn | |
| image: maven:3.3.9-jdk-8-alpine |
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
| #!/home/drspock/scripts/FBInvite/bin/python | |
| import argparse | |
| import requests | |
| import pyquery | |
| def login(session, email, password): | |
| ''' | |
| Attempt to login to Facebook. Returns user ID, xs token and |
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
| #!/home/drspock/scripts/FBInvite/bin/python | |
| import argparse | |
| import requests | |
| import pyquery | |
| def login(session, email, password): | |
| ''' | |
| Attempt to login to Facebook. Returns user ID, xs token and |