Skip to content

Commit

Permalink
Merge branch 'update-2024-01' into 'main'
Browse files Browse the repository at this point in the history
Update 2024-01

See merge request xebis/repository-template!70
  • Loading branch information
bruzina committed Jan 1, 2024
2 parents 7ec05cf + 28b73ad commit 3f9e57c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.cache/
.venv/
.envrc
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ variables:
variables:
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
PRE_COMMIT_HOME: $CI_PROJECT_DIR/.cache/pre-commit
GITLAB_PRIVATE_TOKEN: $GL_TOKEN
# Skip protect-first-parent pre-commit hook until `[ERROR] caught error 1 on line 69 of ...: FIRST_PARENT="$(git show-ref -s "${BASE}")"` is fixed
# Skip gitlab-ci-linter pre-commit hook until `urllib.error.HTTPError: HTTP Error 404: Not Found` is fixed
SKIP: check-hooks-apply,protect-first-parent,gitlab-ci-linter
SKIP: check-hooks-apply,protect-first-parent
before_script:
- *default_before_script
- apk --no-cache add bash git go grep npm py-pip python3-dev shellcheck shfmt
Expand Down Expand Up @@ -52,7 +52,7 @@ variables:
lint:
extends: [.lint]
variables:
SKIP: check-hooks-apply,protect-first-parent,gitlab-ci-linter,anti-todo
SKIP: check-hooks-apply,protect-first-parent,anti-todo
rules:
- if: $CI_PIPELINE_SOURCE != 'merge_request_event'

Expand Down
5 changes: 3 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ repos:
hooks:
- id: codespell
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
rev: v0.38.0
hooks:
- id: markdownlint
- repo: https://github.com/adrienverge/yamllint.git
Expand All @@ -63,6 +63,7 @@ repos:
rev: v1.0.6
hooks:
- id: gitlab-ci-linter
args: [--project, xebis/repository-template]
- repo: local
hooks:
- id: anti-todo
Expand All @@ -87,6 +88,6 @@ repos:
language: system
types: [shell]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.17.0
rev: v8.18.1
hooks:
- id: gitleaks
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Set up the GitLab scheduled pipeline:

## Usage

Simply fork the repository at [GitLab](https://gitlab.com/xebis/repository-template/-/forks/new) or [GitHub](https://github.com/xebis/repository-template/fork), **delete** all git tags, and **tag** the last commit to the desired starting version, e.g. `v0.0.0`. Clone the repository with `--recursive` option, run `sudo scripts/bootstrap`, `scripts/setup`, `scripts/update`, and enjoy!
Simply fork the repository at [GitLab](https://gitlab.com/xebis/repository-template/-/forks/new) or [GitHub](https://github.com/xebis/repository-template/fork), **delete** all git tags, and **tag** the last commit to the desired starting version, e.g. `v0.0.0`. Clone the repository with `--recursive` option, run `sudo scripts/bootstrap`, `scripts/setup`, `scripts/update`, at [`.pre-commit-config.yaml`](.pre-commit-config.yaml) replace `gitlab-ci-linter` project with _your project_, and enjoy!

- `git commit`, or `git merge` runs checks on changed files and runs [fast test set](tests/fast.set)
- `git push` runs checks on all files and runs [reduced test set](tests/reduced.set)
Expand All @@ -286,6 +286,7 @@ For usage examples, you might take a look at:

- [GitHub - xebis/shellib: Simple Bash scripting library.](https://github.com/xebis/shellib) - example of version bumping and creating deb package
- [GitHub - xebis/infrastructure-template: Template for automated GitOps and IaC in a cloud. GitLab CI handles static and dynamic environments. Environments are created, updated, and destroyed by Terraform, then configured by cloud-init and Ansible.](https://github.com/xebis/infrastructure-template) - example of GitOps (IaC + MRs + CI/CD) and multiple environments orchestration
- [GitHub - xebis/xebis-ansible-collection: A collection of Xebis shared Ansible roles.](https://github.com/xebis/xebis-ansible-collection)

## Contributing

Expand All @@ -312,11 +313,13 @@ Please read [CONTRIBUTING](CONTRIBUTING.md) for details on our code of conduct,
- [ ] `git push` runs [`scripts/pre-push`](scripts/pre-push)
- [ ] `pre-commit run -a --hook-stage manual` runs all hooks and `check-hooks-apply` hook fails on `check-symlinks` and `forbid-binary`
- GitLab CI
- [ ] Commit in _non_-`main` branch runs `validate:lint` and `validate:test-full`
- [ ] Merge to `main` branch runs `validate:lint`, `validate:test-full`, and `release:release`
- [ ] With a new `feat` or `fix` commit releases a new version
- [ ] Commit in _non_-`main` branch runs `validate:lint` and `validate:test-*-full`
- [ ] Merge to `main` branch runs `validate:lint`, `validate:test-*-full`, and `release:release`
- [ ] With a new `feat` or `fix` commit releases a new version in GitHub and GitLab
- [ ] [GitHub - xebis/repository-template ∙ Releases](https://github.com/xebis/repository-template/releases)
- [ ] [GitLab - xebis/repository-template ∙ Releases](https://gitlab.com/xebis/repository-template/-/releases)
- [ ] Without a new feature or fix commit does not release a new version
- [ ] Scheduled (nightly) pipeline runs `validate:lint` and `validate:test-nightly`
- [ ] Scheduled (nightly) pipeline runs `validate:lint` and `validate:test-*-nightly`

#### Test at Docker Container

Expand Down Expand Up @@ -344,7 +347,6 @@ bats tests

## To-Do list

- [ ] Fix workaround for pre-commit `jumanjihouse/pre-commit-hooks` hook `script-must-have-extension` - `*.bats` shouldn't be excluded
- [ ] Fix workaround for pre-commit `local` hook `shellcheck` - shellcheck has duplicated parameters from `.shellcheckrc`, because these are not taken into account

## Roadmap
Expand Down
2 changes: 1 addition & 1 deletion scripts/shellib

0 comments on commit 3f9e57c

Please sign in to comment.