This file contains 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/bash | |
# Input: ./extract_kubecfg_cert.sh my-cluster-name username | |
# Output: ./my-cluster-name-ca.crt ./username.crt ./username.key | |
# Exit on error | |
abort(){ | |
echo $1 && exit 1 | |
} | |
# Prerequistes |
This file contains 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: v1 | |
kind: Service | |
metadata: | |
name: the-validator | |
namespace: img-validation | |
labels: | |
name: the-validator | |
spec: | |
ports: |
This file contains 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
from __future__ import print_function | |
from flask import Flask, request, jsonify | |
import ssl | |
import sys | |
from container_utils import check_image, get_allowed_list | |
app = Flask(__name__) | |
@app.route("/validate", methods=["POST"]) |
This file contains 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
server { | |
listen 443; | |
ssl on; | |
server_name mysite.com; | |
proxy_ssl_server_name on; | |
ssl_certificate /etc/nginx/certs/mysite.com.crt; |
This file contains 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 | |
get_current_branch(){ | |
export BRANCH=$(git branch --show-current) | |
} | |
check_remote_master(){ | |
git log ${BRANCH} --pretty=format:'%h' > /tmp/local_branch | |
git fetch --all | |
git log origin/master --pretty=format:'%h' > /tmp/remote_master |
This file contains 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
unclassified: | |
globalLibraries: | |
libraries: | |
- name: "awesome-lib" | |
retriever: | |
modernSCM: | |
scm: | |
git: | |
remote: "https://github.com/jenkins-infra/pipeline-library.git" |
This file contains 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
jobs: | |
- script: > | |
pipelineJob('default-agent') { | |
definition { | |
cps { | |
script("""\ | |
pipeline { | |
agent any | |
stages { |
This file contains 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: deployment-first | |
spec: | |
replicas: 2 | |
template: | |
metadata: | |
labels: |
This file contains 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: autoscaling/v2beta1 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: podinfo | |
spec: | |
scaleTargetRef: | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
name: deployment-first |
This file contains 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: apps/v1 | |
kind: Deployment | |
metadata: | |
name: af-deployment | |
labels: | |
app: nginx | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: |
NewerOlder