Commit 22b53a7c authored by Aurelien's avatar Aurelien
Browse files

Merge branch...

Merge branch '80-explain-in-getting-started-in-the-hub-how-to-use-a-job-multiple-times-with-different-variables' into 'latest'

Resolve "Explain in getting started in the hub how to use a job multiple times with different variables"

Closes #80

See merge request r2devops/hub!181
parents 5d8584c0 06ac17ef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ jsp
JSX
jsx
Junit
JUnit
junit
kaniko
kondo
+32 −0
Original line number Diff line number Diff line
@@ -195,4 +195,36 @@ nmap:
      alias: app
```


### 🎶 Multiple usage of the same job in your pipeline


If you want to reuse a job on the hub, for example launching `apiDoc` to build 2 API documentations in the same pipeline:

You can easily do so with Hub's jobs using ==extends== GitLab keyword.

``` yaml hl_lines="13"

stages:
  - build

include:
  - remote: 'https://jobs.r2devops.io/0.2.0/apidoc.yml'

apidoc:
  variables:
    APIDOC_CONFIG_PATH: src/doc/project1/apidoc.json
    APIDOC_OUTPUT_PATH: website_build/apidoc/project1/

apidoc_project2:
  extends: apidoc
  variables:
    APIDOC_CONFIG_PATH: src/doc/project2/apidoc.json
    APIDOC_OUTPUT_PATH: website_build/apidoc/project2/

```

!!! warning
    Be aware to have different artifacts path not to overwrite your first artifact by the second one.

--8<-- "includes/abbreviations.md"
+1 −2
Original line number Diff line number Diff line
@@ -14,8 +14,7 @@ A job is a script hosted in R2Devops Hub that can be included in CI/CD pipeline


*[CI]:
Continuous integration is a coding philosophy and set of practices that drive development teams to implement small changes and check in code to version control repositories frequently.
This will ensure that your application meets your criteria of quality, security, performance, after each modification of your code.
Continuous integration is a coding philosophy and set of practices that drive development teams to implement small changes and check in code to version control repositories frequently. This will ensure that your application meets your criteria of quality, security, performance, after each modification of your code.

*[CD]:
Continuous delivery starts where continuous integration ends. CD philosophy is to automate the delivery of applications to the selected infrastructure environments.