Skip to content

Instantly share code, notes, and snippets.

View Noordsestern's full-sized avatar
😈
Kill your heroes and fight

Markus Noordsestern

😈
Kill your heroes and fight
View GitHub Profile
@Noordsestern
Noordsestern / score_no_parameter.yaml
Created August 21, 2023 20:31
Score Without Parameters
apiVersion: score.dev/v1b1
metadata:
name: score-cronjob
containers:
greeter:
image: hello-world:latest
@Noordsestern
Noordsestern / gitlab-ci.yml
Created July 18, 2023 21:43
Gitlab-Job for notifying Humanitec about new image
# IMAGE_NAME and IMAGE_TAG must be defined before - you had been using it in your docker-build step
# HUMANITEC_ORG is name of your org in Humanitec
# HUMANITEC_TOKEN that you defined under "Api Tokens" in Humanitec
Notify Humanitec About New Image:
image: curlimages/curl:latest
stage: .post
script:
- echo "Sending ${IMAGE_NAME}:${IMAGE_TAG} to Humanitec"
- >
@Noordsestern
Noordsestern / example-robotframework-webservice-dockerfile
Created May 9, 2022 20:51
Dockerfile defining webservice that runs a task with browserlibrary
FROM ghcr.io/marketsquare/robotframework-browser/rfbrowser-stable:12.3.0
WORKDIR /robot
COPY . .
USER root
RUN chown -R pwuser:pwuser /robot
USER pwuser
INFO: Started server process [9276]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:5003 (Press CTRL+C to quit)
@Noordsestern
Noordsestern / start_robot_webservice.sh
Last active May 10, 2022 07:58
Install and Launch Robot Framework Webservice
pip3 install robotframework-webservice
python3 -m RobotFrameworkService.main -t .
@Noordsestern
Noordsestern / WebhookMockTests.robot
Last active December 22, 2021 20:01
Robot Test Case for WebhookMock.py
*** Settings ***
Library RequestsLibrary
Library Collections
Library json
Test Setup Prepare test case
*** Test Cases ***
Test webhook with Text
${payload_text} Set Variable Hello World
@Noordsestern
Noordsestern / WebhookMock.py
Last active December 22, 2021 15:57
Small web service for mocking webhooks. Logs all incoming requests. Useful for testing systems that send out notifications. Make system under test send its notifications to this web service and validate the messages on its GET endpoints.
from fastapi import FastAPI, Response, Request
import json
from json import JSONDecodeError
app = FastAPI()
webhook_call = {}
@app.get('/all')
@Noordsestern
Noordsestern / delete_process_instance_history.robot
Last active September 15, 2021 12:25
How to delete historic process instances in Camunda with Robot Framework
*** Settings ***
Library RequestsLibrary
Library json
*** Variables ***
${START_BEFORE} 2021-08-01T00:00:00.000+0200
${CAMUNDA_URL} http://localhost:8080
*** Tasks ***
Get history
@Noordsestern
Noordsestern / fetch-and-pass.robot
Created September 15, 2021 10:13
Example of skipping execution CamundaLibrary version 2
*** Tasks ***
Run Robot Service Task
FOR ${i} IN RANGE 0 ${BATCH_SIZE}
${workload} fetch and pass my_task_topic_name message=Finshed processing ${i} process instances
do something with workload ${workload}
END