Use Python to:
- send a plain text email
- send an email with attachment
- receive and filter emails according to some criteria
| [Trigger] | |
| Operation = Remove | |
| Type = Package | |
| Target = * | |
| [Action] | |
| Description = Clearing cache... | |
| When = PostTransaction | |
| Exec = /home/<user>/.local/bin/tools/removehook |
| #------------ bootstrap the cluster nodes -------------------- | |
| start_cmd='redis-server --port 6379 --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --appendonly yes' | |
| redis_image='redis:5.0-rc' | |
| network_name='redis_cluster_net' | |
| docker network create $network_name | |
| echo $network_name " created" | |
| #---------- create the cluster ------------------------ |
Use Python to:
| <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/maven-v4_0_0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>group</groupId> | |
| <artifactId>dummy</artifactId> | |
| <name>Dummy Project</name> | |
| <version>1.0.12</version> | |
| <packaging>pom</packaging> | |
| <scm> | |
| <connection>scm:git:https://......</connection> | |
| <tag>HEAD</tag> |
| // Check if a slave has < 10 GB of free space, wipe out workspaces if it does | |
| import hudson.model.*; | |
| import hudson.util.*; | |
| import jenkins.model.*; | |
| import hudson.FilePath.FileCallable; | |
| import hudson.slaves.OfflineCause; | |
| import hudson.node_monitors.*; | |
| for (node in Jenkins.instance.nodes) { |
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| public class PingIP { | |
| public static void runSystemCommand(String command) { | |
| try { | |
| Process p = Runtime.getRuntime().exec(command); | |
| BufferedReader inputStream = new BufferedReader( |
| <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>com.projectboard</groupId> | |
| <artifactId>projectboard</artifactId> | |
| <version>1.0-SNAPSHOT</version> | |
| <packaging>war</packaging> | |
| <name>Project Board</name> | |
| <description>Project management dashboard.</description> |