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
# | |
# Blog as a Service Pipeline | |
# - Author: Anthony Hawkins | |
# - Purpose: Automate the testing and deployment of my personal blog | |
# | |
# | |
# Name of the pipeline used to lookup pipeline configuration in pillar | |
# | |
{% set pipeline_name = pillar['pipeline_name'] %} |
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
pipelines: | |
blog: | |
# | |
# Where the Image will be built and tested | |
# | |
build_env: | |
minion: "build-box.c.slashfeed-145600.internal" | |
build_dir: "/tmp/build_space" | |
# | |
# Git Provider and Repo name - this is cloned |
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
#@ if data.values.environment in ['site-a', 'site-b', 'site-c']: | |
enable_x: true | |
#@ end |
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
{% if environment in ['site-a', 'site-b', 'site-c'] %} | |
enable_x: true | |
{%- endif %} |
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
#@ load("@ytt:struct", "struct") | |
#@ tiles = struct.decode(data.values.tiles) | |
#@ for tile in tiles: | |
- name: #@ "product-" + tile | |
type: pivnet | |
source: | |
api_token: pivnet_token | |
product_slug: image-slug | |
product_version: #@ tiles[tile]['ver'] | |
#@ end |
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
{% for tile, config in tiles.items() %} | |
- name: {{ "product-" + tile }} | |
type: pivnet | |
source: | |
api_token: pivnet_token | |
product_slug: image-slug | |
product_version: {{ config['ver'] }} | |
{% endfor %} |
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
{% macro do_bar() -%} | |
foo: bar | |
{% if environment == "site-a"%} | |
enable_x: true | |
{%- endif %} | |
{%- endmacro %} | |
... | |
- task: do_foo | |
config: | |
{{ do_foo() | indent(6)}} |
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
import json | |
import _jsonnet | |
jsonnet_str = ''' | |
{ | |
person1: { | |
name: "Alice", | |
welcome: "Hello " + self.name + "!", | |
}, | |
person2: self.person1 { |
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
resources: | |
- name: config-repo | |
type: git | |
source: | |
uri: ((git_repo_uri)) | |
branch: ((git_repo_branch)) | |
# only watch for changes in config directory | |
paths: ["ci", "((config_dir))"] | |
- name: cf-mgmt |
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
- name: update-org-users # Unique per job | |
plan: | |
- get: config-repo | |
passed: [create-orgs] # Different per each job | |
trigger: true | |
- get: cf-mgmt | |
- get: time-trigger # used for a few jobs, but not every job. | |
trigger: true | |
- task: update-org-users # unique per job | |
config: |
OlderNewer