jenkins-stats.py is used to generate statics for jenkins server, so far it display the plugin's usage in each job, see related stackoverflow question:how can I know whether the plugin is used by any jobs in jenkins
python-requests module is required
| --- | |
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: nginx | |
| spec: | |
| containers: | |
| - name: nginx | |
| image: nginx | |
| ports: |
jenkins-stats.py is used to generate statics for jenkins server, so far it display the plugin's usage in each job, see related stackoverflow question:how can I know whether the plugin is used by any jobs in jenkins
python-requests module is required
| import socket | |
| from BaseHTTPServer import HTTPServer | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| class MyHandler(SimpleHTTPRequestHandler): | |
| def do_GET(self): | |
| if self.path == '/ip': | |
| self.send_response(200) | |
| self.send_header('Content-type', 'text/html') | |
| self.end_headers() |
| apiVersion: argoproj.io/v1alpha1 | |
| kind: WorkflowTemplate | |
| metadata: | |
| name: hello-world-at-v0.1.0 | |
| spec: | |
| templates: | |
| - name: hello-world | |
| inputs: | |
| parameters: | |
| - name: msg |
It is for discussiion in argo-workflows forum
It is just my understanding now, can be totally wrong ;-)
Here gives a short explanation for user wants to use argo workflow as alternative for your CI framework (gitlab-ci, github actions, travis-ci, jenkins)
argo workflow is not a complete CI solution, it needs other compoments to fullfil your tasks. it is cloud native workflow execution engine
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import argparse | |
| import requests | |
| import json | |
| import re | |
| # https://stackoverflow.com/questions/27981545/suppress-insecurerequestwarning-unverified-https-request-is-being-made-in-pytho | |
| from requests.packages.urllib3.exceptions import InsecureRequestWarning |
6.西交一队 3.成中医二队 11.西交二队 7.地鼠队 14.混合队 8.南通大学队 5.龙岩学院二队 1.中山大学队 2.成中医一队 4.龙岩学院一队 13.绵阳师范学院队 9.西交三队 10.华南农业大学队 12.武汉大学队
Learn REST API with Python script, slides : http://www.slideshare.net/larrycai/learn-rest-apiwithpython
REST/JSON is perfect match to fetch web data, and python requests module
curl and browser to access http://httpbin.org/getrequests module and try to access http://httpbin.org/get in python interactive module, print r.json()restapi.py as base to implement access data in script| apiVersion: v1 | |
| data: | |
| "3306": mysql/mysql-service:3306 | |
| kind: ConfigMap | |
| metadata: | |
| name: tcp-services | |
| namespace: ingress-nginx |
| apiVersion: extensions/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| annotations: | |
| kubernetes.io/ingress.class: nginx | |
| ingress.kubernetes.io/force-ssl-redirect: "true" | |
| nginx.ingress.kubernetes.io/server-alias: mysql.<YOUR_DOMAIN>.com | |
| labels: | |
| app: mysql | |
| name: mysql |