Skip to content

Instantly share code, notes, and snippets.

View mkutz's full-sized avatar

Michael Kutz mkutz

View GitHub Profile
@mkutz
mkutz / README_TEMPLATE.md
Last active March 23, 2023 18:46
A template for better README.md

{What is the name of this?}

{WHY whould the reader want to read on? WHAT can this do? What are its limits?}

Usage

{What is the MINIMUM I need to do to use this?}

@mkutz
mkutz / spring-boot-gradle-build.yml
Last active October 15, 2021 14:50
Simple build for a Spring Boot project built with Gradle
name: Build
on:
pull_request:
branches:
- main
push:
branches:
- main
@mkutz
mkutz / build.yml
Last active October 15, 2021 13:06
Build and reused deployment GitHub workflow
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
@mkutz
mkutz / AvoiceElementClickInterceptedException.java
Created March 26, 2021 15:57
Selenium Silver Bullet: Clickin on Things Evnetually
new WebDriverWait(webDriver, 4)
.ignoring(ElementClickInterceptedException.class, ElementNotInteractableException.class)
.until(driver -> {
final var button = driver.findElement(By.className("button");
button.click();
return button;
});
@mkutz
mkutz / SwitchScriptedJenkinsfile.groovy
Created August 3, 2020 15:24
Jenkinsfile using script and switch/case to pick one of multiple steps to be executed
#!/usr/bin/env groovy
// see https://jenkins.io/doc/book/pipeline/syntax/
pipeline {
agent any
parameters {
booleanParam(name: "RELEASE", defaultValue: false)
choice(name: "DEPLOY_TO", choices: ["", "INT", "PRE", "PROD"])
@mkutz
mkutz / SwitchDeclarativeJenkinsfile.groovy
Created August 3, 2020 15:22
Jenkinsfile using parallel and when to pick one of multiple stages to be executed
#!/usr/bin/env groovy
// see https://jenkins.io/doc/book/pipeline/syntax/
pipeline {
agent any
parameters {
booleanParam(name: "RELEASE", defaultValue: false)
choice(name: "DEPLOY_TO", choices: ["", "INT", "PRE", "PROD"])
@mkutz
mkutz / IfElseScriptedJenkinsfile.groovy
Created August 3, 2020 15:21
Jenkinsfile using script and if/else to execute either the one or the other step
#!/usr/bin/env groovy
// see https://jenkins.io/doc/book/pipeline/syntax/
pipeline {
agent any
parameters {
booleanParam(name: "RELEASE", defaultValue: false)
}
@mkutz
mkutz / IfElseDeclarativeParallelJenkinsfile.groovy
Created August 3, 2020 15:20
Jenkinsfile using parallel and when to exceute either the one or the other stage
#!/usr/bin/env groovy
// see https://jenkins.io/doc/book/pipeline/syntax/
pipeline {
agent any
parameters {
booleanParam(name: "RELEASE", defaultValue: false)
}
@mkutz
mkutz / IfElseDeclarativeJenkinsfile.groovy
Last active August 3, 2020 15:19
Jenkinsfile using two successive stage with when to eaxecute either the one or the other stage
#!/usr/bin/env groovy
// see https://jenkins.io/doc/book/pipeline/syntax/
pipeline {
agent any
parameters {
booleanParam(name: "RELEASE", defaultValue: false)
}
@mkutz
mkutz / IfScriptedJenkinsfile.groovy
Last active August 3, 2020 15:17
Jenkinsfile using script and if for an optional step
#!/usr/bin/env groovy
// see https://jenkins.io/doc/book/pipeline/syntax/
pipeline {
agent any
parameters {
booleanParam(name: "RELEASE", defaultValue: false)
}