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 | |
set -euo pipefail | |
PN_PKG='pneumatic-tubes' | |
mkdir -p "/tmp/${PN_PKG}" | |
cd "/tmp/${PN_PKG}" || exit 1 | |
if [ ! -e node_modules/.bin/npx ] | |
then |
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
# merge master changes into branch | |
git -c "user.name=Circle CI" -c "user.email=example@example.com" pull --no-edit --no-ff origin refs/heads/master | |
# Get changed directories, assuming each dir is an app, you could also do a for loop after to check for certain files which define those directories as apps, e.g. if [ -f "$APP/app.json" ] | |
CHANGED_APPS=$(git diff --name-status master..$(git symbolic-ref --short HEAD) | awk '{print $2}' | xargs basename) | |
# run builds for $CHANGED_APPS |
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
#!/usr/bin/env python3 | |
import json | |
def list_hook(pairs): | |
result = {} | |
for name, value in pairs: | |
if name in ('data', 'module', 'resource', 'provider', 'backend'): | |
result.setdefault(name, []).append(value) | |
else: |
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
#!/usr/bin/env python | |
import dateutil.parser | |
import operator | |
import pprint | |
import sys | |
with open(sys.argv[1]) as f: | |
log = f.readlines() |
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
define file_array() { | |
file { $name: | |
path => "$name", | |
ensure => file, | |
mode => '0644', | |
owner => 'root', | |
group => 'nagios', | |
} | |
} |
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 | |
if [ "$1" = "config" ]; then | |
echo '{}' | |
fi | |
>&2 echo "$*" | |
exit 0 |
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 | |
if [ "$1" = "config" ]; then | |
echo '{}' | |
fi | |
exit 0 |
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 | |
if (( $RANDOM % 2 )); then | |
>&2 echo 'Random failure' | |
exit 1 | |
fi | |
exit 0 |
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
git diff --name-status master..$(git symbolic-ref --short HEAD)|awk '{print $2}' |
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
diff --git a/Dockerfile.j2 b/Dockerfile.j2 | |
index 09f09f9..7ebbaad 100644 | |
--- a/Dockerfile.j2 | |
+++ b/Dockerfile.j2 | |
@@ -9,4 +9,6 @@ COPY . /srv/helloworld/code | |
RUN echo "{{ BUILD_REVISION }}" > version-info.txt | |
RUN rm -rf env | |
RUN pip install -U . | |
-CMD bin/confd -confdir etc/confd/ -log-level info -backend etcd -node http://etcd-client:2379 | |
+ENV HELLOWORLD_DB_HOST localhost |