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
def set_job_properties() { | |
properties([ | |
[ | |
$class: 'BuildDiscarderProperty', | |
strategy: [ | |
$class: 'BuildRotator', | |
daysToKeep: 5, | |
numToKeep: 10, | |
artifactsDaysToKeep: 5, | |
artifactsNumToKeep: 10 |
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
// ghprb 1.29.2 | |
import java.lang.reflect.Field | |
import jenkins.model.* | |
import org.jenkinsci.plugins.ghprb.* | |
def descriptor = Jenkins.instance.getDescriptorByType(org.jenkinsci.plugins.ghprb.GhprbTrigger.DescriptorImpl.class) | |
Field auth = descriptor.class.getDeclaredField("githubAuth") | |
auth.setAccessible(true) |
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
stage('Download template') { | |
echo "\u001B[34m\u001B[1mDownloading template\u001B[0m" | |
script { | |
withCredentials([string(credentialsId: "${gitCredentialId}", variable: 'gitToken')]) { | |
sh ''' | |
#!/bin/bash | |
set -e | |
curl -s -X GET -H "Authorization: token '''+gitToken+'''" \ | |
-H "Accept: application/vnd.github.v3.raw" \ | |
'''+gitDownloadURL+''' -o '''+docxTemplate+''' |
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 static groovy.io.FileType.DIRECTORIES | |
@NonCPS | |
def traverseHelper() { | |
final excludeDirs = ['.git'] | |
def dirs = []; | |
new File("${WORKSPACE}").eachDir() { dir -> | |
if (dir.name in excludeDirs) return true else dirs.add(dir) | |
} | |
return dirs | |
} |
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 | |
for d in /sys/kernel/iommu_groups/*/devices/*; do | |
n=${d#*/iommu_groups/*}; n=${n%%/*} | |
printf 'IOMMU Group %s ' "$n" | |
lspci -nns "${d##*/}" | |
done |
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 groovy | |
pipeline { | |
agent { | |
node { | |
label 'master' | |
} | |
} | |
environment { | |
sshKey = UUID.randomUUID().toString() | |
sshId = "${sshKey}" |
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
### | |
# A Python script to extract data out of a DISA STIG Viewer xccdf file to a CSV | |
# @author Michael Joseph Walsh <[email protected]> | |
## | |
import csv | |
import glob | |
import os | |
import sys | |
import xml.etree.ElementTree as ET |
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
# http://inspec.io/docs/reference/resources/file/ | |
describe file('rebooted') do | |
its('content') { should match 'success' } | |
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
On Fri, Jun 26, 2015 at 10:18:27AM -0700, Alexander Morozov wrote: | |
There is no network section in spec now. We probably should have some. | |
For what it's worth, you can currently (48182db, 2015-07-07) just | |
use the host's network configuration with the following changes to the | |
stock config: | |
Add to mounts: | |
{ |
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
# will be further used by umoci to create an OCI complaint image | |
FROM debian:stable-slim AS rootfs | |
ARG WORKDIR=/opt/data | |
RUN apt-get update && \ | |
apt-get install --no-install-recommends -y ansible python-pip curl | |
# downloading and verifying umoci | |
FROM alpine:3.7 AS umoci | |
ARG UMOCI_URL=https://github.com/openSUSE/umoci/releases/download/v0.3.1/umoci.amd64 | |
ARG UMOCI_ASC=https://github.com/openSUSE/umoci/releases/download/v0.3.1/umoci.amd64.asc |
OlderNewer