Skip to content

Instantly share code, notes, and snippets.

View geekyfox90's full-sized avatar
🎯
Focusing

Yasser B. geekyfox90

🎯
Focusing
View GitHub Profile
variable "PLATFORMS" { default = "linux/amd64,linux/arm64" }
group "default" { targets = ["java","node","python"] } # add more tools
# Build the asdf base once
target "asdf-base" {
dockerfile = "Dockerfile.asdf"
context = "."
platforms = split(",", PLATFORMS)
}
import jenkins.model.Jenkins
import org.jenkinsci.plugins.workflow.job.WorkflowJob
import org.jenkinsci.plugins.workflow.job.WorkflowRun
import org.jenkinsci.plugins.workflow.flow.FlowExecution
import org.jenkinsci.plugins.workflow.graph.FlowNode
import org.jenkinsci.plugins.workflow.actions.WorkspaceAction
import org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject
import hudson.model.Run
import hudson.model.AbstractBuild
import hudson.model.FreeStyleBuild
@geekyfox90
geekyfox90 / list_jenkins_credentials.groovy
Created July 15, 2020 12:13
list jenkins credentials groovy
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
com.cloudbees.plugins.credentials.Credentials.class
)
for (c in creds) {
println(c.id)
if (c.properties.username) {
println(" description: " + c.description)
}
if (c.properties.username) {
@geekyfox90
geekyfox90 / example.yaml
Created March 21, 2020 13:14
example.yaml
mysub-chart:
servicename: mysubchart-service
@geekyfox90
geekyfox90 / deployment.yaml
Created March 21, 2020 12:33
deployment.yaml
...
env:
- name: SPECIAL_LEVEL_KEY
valueFrom:
configMapKeyRef:
name: backend-config
key: test
@geekyfox90
geekyfox90 / subchart-config.yaml
Last active March 21, 2020 12:33
subchart-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: subchart-config
data:
backend: "{{ .Values.backendEndpoint }}"
@geekyfox90
geekyfox90 / values.yaml
Last active March 21, 2020 12:22
values.yaml
# Default values for example.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
subchart:
backendEndpoint: "{{ .Release.Name}}.{{ .Release.Namespace}}:1337"
@geekyfox90
geekyfox90 / emoji-hpa
Created March 12, 2020 17:02
emoji-hpa
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: emoji-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: emoji
minReplicas: 1
@geekyfox90
geekyfox90 / prometheus-adapter
Created March 12, 2020 16:35
prometheus-adapter
prometheus:
url: http://linkerd-prometheus.linkerd.svc
rules:
default: false
custom:
- seriesQuery: 'response_latency_ms_bucket{namespace!="",pod!=""}'
resources:
template: <<.Resource>>
name:
@geekyfox90
geekyfox90 / prometheus-adapter-linkerd.yaml
Created March 9, 2020 18:36
Prometheus adapter configuration for Linkerd
prometheus:
url: http://linkerd-prometheus.linkerd.svc
rules:
default: false
custom:
- seriesQuery: 'response_latency_ms_bucket{namespace!="",pod!=""}'
resources:
template: <<.Resource>>
name: