Contents by David Walton and Marco Hladik. Edited and compiled by Marco Hladik.
Last updated: 10th August 2018, 9:21 PM GMT
def environments = ["development", "staging", "production"] | |
stage("deploy to multiple environments") { | |
def deployments = [:] | |
environments.each { e -> | |
deployments[e] = { | |
stage(e) { | |
podTemplate(yaml: """\ | |
apiVersion: v1 | |
kind: Pod |
{%- set grns = salt.saltutil.runner('cache.grains', tgt='serv*') %} | |
{%- for id, grn in grns.items()|sort %} | |
{%- set role = id[3:6] %} | |
address: {{ grn.ip4_interfaces.eth0[0] | default("127.0.0.1") }} | |
{%- endfor %} |
import yaml | |
from copy import copy, deepcopy | |
from yaml.nodes import MappingNode | |
from yaml.loader import Loader | |
from yaml.constructor import SafeConstructor | |
# Copyright Ferry Boender, released under the MIT license. | |
def deepupdate(tgt, src): |
{ | |
"clients": { | |
"pyls": { | |
"command": [ | |
"~/.environments/pyls/bin/pyls" | |
], | |
"enabled": false, | |
"settings": { | |
"pyls": { | |
"plugins": { |
%YAML 1.2 | |
--- | |
# http://www.sublimetext.com/docs/3/syntax.html | |
name: effectinfo | |
file_extensions: | |
- txt | |
scope: source.effectinfo | |
variables: |
import os | |
import hashlib | |
from zipfile import ZipFile, BadZipFile | |
from datetime import datetime | |
from vgio.quake.pak import PakFile, BadPakFile # https://github.com/joshuaskelly/vgio/ <3 | |
from typing import Union, BinaryIO | |
def get_digest(b): | |
"""Calculate the SHA256 hash of the bytes""" |
// Game: Quake | |
// Format: Standard | |
// entity 0 | |
{ | |
"classname" "worldspawn" | |
"_tb_mod" "src;progs_dump" | |
"_tb_def" "external:/home/james/.darkplaces/hipnotic/maps/src/hipnotic.fgd" | |
"wad" "/home/james/.darkplaces/id1/maps/src/prototype.wad" | |
// brush 0 | |
{ |
//====================================================================== | |
// PARTICLE DEF file | |
// | |
// MOD : AD v1.70 - (Arcane Dimensions) | |
// Date : 1st August 2017 | |
// Author : Simon "Sock" OCallaghan | |
// Website: www.simonoc.com | |
// | |
//====================================================================== | |
// SHOTGUN |
#!jinja|yaml|gpg | |
{%- macro sjoin(items, sep=joiner(','), suffix='', prefix='') %} | |
{%- for item in items %}{{ sep() }}{{ prefix }}{{ item }}{{ suffix }}{% endfor %} | |
{%- endmacro %} | |
domain: my.example.com |