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
""" | |
Store this file as `vars_plugins/password_from_keyring.py` and specify the | |
following in `ansible.cfg`: | |
``` | |
[defaults] | |
vars_plugins=./vars_plugins | |
``` | |
In your inventory specify: |
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
#!/usr/bin/env python | |
import logging | |
def _post_message(message): | |
""" | |
Will not create a logging message but emit a warning: No handlers could be found for logger "simple_logger" | |
""" | |
logging.getLogger("simple_logger").warn(message) | |
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
#!/bin/sh | |
# Small shell script which will read the GIT scm connection and ciManagement URL | |
# from a POM and trigger the poll of jobs in a Jenkins instance. | |
# SED-Voodoo via http://www.grymoire.com/Unix/Sed.html | |
# | |
# Note that you have do run this once online to get all needed dependencies for | |
# help plugin. Afterwards you may invoke this with "--offline" or "-o" for speed. | |
GOAL="org.apache.maven.plugins:maven-help-plugin:2.2:evaluate" | |
BASEURL="`mvn $@ $GOAL -Dexpression=project.ciManagement.url | sed -n '\,/job/, s,\(.*\)\/job\/.*,\1/git/notifyCommit?url=,p'`" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.apache.commons</groupId> | |
<artifactId>commons-io</artifactId> | |
<version>1.3.2</version> | |
<distributionManagement> | |
<relocation> | |
<groupId>commons-io</groupId> | |
<artifactId>commons-io</artifactId> |
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
#!/usr/bin/python | |
""" | |
Simple restarter for jenkins - not a real Tanuki wrapper :-). | |
- Install to /usr/local/bin and make the script executable. | |
- Then create a cron entry to execute the script every 10 minutes: | |
cat << EOF > /etc/cron.d/restartjenkins | |
*/10 * * * * root /usr/local/bin/restartjenkins.py 2>&1 | logger -t restartjenkins | |
EOF | |
""" | |
import os |
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
<plugin> | |
<artifactId>maven-antrun-plugin</artifactId> | |
<version>1.4</version> | |
<executions> | |
<execution> | |
<phase>validate</phase> | |
<configuration> | |
<tasks> | |
<exec | |
executable="git" |