console.log
# insert log here
[Unit] | |
Description=Logstash | |
Documentation=https://www.elastic.co/products/logstash | |
After=network.target | |
ConditionPathExists=/etc/logstash.conf | |
[Service] | |
ExecStart=/opt/logstash/bin/logstash agent -f /etc/logstash.conf | |
[Install] |
// this currently is restricted on OpenShift Online, however is possible on OSD/OCP clusters | |
// we create a dotnet builder pod using the provided jenkins slave image for executing dotnet commands in | |
podTemplate( | |
label: 'dotnet-build-pod', cloud: 'openshift', | |
containers: [ | |
containerTemplate( | |
name: 'dotnet-build-pod', image: 'registry.access.redhat.com/dotnet/dotnet-20-jenkins-slave-rhel7:latest' | |
) | |
]) { | |
node('dotnet-build-pod-x') { |
# insert log here
This document details a simple RPM build flow pattern used to build and host RPM artifacts for open source projects. The below is a visual summary of this flow.
In order to achieve this multiple tools and services are used. The services and their purpose in the flow is as listed below.
Service | Purpose |
---|---|
GitHub | As is the most common use for GitHub, it holds the build source code. In this case we hold only the spec files and related source files. All other sources, including project binaries/sources are retrieved at build time. |
find ./ -type f -name "*.raw.xz" \ | |
-exec echo "Uncompressing {} ..." \; \ | |
-exec unxz --keep {} \; \ | |
-exec bash -c \ | |
'for file do | |
INPUT_IMG=${file/.xz/} | |
OUTPUT_IMG=${file/raw.xz/vmdk} | |
echo "Converting to vmdk: ${INPUT_IMG}"; | |
qemu-img convert -f raw -O vmdk ${INPUT_IMG} ${OUTPUT_IMG}; | |
echo "Compressing ..."; |
""" | |
An asynchronous task manager. | |
This is a simple implementation for background task handing. No guarentees are | |
provided for task execution. | |
This was developed in the course of the work don for the victims project and | |
that version is available at | |
https://github.com/victims/victims-web/blob/master/src/victims_web/handlers/task.py |
// modify these configurations to work with your environment | |
var server = "https://sso.example.com"; | |
var realm = "realm"; | |
var resource = "client"; | |
var username = "username"; | |
var password = "url encoded password"; | |
var url = `${server}/auth/realms/${realm}/protocol/openid-connect/token`; | |
var data = `grant_type=password&client_id=${resource}&username=${username}&password=${password}`; |
PULL_ID=3147 | |
PYTHON_VERSION=${PYTHON_VERSION:-3.8} | |
podman run --rm -i --entrypoint bash python:${PYTHON_VERSION} <<EOF | |
set -e | |
python -m pip install -q git+https://github.com/python-poetry/poetry.git@refs/pull/${PULL_ID}/head | |
python -m poetry new foobar | |
pushd foobar | |
sed -i /pytest/d pyproject.toml | |
python -m poetry add pycowsay |
-- https://stackoverflow.com/a/45244285 | |
CREATE OR REPLACE FUNCTION public.jsonb_array_to_text_array( | |
JSONB | |
) RETURNS TEXT[] AS | |
$f$ | |
SELECT array_agg(x::TEXT) FROM jsonb_array_elements($1) t(x); | |
$f$ | |
LANGUAGE sql | |
IMMUTABLE; |
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) | |
ROOT_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH))) | |
BASH_ENV := $(ROOT_DIR)/.bashrc | |
export BASH_ENV | |
SHELL := $(shell which bash) -e |