Skip to content
Snippets Groups Projects
Commit 4f9e40ca authored by nimrod's avatar nimrod
Browse files

Migrate from Travis CI to GitLab CI.

Also, update pre-commit hooks.
parent 98c05383
No related branches found
No related tags found
No related merge requests found
Pipeline #257 passed with warnings
---
stages:
- test
pre-commit:
stage: test
image: adarnimrod/ci-images:pre-commit
variables:
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"
script:
- pre-commit run --all-files
cache:
paths:
- .cache/
test:
stage: test
image: buildpack-deps:bullseye
allow_failure: true
before_script:
- apt-get update
- apt-get install -y bats
script:
- bats .
---
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
sha: v1.2.3 rev: v3.4.0
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-yaml - id: check-executables-have-shebangs
- id: check-merge-conflict - id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: trailing-whitespace - id: trailing-whitespace
- repo: https://github.com/adarnimrod/shell-pre-commit - repo: https://github.com/adarnimrod/shell-pre-commit
sha: v0.6.0 rev: v0.6.0
hooks: hooks:
- id: shell-lint - id: shell-lint
- id: shellcheck - id: shellcheck
- repo: https://github.com/myint/rstcheck
rev: master
hooks:
- id: rstcheck
- repo: https://github.com/adrienverge/yamllint
rev: v1.25.0
hooks:
- id: yamllint
bundle-certs bundle-certs
############ ############
.. image:: https://travis-ci.org/adarnimrod/bundle_certs.svg?branch=master .. image:: https://git.shore.co.il/nimrod/bundle_certs/badges/master/pipeline.svg
:target: https://travis-ci.org/adarnimrod/bundle_certs :target: https://git.shore.co.il/nimrod/bundle_certs/-/commits/master
:alt: pipeline status
A shell script to bundle SSL certificates in the correct order. The use case A shell script to bundle SSL certificates in the correct order. The use case
envisioned is programmatically handling SSL certificate renewal. envisioned is programmatically handling SSL certificate renewal.
...@@ -28,8 +29,8 @@ For regular use: ...@@ -28,8 +29,8 @@ For regular use:
For testing/ development purposes, all of the above, plus: For testing/ development purposes, all of the above, plus:
- `Bats <https://github.com/sstephenson/bats>`_. - Bats_
- `Pre-commit <http://pre-commit.com/>`_. - Pre-commit_
Usage Usage
----- -----
...@@ -61,9 +62,8 @@ Shell functions ...@@ -61,9 +62,8 @@ Shell functions
Development and testing Development and testing
----------------------- -----------------------
Testing is done using Bats <https://github.com/sstephenson/bats>`_. To test run Testing is done using Bats_. To test run :code:`bats test.bats`. Pre-commit_ is
:code:`bats test.bats`. `Pre-commit <http://pre-commit.com/>`_ is also also configured for this repo.
configured for this repo.
License License
------- -------
...@@ -77,4 +77,7 @@ Author Information ...@@ -77,4 +77,7 @@ Author Information
Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website Nimrod Adar, `contact me <nimrod@shore.co.il>`_ or visit my `website
<https://www.shore.co.il/>`_. Patches are welcome via `git send-email <https://www.shore.co.il/>`_. Patches are welcome via `git send-email
<http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located <http://git-scm.com/book/en/v2/Git-Commands-Email>`_. The repository is located
at: https://www.shore.co.il/cgit/. at: https://git.shore.co.il/explore/.
.. _Bats: https://github.com/sstephenson/bats
.. _Pre-commit: https://pre-commit.com/
test.bats 100755 → 100644
#!/usr/bin/env bats
setup () { setup () {
teardown teardown
mkdir -p .testcerts mkdir -p .testcerts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment