README.md 1.17 KB
Newer Older
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
1
2
# nfs4j-build

Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
3
Out-of-tree build pipeline for [nfs4j](https://gitlab.desy.de/dcache/nfs4j) package
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
4

Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
5
6
7
The goal of the project to demonstrate how to keep gitlab pipeline file outside of
the original source code reporitory.

Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
## Triggering the build

To trigger the build, add a trigger token under **Settings ➔ CI/CD ➔ Pipeline triggers**.  The newly generated token
should be added into main project under **Settings ➔ Webhooks** as:

```
https://gitlab.desy.de/api/v4/projects/PROJ_ID/ref/REF/trigger/pipeline?token=TOEKN
```

where `PROJ_ID` is the project's numeric id (visible under project overview panel), `REF` is the git ref, like `master`
and `TOCKEN` is the token added into out-of-tree build project.

## Deploy the artifacts

Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
22
The deploy step uses `CI_JOB_TOKEN` automatically injected by gitlab.
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
23

Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
24

Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
25
26
27
28
29
30
31
32
33
## Alternative

As an alternative, instead of triggering build on another ropository, you can point CI/CD of original repository
to use `remote-gitlab-ci.yaml`. Go **Settings ➔ CI/CD ➔ General pipelines** and set `Custom CI configuration path` to
`remote-gitlab-ci.yml@NAMESPACE/project`, for example:

```
remote-gitlab-ci.yml@dCache/nfs4j-build
```
Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
34

Tigran Mkrtchyan's avatar
Tigran Mkrtchyan committed
35
36
37
## License
Public domain.