Skip to content

Instantly share code, notes, and snippets.

View hagzag's full-sized avatar

Haggai Philip Zagury hagzag

View GitHub Profile
@hagzag
hagzag / apps.yaml
Created November 14, 2023 16:10
app.yaml
apps:
- name:
version: 'v1.0.5'
- name: sites
version: 'v1.1.15'
- name: cdns
version: 'v2.2.0'
- name: capabilities-api
version: 'v1.0.2'
- name: environment
var http = require("http");
var os = require('os');
var server = http.createServer(function (request, response) {
response.writeHead(200, {
"Content-Type": "text/plain"
});
response.end("Request processed by http-server on: " + os.hostname() + "\n");
}).listen(8080);
cat << EOF > Dockerfile
FROM node:14.2-alpine
RUN mkdir -p /app
WORKDIR /app
COPY package*.json /app/
RUN npm install
COPY . /app
cat << EOF > package.json
{
"name": "Kubexpereince-podid",
"version": "1.0.0",
"description": "A demo application for Kubexpereince intro session",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"license": "MIT"
cat << EOF > package.json
{
"name": "Kubexpereince-podid",
"version": "1.0.0",
"description": "A demo application for Kubexpereince intro session",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"license": "MIT"
cat << EOF > index.js
var http = require("http");
var os = require("os");
var server = http
.createServer(function (request, response) {
response.writeHead(200, {
"Content-Type": "text/plain",
});
[job-exec "job-executed-on-running-container"]
schedule = @hourly
container = my-container
command = touch /tmp/example
[job-run "job-executed-on-new-container"]
schedule = @midnight
image = ubuntu:latest
command = touch /tmp/example
version: '3.4'
services:
web_cron:
# give this "cron container" a static name we can always reference from Ofelia
container_name: web_cron
# a custom image with the code you wish to execute (HINT: Run some Ansible maybe ? ;))
image: "your_custom_image/genric_one"
# additional mounts / config files / ssh keys etc - things you don't want in the container like secrets / certificates >
#volumes:
pipeline {
agent {
node {
label 'collectors-slave'
}
}
stages {
stage('Do echo') {
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300);@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700,500,300);@keyframes a{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes b{0%{opacity:1}50%{opacity:0}to{opacity:1}}[src$="blue.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDA5Njg4IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptLTIgMTVsLTUtNSAxLjQxLTEuNDFMMTAgMTQuMTdsNy41OS03LjU5TDE5IDhsLTkgOXoiLz48L3N2Zz4=)}[src$="red.png"]{background-image:url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjE4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjRjQ0MzM2IiBkPSJNMTIgMkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMSAxNWgtMnYtMmgydjJ6bTAtNGgtMlY3aDJ2NnoiLz48L3N2Zz4=)}[src$="yellow.png