Skip to content

Commit e72bd6b

Browse files
authored
Put the GitLab YAML in a file instead of directly in the README (#489)
1 parent 0128ace commit e72bd6b

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

README.md

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,9 @@ Create a file at `.github/workflows/CompatHelper.yml` with the contents of the [
2828
If you need to use any special arguments for the `main` function, you can modify this file to add them.
2929

3030
### GitLab
31-
For GitLab you will want to add CompatHelper as a job in your `.gitlab-ci.yml` file such as:
3231

33-
```yaml
34-
CompatHelper:
35-
image: julia:1.6 # Set to the Julia version you want to use
36-
stage: compat # You can place this in any stage that makes sense for your setup
37-
before_script:
38-
- apt-get update -qq && apt-get install -y git
39-
- |
40-
julia --color=yes -e "
41-
import Pkg;
42-
ENV[\"JULIA_PKG_SERVER\"] = \"\";
43-
Pkg.Registry.add(\"General\");"
44-
- |
45-
julia --color=yes -e "
46-
import Pkg;
47-
name = \"CompatHelper\";
48-
uuid = \"aa819f21-2bde-4658-8897-bab36330d9b7\";
49-
version = \"3\";
50-
Pkg.add(; name, uuid, version)"
51-
script:
52-
- |
53-
julia --color=yes -e "
54-
import CompatHelper;
55-
CompatHelper.main()"
56-
```
32+
For GitLab you will want to add CompatHelper as a job in your `.gitlab-ci.yml`
33+
file with the contents of the [.gitlab-ci.yml](examples/gitlab/.gitlab-ci.yml) file that is included in this repository.
5734

5835
Similarly to the GitHub setup, you can modify the `main` call here if you need to change any of the default arguments.
5936
You must also remember to add the `GITLAB_TOKEN` and `COMPATHELPER_PRIV` CI secrets to the project so that CompatHelper can find them.

examples/gitlab/.gitlab-ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
CompatHelper:
2+
image: julia:1.6 # Set to the Julia version you want to use
3+
stage: compat # You can place this in any stage that makes sense for your setup
4+
before_script:
5+
- apt-get update -qq && apt-get install -y git
6+
- |
7+
julia --color=yes -e "
8+
import Pkg;
9+
ENV[\"JULIA_PKG_SERVER\"] = \"\";
10+
Pkg.Registry.add(\"General\");"
11+
- |
12+
julia --color=yes -e "
13+
import Pkg;
14+
name = \"CompatHelper\";
15+
uuid = \"aa819f21-2bde-4658-8897-bab36330d9b7\";
16+
version = \"3\";
17+
Pkg.add(; name, uuid, version)"
18+
script:
19+
- |
20+
julia --color=yes -e "
21+
import CompatHelper;
22+
CompatHelper.main()"

0 commit comments

Comments
 (0)