- add each job via scm to Jenkins (named as job1 and job2 -> job1.Jenkinsfile has 'job2' defined as jobname
- enable 'GitHub hook trigger for GITScm polling' on job1
- set pipeline repo of job1 to match only releases (= tags/*):
Pipeline.Definition.SCM.Git.Repositories.Refspec:'+refs/tags/v*':'refs/remotes/origin/tags/v*'
Pipeline.Definition.SCM.Git.BranchesToBuild.BranchSpecifier:**/tags/v**
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
| module git.i.mercedes-benz.com/mlechel/test | |
| go 1.22.1 | |
| require github.com/mikefarah/yq/v4 v4.43.1 | |
| require ( | |
| github.com/a8m/envsubst v1.4.2 // indirect | |
| github.com/alecthomas/participle/v2 v2.1.1 // indirect | |
| github.com/dimchansky/utfbom v1.1.1 // indirect |
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
| ssh_keys=/home/ml/.ssh_hidden/id_rsa,/home/ml/.ssh_hidden/id_rsa_other | |
| for ssh_key in $(echo $ssh_keys | sed "s/,/ /g") | |
| do | |
| if ! ssh-add -l | grep "$ssh_key" > /dev/null; then | |
| ssh-add "$ssh_key" | |
| fi | |
| done |
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
| docker network create --driver=overlay proxy | |
| docker stack deploy -c traefik.yml traefik | |
| docker stack deploy -c wai.yml whoami | |
| docker service scale whoami_whoami=10 |
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
| - name: list2dict | |
| hosts: all | |
| vars: | |
| container_dict: {} | |
| tasks: | |
| - name: get container info | |
| docker_container_info: | |
| name: "nginx" | |
| register: result |
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
| --- | |
| - name: concatenate list elements of dictionary | |
| hosts: all | |
| gather_facts: no | |
| vars: | |
| users: | |
| - username: alice | |
| email: [email protected] | |
| - username: bob | |
| email: [email protected] |
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
| from jira import JIRA | |
| import sys | |
| import json | |
| import requests | |
| import urllib3 | |
| urllib3.disable_warnings() | |
| JIRA_USERNAME="your-username" | |
| JIRA_PASSWORD="your-password" |
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
| # run command on every container | |
| for container in `docker ps --format '{{.Names}}'`; do printf "$container\t$(docker exec $container date)\n"; done |
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: | |
| traefik: | |
| image: "traefik:2.0.5" | |
| container_name: "traefik" | |
| command: | |
| - "--log.level=DEBUG" | |
| - "--api.insecure=true" |
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
| FROM nginx | |
| HEALTHCHECK --interval=5s --timeout=3s CMD wget -q -O - localhost:8080 |
NewerOlder