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
| // get handle to build output | |
| def config = new HashMap() | |
| def bindings = getBinding() | |
| config.putAll(bindings.getVariables()) | |
| def out = config['out'] | |
| for (aSlave in hudson.model.Hudson.instance.slaves) { | |
| // check if executor is dead | |
| execList = aSlave.getComputer().getExecutors() | |
| for( exec in execList ) { |
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
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: nginx-medium | |
| spec: | |
| replicas: 3 | |
| template: | |
| metadata: | |
| labels: | |
| service: webserver |
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
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| name: nginx-yazi | |
| spec: | |
| replicas: 3 | |
| selector: | |
| matchLabels: | |
| service: http-server | |
| strategy: |
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
| jenkins: | |
| location: | |
| url: http://jenkins.xxx | |
| clouds: | |
| - kubernetes: | |
| name: kubernetes | |
| skipTlsVerify: | |
| containerCapStr: 100 | |
| jenkinsUrl: http://jenkins.xxx |
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
| jenkins: | |
| location: | |
| url: https://a.a.a.com:8080 |
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
| version: '3.3' | |
| services: | |
| #jnlp-agent: | |
| # depends_on: | |
| # - jenkins | |
| # image: jenkins/jnlp-slave | |
| # command: -url http://jenkins:8080 | |
| # restart: always | |
| # environment: |
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
| jenkins: | |
| location: | |
| url: a.a.a.a:com | |
| systemMessage: "Welcome to the demo setup for Jenkins Configuration as Code plugin. For more information look in the official repo with our demo setup: https://github.com/Praqma/praqma-jenkins-casc" | |
| securityRealm: | |
| local: | |
| allowsSignup: false | |
| users: | |
| - id: demoAdmin | |
| password: ${adminpw:-passw0rd} |
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
| jenkins: | |
| location: | |
| url: http://jenkins/ |
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
| jenkins: | |
| securityRealm: null | |
| authorizationStrategy: Unsecured | |
| clouds: | |
| - kubernetes: | |
| name: kubernetes | |
| serverUrl: asdsada | |
| namespace: aa123 |
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
| def updateConfigMap(self): | |
| readToken = open("/var/run/secrets/kubernetes.io/serviceaccount/token").read() | |
| token = "Bearer {}".format(readToken) | |
| headers = {"Content-Type": "application/merge-patch+json", "authorization":token} | |
| r = requests.patch("{}/api/v1/namespaces/default/configmaps/nginx".format(self.kubernetes_master), verify=False, headers=headers, json=self.configData) | |
| return r.content |