Skip to content

Commit

Permalink
Put the GitLab YAML in a file instead of directly in the README (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Mar 8, 2024
1 parent 0128ace commit e72bd6b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
27 changes: 2 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,9 @@ Create a file at `.github/workflows/CompatHelper.yml` with the contents of the [
If you need to use any special arguments for the `main` function, you can modify this file to add them.

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

```yaml
CompatHelper:
image: julia:1.6 # Set to the Julia version you want to use
stage: compat # You can place this in any stage that makes sense for your setup
before_script:
- apt-get update -qq && apt-get install -y git
- |
julia --color=yes -e "
import Pkg;
ENV[\"JULIA_PKG_SERVER\"] = \"\";
Pkg.Registry.add(\"General\");"
- |
julia --color=yes -e "
import Pkg;
name = \"CompatHelper\";
uuid = \"aa819f21-2bde-4658-8897-bab36330d9b7\";
version = \"3\";
Pkg.add(; name, uuid, version)"
script:
- |
julia --color=yes -e "
import CompatHelper;
CompatHelper.main()"
```
For GitLab you will want to add CompatHelper as a job in your `.gitlab-ci.yml`
file with the contents of the [.gitlab-ci.yml](examples/gitlab/.gitlab-ci.yml) file that is included in this repository.

Similarly to the GitHub setup, you can modify the `main` call here if you need to change any of the default arguments.
You must also remember to add the `GITLAB_TOKEN` and `COMPATHELPER_PRIV` CI secrets to the project so that CompatHelper can find them.
Expand Down
22 changes: 22 additions & 0 deletions examples/gitlab/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CompatHelper:
image: julia:1.6 # Set to the Julia version you want to use
stage: compat # You can place this in any stage that makes sense for your setup
before_script:
- apt-get update -qq && apt-get install -y git
- |
julia --color=yes -e "
import Pkg;
ENV[\"JULIA_PKG_SERVER\"] = \"\";
Pkg.Registry.add(\"General\");"
- |
julia --color=yes -e "
import Pkg;
name = \"CompatHelper\";
uuid = \"aa819f21-2bde-4658-8897-bab36330d9b7\";
version = \"3\";
Pkg.add(; name, uuid, version)"
script:
- |
julia --color=yes -e "
import CompatHelper;
CompatHelper.main()"

2 comments on commit e72bd6b

@DilumAluthge
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/107589

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v3.11.0 -m "<description of version>" e72bd6b815a69d14ccdb0c85b3589bed2a2af704
git push origin v3.11.0

Please sign in to comment.