Skip to content

Instantly share code, notes, and snippets.

@davesave
davesave / Jenkinsfile
Last active November 9, 2024 11:56
Mulitbranch pipeline example with loading external groovy pipelines
pipeline {
agent {
kubernetes {
idleMinutes 2
yaml '''
metadata:
labels:
some-label: some-label-value
spec:
containers:
@davesave
davesave / Dockerfile
Last active October 26, 2024 11:26
Basic maven + Jenkinsfile + Dockerfile + Jenkins Agent on kubernetes: pipeline example for push with dind container, eclipse, jdk and dockerhub
# Stage 1: Build the application using Maven
# FROM maven:3.8.6-openjdk-17 AS build
# WORKDIR /app
# COPY . .
# RUN mvn clean package -DskipTests
# Stage 1: jar is build on ci server
FROM busybox:latest AS build
WORKDIR /app
COPY target/my-app-1.0-SNAPSHOT.jar app.jar
@davesave
davesave / urls.py
Created July 10, 2018 07:53 — forked from tauzen/urls.py
Example of using login_required and staff_member_required decorators with Class-based views in Django.
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib import admin
from application.views import ApplicationFormView, ApplicationListView
admin.autodiscover()
urlpatterns = patterns('',