Skip to content

Commit

Permalink
Merge openshift.tips and openshift.cloud.ktz + some magic
Browse files Browse the repository at this point in the history
  • Loading branch information
iranzo committed Nov 18, 2020
1 parent eecbd7e commit a123ab6
Show file tree
Hide file tree
Showing 105 changed files with 951 additions and 985 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503, F403, F401, E402, E722, C901
max-line-length = 79
max-complexity = 18
select = B,C,E,F,W,T4,B9
12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,14 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: build
prefix-development: chore
include: scope
6 changes: 6 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Add 'repo' label to any root file changes
repo:
- ./*

articles:
- content/**/*
15 changes: 15 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: auto-merge dependabot

on:
pull_request:

jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: ahmadnassri/action-dependabot-auto-merge@v2
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
target: minor
github-token: "${{ secrets.GHA }}"
16 changes: 16 additions & 0 deletions .github/workflows/broken-link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
schedule:
- cron: "0 0 * * *" # daily
repository_dispatch: # run manually
types: [check-link]
# push:
# ...

name: Broken Link Check
jobs:
check:
name: Broken Link Check
runs-on: ubuntu-latest
steps:
- name: Broken Link Check
uses: technote-space/broken-link-checker-action@v2
13 changes: 13 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Greetings

on: [pull_request_target, issues]

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Thank you for raising this issue'
pr-message: 'Thank you for making this first PR'
13 changes: 13 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Label PRs from globs"
on:
schedule:
- cron: "0 * * * *"

jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: jpmcb/[email protected]
with:
jobs: 'pr-labeler'
github-token: "${{ secrets.GITHUB_TOKEN }}"
29 changes: 25 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,36 @@ name: Gatsby Publish
on:
push:
branches:
- dev
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
# Use GitHub Actions' cache to shorten build times and decrease load on servers

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: enriikke/gatsby-gh-pages-action@v2
with:
access-token: ${{ secrets.ACCESS_TOKEN }}
access-token: ${{ secrets.GHA }}
deploy-branch: gh-pages
gatsby-args: --prefix-paths
gatsby-args: --prefix-paths
20 changes: 20 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Close stale issues"
on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
days-before-stale: 60
days-before-close: 7
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days'
stale-issue-label: 'no-issue-activity'
exempt-issue-labels: 'awaiting-approval,work-in-progress'
stale-pr-label: 'no-pr-activity'
exempt-pr-labels: 'awaiting-approval,work-in-progress'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
public
node_modules
public/*
.history/
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
[submodule "themes/ananke"]
path = themes/ananke
url = https://github.com/budparr/gohugo-theme-ananke.git
[submodule "themes/techdoc"]
path = themes/techdoc
url = https://github.com/thingsym/hugo-theme-techdoc.git
68 changes: 68 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
fail_fast: true
repos:
- repo: meta
hooks:
- id: check-useless-excludes
- repo: https://github.com/prettier/prettier
rev: 2.1.2
hooks:
- id: prettier
files: \.(css|js|md|markdown|json)
- repo: https://github.com/python/black
rev: 20.8b1
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
args:
- --unsafe
- id: end-of-file-fixer
- id: fix-encoding-pragma
- id: forbid-new-submodules
- id: no-commit-to-branch
args:
- --branch
- gh-pages
- id: requirements-txt-fixer
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
- repo: local
hooks:
- id: shfmt
name: shfmt
minimum_pre_commit_version: 2.4.0
language: golang
additional_dependencies:
- mvdan.cc/sh/v3/cmd/[email protected]
entry: shfmt
args:
- -w
- -i
- '4'
types:
- shell
- repo: https://github.com/asottile/blacken-docs
rev: v1.8.0
hooks:
- id: blacken-docs
- repo: https://github.com/hcodes/yaspeller.git
rev: v7.0.0
hooks:
- id: yaspeller
types:
- markdown
43 changes: 43 additions & 0 deletions .yaspeller.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"ignoreUrls": true,
"findRepeatWords": true,
"maxRequests": 5,
"ignoreDigits": true,
"lang": "en",
"dictionary": [
"emoji",
"CoreOS",
"RHCOS",
"CRI-O",
"NTP",
"systemd",
"chronyd",
"sysctl",
"NetworkManager",
"OCP",
"OpenShift",
"KCS",
"SELinux",
"SDN",
"OAuth",
"etcd",
"ostree",
"MTU",
"ConfigMap",
"UPI",
"IPI",
"kubectl",
"Kubernetes",
"VMWare",
"oc",
"CSR",
"ControlPlane",
"ElasticSearch",
"Terraform",
"HAProxy",
"TLS",
"CA",
"kubeconfig",
"workaround"
]
}
2 changes: 1 addition & 1 deletion CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
openshift.ktz.cloud
openshift.citellus.org
38 changes: 7 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Openshift Compendium
# OpenShift Tips

![Gatsby Publish](https://github.com/IronicBadger/openshift-compendium/workflows/Gatsby%20Publish/badge.svg)
This site pretends to compile a list of OpenShift 4 tips, mainly one liners as well as handy commands, snippets and other tips + tricks for working with OpenShift Container Platform.

This repo contains handy commands, snippets and other tips + tricks for working with OpenShift Container Platform.
Check the site at <https://openshift.tips>

To contribute please open a PR by contributing a `.md` file (or several) to the `notes/` folder. Please keep PRs scoped by topic. For example, if adding a few commands and a few example snippets, open two PRs.

Expand All @@ -18,51 +18,27 @@ A few points to note when submitting PRs:

## Front Matter

Each note should contain some front matter. This allows the theme to parse and organize the contents more easily.
Each note should contain some front matter. This allows the theme to parse and organize the contents more easily.

For example:

```
```markdown
---
title: Display etcd member table
tags:
- Openshift 4
- Admin Tasks
- etcd
emoji: 🧹
link: https://access.redhat.com/solutions/4985441
---
```
# [openshift.tips](https://openshift.tips)

[![Netlify Status](https://api.netlify.com/api/v1/badges/e9d32213-2089-4328-b53e-bb6b15efd960/deploy-status)](https://app.netlify.com/sites/openshifttips/deploys)

This site pretends to compile a list of OpenShift 4 tips, mainly one liners.

# Contact

The main author of this site is [Eduardo Minguez](https://eduardominguez.es) but
collaborations are appreciated :)

Check all the other [Contributors](https://github.com/openshifttips/web/graphs/contributors)

Feel free to contact me at <[email protected]> or add a new issue to the
[repo](https://github.com/openshifttips/web/issues/new)

# Howto

This site is based on:

* [Hugo](https://gohugo.io) as the static site framework.
* [Techdoc Hugo's theme](https://themes.gohugo.io/hugo-theme-techdoc/)
* [GitHub](https://github.com/openshifttips/web) to host the git repository.
* [Netlify](https://www.netlify.com) to run the builds and serve the content.
* [Let's Encrypt](https://letsencrypt.org) (automated via Netlify) for the site certificates.

Also, we use [ForwardEmail.net](https://forwardemail.net/).

Everything is free (as in beer) so anyone can build the same stuff at 0 cost :)
Also, some of the tools used (such as Hugo and ForwardEmail) are open source as
well \o/

# Other

[I prefer tabs vs spaces.](https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/)
6 changes: 0 additions & 6 deletions archetypes/default.md

This file was deleted.

Loading

0 comments on commit a123ab6

Please sign in to comment.