Skip to content

Instantly share code, notes, and snippets.

View obcode's full-sized avatar

Oliver Braun obcode

  • Munich University of Applied Sciences
  • Germany
View GitHub Profile
@obcode
obcode / gist:ee44e6d4fbeadd99e2bb
Last active February 21, 2023 16:09
Jenkins - Copy all Jobs from a view into another view
import hudson.model.*
def oldview = "Braun-SwArch"
newview = new ListView("Braun-SwArch-Milestone1")
def view = Hudson.instance.getView(oldview)
//copy all projects of a view
for(item in view.getItems())
{
<?xml version="1.0" encoding="UTF-8"?>
<!--
Checkstyle-Configuration: Ullrich Hafner
Description: Ullrich Hafner's Checkstyle Rules.
-->
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<property name="severity" value="warning"/>
<module name="TreeWalker">
@obcode
obcode / gist:cf65c4f3c464f7de886b
Created January 21, 2016 16:38
Konstruktor für Blatt 7
ChristmasTree(int height) {
if (height < 3) {
throw new RuntimeException();
}
this.height = height;
}
#!/bin/sh
git clone https://github.com/algdat/blatt-2-db07
git clone https://github.com/algdat/blatt-2-maze
git clone https://github.com/algdat/blatt-2-noobs-cpp
git clone https://github.com/algdat/blatt-2-you-are-a-star-1
git clone https://github.com/algdat/blatt-2-traveler
git clone https://github.com/algdat/blatt-2-sudoku07-1
git clone https://github.com/algdat/blatt-2-_vbbk_
git clone https://github.com/algdat/blatt-2-gitpub
_ _ _ _ __ __ _ _ _
| | | | ___| | | ___ \ \ / /__ _ __| | __| | |
| |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` | |
| _ | __/ | | (_) | \ V V / (_) | | | | (_| |_|
|_| |_|\___|_|_|\___( ) \_/\_/ \___/|_| |_|\__,_(_)
|/
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'sh gradlew clean'
sh 'sh gradlew compileJava'
}
}
stage('Checkstyle') {
@obcode
obcode / query.go
Created May 8, 2018 12:04
GraphQL Query Golang
package main
import (
"fmt"
"net/http"
"bytes"
"io/ioutil"
)
func main() {
# Use new container infrastructure to enable caching
sudo: false
# Do not choose a language; we provide our own build tools.
language: generic
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack
version: "3"
services:
jenkins:
# image: jenkins/jenkins:lts
build:
context: .
dockerfile: jenkins.dockerfile
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/jenkins:/var/jenkins_home
package moviestore
import "testing"
func newMoviestoreImpl() *moviestoreImpl {
ms := new(moviestoreImpl)
ms.available = make(map[Serial]Movie)
ms.users = make(map[UserID]User)
ms.rented = make(map[UserID][]Movie)