From 855c52c1af2d8389c5382df89eae153b39a1f413 Mon Sep 17 00:00:00 2001 From: Sophie <133236526+SKernchen@users.noreply.github.com> Date: Thu, 19 Oct 2023 01:12:36 +0200 Subject: [PATCH 1/3] Add HERMES_PUSH_TOKEN --- docs/source/tutorials/automated-publication-with-ci.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/tutorials/automated-publication-with-ci.md b/docs/source/tutorials/automated-publication-with-ci.md index 2ff58d96..4c56e7f7 100644 --- a/docs/source/tutorials/automated-publication-with-ci.md +++ b/docs/source/tutorials/automated-publication-with-ci.md @@ -167,6 +167,11 @@ and activate the option "Allow GitHub Actions to create and approve pull request Copy the Zenodo sandbox token you just created into a new [GitLab CI variable](https://docs.gitlab.com/ee/ci/variables/#for-a-project) called `ZENODO_TOKEN`. +For Gitlab you also need the HERMES Push Token. That Token gives access to the project in order for HERMES to create Merge Requests. +Therefore, you [create an access token in your project](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html#create-a-project-access-token). +The Token needs to have at least the `developer` role and `write` access (e.g. write_repository scope). +Then you create a Gitlab CI variable with the token called `HERMES_PUSH_TOKEN`. + Copy the [template file for GitLab to Zenodo Sandbox publication](https://github.com/hermes-hmc/ci-templates/blob/main/gitlab/hermes-ci.yml) into your project to `.gitlab/hermes-ci.yml`. From 98fe0a421e1528d71e37d1b6ab44612318b87c4d Mon Sep 17 00:00:00 2001 From: Sophie <133236526+SKernchen@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:49:28 +0200 Subject: [PATCH 2/3] Note about protection of variables --- docs/source/tutorials/automated-publication-with-ci.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/source/tutorials/automated-publication-with-ci.md b/docs/source/tutorials/automated-publication-with-ci.md index 4c56e7f7..adf86cc2 100644 --- a/docs/source/tutorials/automated-publication-with-ci.md +++ b/docs/source/tutorials/automated-publication-with-ci.md @@ -172,6 +172,13 @@ Therefore, you [create an access token in your project](https://docs.gitlab.com/ The Token needs to have at least the `developer` role and `write` access (e.g. write_repository scope). Then you create a Gitlab CI variable with the token called `HERMES_PUSH_TOKEN`. +```{note} +The two Gitlab CI Variables include sensitive and powerful information. +Therefore you should at least select the flag `Mask variable` when creating. +If possible you should also select the flag `Protect variable` and define all branches `hermes/*` as +protected branch. +``` + Copy the [template file for GitLab to Zenodo Sandbox publication](https://github.com/hermes-hmc/ci-templates/blob/main/gitlab/hermes-ci.yml) into your project to `.gitlab/hermes-ci.yml`. From 388dc667996affbbd2f84185cc456b500ac1e5f5 Mon Sep 17 00:00:00 2001 From: Sophie <133236526+SKernchen@users.noreply.github.com> Date: Thu, 19 Oct 2023 13:58:08 +0200 Subject: [PATCH 3/3] Add File Contributor Sophie Kernchen --- docs/source/tutorials/automated-publication-with-ci.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/tutorials/automated-publication-with-ci.md b/docs/source/tutorials/automated-publication-with-ci.md index adf86cc2..cb6cde95 100644 --- a/docs/source/tutorials/automated-publication-with-ci.md +++ b/docs/source/tutorials/automated-publication-with-ci.md @@ -8,6 +8,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0 SPDX-FileContributor: Oliver Bertuch SPDX-FileContributor: Michael Meinel SPDX-FileContributor: Stephan Druskat +SPDX-FileContributor: Sophie Kernchen --> # Set up automatic software publishing