You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/agent/gitlab-ci.en.md
+53-55Lines changed: 53 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,35 +9,34 @@ The CLI agent supports integration into Gitlab CI using the `.gitlab-ci.yaml` fi
9
9
10
10
### Johnny Docker image
11
11
12
-
An example of the contents of the `.gitlab-ci.yaml` file when using a Docker image of the agent:
13
-
14
-
`<version>` must be replaced with the agent version. A list of current versions with descriptions is available in [Changelog](/changelog/johnny-changelog.en/).
15
-
16
-
```yaml
17
-
stages:
18
-
- test
19
-
20
-
sca:
21
-
stage: test
22
-
23
-
script:
24
-
- docker pull REGISTRY_URL/johnny-depp:<version>
25
-
->
26
-
docker run -v $(pwd):/code
27
-
<registry-address>/johnny-depp
28
-
--api_token $CODESCORING_API_TOKEN
29
-
--api_url $CODESCORING_API_URL
30
-
--ignore.git
31
-
--ignore fixtures
32
-
--ignore parsers
33
-
.
34
-
35
-
artifacts:
36
-
paths:
37
-
-bom.json
38
-
when: always
39
-
expire_in: 1 week
40
-
```
12
+
!!! example "Example .gitlab-ci.yaml file (Docker image)"
13
+
`<version>` must be replaced with the agent version. A list of current versions with descriptions is available in [Changelog](/changelog/johnny-changelog.en/).
14
+
15
+
```yaml
16
+
stages:
17
+
- test
18
+
19
+
sca:
20
+
stage: test
21
+
22
+
script:
23
+
- docker pull REGISTRY_URL/johnny-depp:<version>
24
+
->
25
+
docker run -v $(pwd):/code
26
+
<registry-address>/johnny-depp
27
+
--api_token $CODESCORING_API_TOKEN
28
+
--api_url $CODESCORING_API_URL
29
+
--ignore.git
30
+
--ignore fixtures
31
+
--ignore parsers
32
+
.
33
+
34
+
artifacts:
35
+
paths:
36
+
-bom.json
37
+
when: always
38
+
expire_in: 1 week
39
+
```
41
40
42
41
### Johnny binary file
43
42
@@ -57,29 +56,28 @@ To use the agent binary file, you must first perform the following steps on the
57
56
chmod +x /usr/local/bin/johnny
58
57
```
59
58
60
-
An example of executing the binary file in `.gitlab-ci.yaml`:
61
-
62
-
```yaml
63
-
stages:
64
-
-test
65
-
66
-
sca:
67
-
stage: test
68
-
69
-
script:
70
-
->
71
-
johnny
72
-
scan dir
73
-
--api_token $JOHNNY_API_TOKEN
74
-
--api_url $JOHNNY_API_URL
75
-
--ignore.git
76
-
--ignore fixtures
77
-
--ignore parsers
78
-
.
79
-
80
-
artifacts:
81
-
paths:
82
-
-bom.json
83
-
when: always
84
-
expire_in: 1 week
85
-
```
59
+
!!! example "Example .gitlab-ci.yaml (binary file)"
0 commit comments