Skip to content

Instantly share code, notes, and snippets.

View chmouel's full-sized avatar
☸️

Chmouel Boudjnah chmouel

☸️
View GitHub Profile

Prep

  • Make sure tkn-pac is compiled from main
  • Make sure we are on the right cluster ($ opac)
  • Create a demo directory in /tmp (mkdir /tmp/demo)

Use GH to create a repository

  • gh repo create openshfit-demo-test

How to install Pipelines as Code

Install release.yaml

kubectl apply -f https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code/release-0.1/release-0.1.yaml

OpenShift

Expose the EventListenner


@chmouel
chmouel / pac-demo.org
Last active January 4, 2022 09:46
Tekton Pipelines as Code demo
@chmouel
chmouel / prune-pipelinerun-objects.yaml
Last active February 23, 2023 20:27
cronjob for pruning pipelinerun objects by age
apiVersion: v1
kind: List
items:
- apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: pr-cleanup
namespace: ghe
spec:
concurrencyPolicy: Replace
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
apiServerAddress: "10.0.111.66"
apiServerPort: 8443
kubeadmConfigPatchesJSON6902:
- group: kubeadm.k8s.io
version: v1beta2
kind: ClusterConfiguration
patch: |
@chmouel
chmouel / gnus-demon-config.el
Last active February 11, 2021 21:56
Integrate GNUS with Argos
(defun gnus-demon-scan-mail-or-news-and-update (level)
"Scan for new mail, updating the *Group* buffer."
(let ((win (current-window-configuration)))
(unwind-protect
(save-window-excursion
(save-excursion
(when (gnus-alive-p)
(save-excursion
(set-buffer gnus-group-buffer)
(gnus-group-get-new-news level)))))
status title creation-date last-updated authors
proposed
Pipeline as a Code
2020-11-24
2020-11-24
chmouel
afrittoli

TEP-0037: Pipeline as a Code

# -*- coding: utf-8 -*-
# Author: Chmouel Boudjnah <chmouel@chmouel.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: tkn-cleanup
spec:
failedJobsHistoryLimit: 1
successfulJobsHistoryLimit: 1
concurrencyPolicy: Replace
schedule: "0 0 * * *"
@chmouel
chmouel / yamllint-pre-commit.bash
Last active October 14, 2020 10:48
yamllint yaml files on GIT pre-commit hook script
#!/usr/bin/env bash
# To be copied in .git/hooks/pre-commit (0755 mode)
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=$(git hash-object -t tree /dev/null)
fi