| status | title | creation-date | last-updated | authors | ||
|---|---|---|---|---|---|---|
proposed |
Pipeline as a Code |
2020-11-24 |
2020-11-24 |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # Author: Chmouel Boudjnah <[email protected]> | |
| # | |
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: batch/v1beta1 | |
| kind: CronJob | |
| metadata: | |
| name: tkn-cleanup | |
| spec: | |
| failedJobsHistoryLimit: 1 | |
| successfulJobsHistoryLimit: 1 | |
| concurrencyPolicy: Replace | |
| schedule: "0 0 * * *" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import whatsneeded | |
| GITHUB_TOKEN = "WHATEVERWILLBEWILLBE" | |
| def github_request(method, url, headers=None, data=None, params=None): | |
| """Execute a request to the GitHUB API, handling redirect""" | |
| if not headers: | |
| headers = {} | |
| headers.update({ | |
| "User-Agent": "Agent 007", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def github_upload_file( | |
| repository: str, | |
| filename: str, | |
| dest: str, | |
| commiter_name: str, | |
| commiter_email: str, | |
| commit_message: str, | |
| ): | |
| url = f"https://api.github.com/repos/{repository}/contents/{dest}" | |
| base64content = base64.b64encode(open(filename, "rb").read()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -eu | |
| fname=${1:-template.yaml} | |
| TMP=$(mktemp /tmp/.mm.XXXXXX) | |
| clean() { rm -f ${TMP}; } | |
| trap clean EXIT | |
| cat ${fname} > ${TMP} |