Commit aecb7239 authored by Thomas Boni's avatar Thomas Boni
Browse files

Merge branch '14-documentation-updates' into 'latest'

Resolve "Documentation updates"

Closes #14

See merge request go2scale/hub!6
parents 54cb0957 fc435f99
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ trivy:

    IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
    TRIVY_SEVERITY: "LOW,MEDIUM,HIGH,CRITICAL"
    TRIVY_EXIT_CODE: 0
    TRIVY_EXIT_CODE: 1
    TRIVY_VULN_TYPE: "os,library"
    TRIVY_NO_PROGRESS: "false"
    TRIVY_OUTPUT: "junit-report.xml"
+26 −3
Original line number Diff line number Diff line
@@ -101,7 +101,30 @@ the hub. Follow the [customization section](#jobs-customization) to do it.

## 🔧 Jobs customization

🚧 *Work in progress*
Each jobs of the hub can be customized. To do it, you have to include the job
URL as usual and, in addition, override the options you want to customize.

<!-- TODO: describe how to override a job (part of
https://gitlab.com/go2scale/hub/-/issues/14) -->
For example, if you want to use the [trivy](/jobs/dynamic_tests/trivy/) job and
customize it by:

* Redefining the `stage` to `security` to fit in your personal stages workflow
* Set the variable `TRIVY_VERSION` to `0.9.1` to use this version instead of
  the default
* Set the variable `TRIVY_SEVERITY` to `CRITICAL` to display only CRITICAL
  issues

```yaml
include:
  - remote: 'https://jobs.go2scale.io/trivy.yml'

trivy:
  stage: security
  variables:
    TRIVY_VERSION: "0.9.1"
    TRIVY_SEVERITY: "CRITICAL"
```

!!! tip
    In this way, you can override all Gitlab jobs parameters. All parameters
    are described in [Gitlab
    documentation](https://docs.gitlab.com/ee/ci/yaml/).
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@ Welcome to the Go2Scale hub ! 🎉
ready to use jobs which helps you to quickly build powerful pipelines for your
projects.

!!! info
    Currently, the hub is focused to provides only **Gitlab 🦊** jobs. We plan
    to support more CI/CD platforms in the future.

Each jobs of the hub can be used unitary to create fully customs pipelines.
You can use them for any kind of software and deployment type. Each job can be
customized through configuration.
+19 −16
Original line number Diff line number Diff line
@@ -17,40 +17,43 @@ Mkdocs](https://squidfunk.github.io/mkdocs-material/) are ready to use.
    /mkdocs.yml # This is your configuration file
    /docs/      # This folder contains all your documentation markdown files
    ```
2. Add the corresponding URL to your `.gitlab-ci.yml` file (see [Getting
   started](/getting-started)). You can use a specific version from [version
   list](#versions). Example with default (`latest`):
2. Choose a version in [version list](#versions)
3. Add the corresponding URL to your `.gitlab-ci.yml` file (see [Getting
   started](/getting-started)). Example:

    ```yaml
    include:
      - remote: 'https://jobs.go2scale.io/mkdocs.yml'
    ```
3. If you need set variables, see [Jobs
   customization](/getting-started#jobs-customization) section in
   getting started

## Jobs
4. If you need to customize the job (stage, variables, ...) 👉 check the [jobs
   customization](/getting-started/#jobs-customization)

### Documentation
5. Well done, your job is ready to work ! 😀

Build HTML documentation from Makdown source using `Mkdocs`.
## Job details

* Job name: `mkdocs`
* Docker image:
[squidfunk/mkdocs-material](https://hub.docker.com/r/squidfunk/mkdocs-material)
* When: always
* Stage: build
* Artifacts:
    * Result of documentation build exposed as `Documentation`
* Variables:
[`squidfunk/mkdocs-material`](https://hub.docker.com/r/squidfunk/mkdocs-material)
* Default stage: `build`
* When: `always`

### Variables

| Name | Description | Default |
| ---- | ----------- | ------- |
| `DOCUMENTATION_DISABLE` | Disable build | |

### Artifacts

Result of documentation build is [exposed
as](https://docs.gitlab.com/ee/ci/yaml/#artifactsexpose_as) `Documentation` in
merge requests

## Versions

* **Latest** : `https://jobs.go2scale.io/latest/mkdocs.yml`
* **Latest** (current -> `2020-07-15_1`) : `https://jobs.go2scale.io/latest/mkdocs.yml`
* **Tag `2020-07-15_1`** : `https://jobs.go2scale.io/2020-07-15_1/mkdocs.yml`

    !!! warning
+12 −12
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ from previous job named `documentation`.
      documentation to publish as artifact. Example: [Mkdocs](/jobs/mkdocs/)

1. Choose a version in [version list](#versions)
2. Add the corresponding url to your `.gitlab-ci.yml` file (see [Getting
3. Add the corresponding URL to your `.gitlab-ci.yml` file (see [Getting
   started](/getting-started)). Example:

    ```yaml
@@ -20,20 +20,20 @@ from previous job named `documentation`.
      - remote: 'https://jobs.go2scale.io/pages.yml'
    ```

3. If you need set variables in jobs, use `variables` option in
   `.gitlab-ci.yml` file
4. If you need to customize the job (stage, variables, ...) 👉 check the [jobs
   customization](/getting-started/#jobs-customization)

## Jobs
5. Well done, your job is ready to work ! 😀

### Pages

* Docker image: [ruby](https://hub.docker.com/_/ruby)
## Job details

* Job name: `pages`
* Docker image: [`ruby`](https://hub.docker.com/_/ruby)
* Stage: `deployment`
* When: only run on `master` branch
* Stage: deployment
* Artifacts:
    * Result of documentation from previous job. It's used as input for Gitlab
      pages
* Variables:

### Variables:

| Name | Description | Default |
| ---- | ----------- | ------- |
@@ -42,7 +42,7 @@ from previous job named `documentation`.

## Versions

* **Latest** : `https://jobs.go2scale.io/latest/pages.yml`
* **Latest** (current -> `2020-05-31_1`): `https://jobs.go2scale.io/latest/pages.yml`
* **Tag `2020-05-31_1`** : `https://jobs.go2scale.io/2020-05-31_1/pages.yml`

    !!! warning
Loading