Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • seco-ne/yocto/infrastructure/gitlab-ci
1 result
Show changes
Commits on Source (2)
  • Tim Jaacks's avatar
    Move repositories to git.seco.com · 1ba52853
    Tim Jaacks authored
    Rename variable JENKINSGUF_SSH_PRIVATE_KEY / SSH_PRIVATE_KEY to
    GITLAB_PRIVATE_KEY on this occasion, because it contains a private key
    that was generated exclusively for this use case. The according public
    key has been added as a deploy key in GitLab to all repositories that
    this repository needs access to.
    
    Add more detailed documentation concerning this configurationdirectly in
    the gitlab-ci files.
    1ba52853
  • Tim Jaacks's avatar
    Fix remote name on retrigger stage · c917791b
    Tim Jaacks authored
    c917791b
......@@ -138,7 +138,7 @@ build-yocto:
- if: $CI_MERGE_REQUEST_IID
allow_failure: true
trigger:
project: SECO-Northern-Europe/yocto/manifest
project: seco-ne/yocto/manifest
branch: "integrate/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}"
strategy: depend
......@@ -149,7 +149,7 @@ build-ci-test:
- if: $CI_MERGE_REQUEST_IID
allow_failure: true
trigger:
project: SECO-Northern-Europe/yocto/infrastructure/ci-test/minimal-manifest
project: seco-ne/yocto/infrastructure/ci-test/minimal-manifest
branch: "integrate/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}"
strategy: depend
......@@ -186,7 +186,7 @@ build-master-yocto:
- if: $CI_COMMIT_BRANCH == "master"
when: manual
trigger:
project: SECO-Northern-Europe/yocto/manifest
project: seco-ne/yocto/manifest
branch: "dunfell"
strategy: depend
......@@ -197,6 +197,6 @@ build-master-ci-test:
- if: $CI_COMMIT_BRANCH == "master"
when: manual
trigger:
project: SECO-Northern-Europe/yocto/infrastructure/ci-test/minimal-manifest
project: seco-ne/yocto/infrastructure/ci-test/minimal-manifest
branch: "master"
strategy: depend
......@@ -51,4 +51,4 @@ are allowed to merge (Repository -> Protected branches)
[1]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
[2]: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
[3]: https://gitlab.com/garz-fricke
[4]: https://gitlab.com/SECO-Northern-Europe/kernel/modules/egalaxi2c
[4]: https://gitlab.com/seco-ne/kernel/modules/egalaxi2c
......@@ -43,13 +43,13 @@ workflow:
# There are two cases catched here:
# 1. The project is forked into someones gitlab namespace and a MR to
# include a change into this forked project is created. In this case
# is the CI_PROJECT_ROOT_NAMESPACE not SECO-Northern-Europe but the
# is the CI_PROJECT_ROOT_NAMESPACE not seco-ne but the
# namespace the fork lives in.
# 2. The MR from the forked project is created to merge the change into this
# the project in the SECO-Northern-Europe namespace (customer sending
# the project in the seco-ne namespace (customer sending
# change to us). Here the the IDs used below differ.
#
- if: $CI_PROJECT_ROOT_NAMESPACE == "SECO-Northern-Europe"
- if: $CI_PROJECT_ROOT_NAMESPACE == "seco-ne"
&& $CI_MERGE_REQUEST_SOURCE_PROJECT_ID == $CI_MERGE_REQUEST_PROJECT_ID
# ---------------------------------------------------------------------------------------
......@@ -127,7 +127,7 @@ build:
# projects
- if: $CI_MERGE_REQUEST_IID && $CI_COMMIT_REF_NAME !~ /^integrate\/gitlab-ci\/.*/
trigger:
project: SECO-Northern-Europe/yocto/infrastructure/ci-test/minimal-manifest
project: seco-ne/yocto/infrastructure/ci-test/minimal-manifest
branch: "integrate/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}"
strategy: depend
......
......@@ -26,7 +26,7 @@ workflow:
when: never
# Do not run pipelines on forked projects
# (use id instead of name because of rename)
- if: $CI_PROJECT_ID != "21745909"
- if: $CI_PROJECT_ID != "1742"
when: never
# Do not run pipelines on integration branches
- if: $CI_COMMIT_REF_NAME =~ /^integrate\/.*/
......@@ -69,15 +69,24 @@ retrigger:
# Stage: build
# --------------------------------------------------------------------------------------
.setup_ssh: &setup_ssh
# setup ssh key to access private repos
# Setup ssh key to access private repos
# https://docs.gitlab.com/ee/ci/ssh_keys/#ssh-keys-when-using-the-docker-executor
# An SSH keypair has been generated for the manifest's pipeline to be able to access
# all private repositories in the manifest. The private key has been stored in the
# CI/CD variable GITLAB_PRIVATE_KEY of the manifest repository. The public key has
# been added as a deploy key in GitLab's repository settings for all contained
# repositories.
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- echo "$GITLAB_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
# add content of variable SSH_KNOWN_HOSTS to known hosts
# Add GitLab server to known hosts
# https://docs.gitlab.com/ee/ci/ssh_keys/#verifying-the-ssh-host-keys
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
# In order to access the private repositories via SSH, the GitLab server has to be
# added to the known_hosts file. The host keys were determined using the command
# ssh-keyscan [-p port] <gitlab-server>
# and have been stored in the GITLAB_KNOWN_HOSTS CI/CD variable.
- echo "$GITLAB_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
.repo_checkout: &repo_checkout
......
......@@ -203,7 +203,7 @@ def get_merge_request(project: Project, merge_request):
"""Return a gitlab mergereqest specified either by id or by link"""
# MR may also be specified as
# SECO-Northern-Europe/yocto/infrastructure/ci-test/minimal-bar!115
# seco-ne/yocto/infrastructure/ci-test/minimal-bar!115
if "!" in merge_request:
merge_request = int(merge_request.split("!")[-1])
logging.debug("Number of MR: %d", merge_request)
......
......@@ -149,7 +149,7 @@ Used the following permissions, more then in the article:
Get runner registration token from gitlab:
`https://gitlab.com/groups/SECO-Northern-Europe/-/settings/ci_cd`
`https://gitlab.com/groups/seco-ne/-/settings/ci_cd`
The values.yml file contains a set of variables configuring the package installed with helm:
......
......@@ -23,15 +23,24 @@ variables:
fi
.setup_ssh: &setup_ssh
# setup ssh key to access private repos
# Setup ssh key to access private repos
# https://docs.gitlab.com/ee/ci/ssh_keys/#ssh-keys-when-using-the-docker-executor
# An SSH keypair has been generated for the manifest's pipeline to be able to access
# all private repositories in the manifest. The private key has been stored in the
# CI/CD variable GITLAB_PRIVATE_KEY of the manifest repository. The public key has
# been added as a deploy key in GitLab's repository settings for all contained
# repositories.
- eval $(ssh-agent -s)
- echo "$JENKINSGUF_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- echo "$GITLAB_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
# add content of variable SSH_KNOWN_HOSTS to known hosts
# Add GitLab server to known hosts
# https://docs.gitlab.com/ee/ci/ssh_keys/#verifying-the-ssh-host-keys
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
# In order to access the private repositories via SSH, the GitLab server has to be
# added to the known_hosts file. The host keys were determined using the command
# ssh-keyscan [-p port] <gitlab-server>
# and have been stored in the GITLAB_KNOWN_HOSTS CI/CD variable.
- echo "$GITLAB_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
.repo_checkout: &repo_checkout
......
......@@ -30,13 +30,13 @@ workflow:
# There are two cases catched here:
# 1. The project is forked into someones gitlab namespace and a MR to
# include a change into this forked project is created. In this case
# is the CI_PROJECT_ROOT_NAMESPACE not SECO-Northern-Europe but the
# is the CI_PROJECT_ROOT_NAMESPACE not seco-ne but the
# namespace the fork lives in.
# 2. The MR from the forked project is created to merge the change into this
# the project in the SECO-Northern-Europe namespace (customer sending
# the project in the seco-ne namespace (customer sending
# change to us). Here the the IDs used below differ.
#
- if: $CI_PROJECT_ROOT_NAMESPACE == "SECO-Northern-Europe"
- if: $CI_PROJECT_ROOT_NAMESPACE == "seco-ne"
&& $CI_MERGE_REQUEST_SOURCE_PROJECT_ID == $CI_MERGE_REQUEST_PROJECT_ID
# ---------------------------------------------------------------------------------------
......@@ -113,7 +113,7 @@ build:
# projects
- if: $CI_MERGE_REQUEST_IID && $CI_COMMIT_REF_NAME !~ /^integrate\/gitlab-ci\/.*/
trigger:
project: SECO-Northern-Europe/yocto/manifest
project: seco-ne/yocto/manifest
branch: "integrate/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}"
strategy: depend
......
......@@ -28,7 +28,7 @@ workflow:
when: never
# Do not run pipelines on forked projects
# (use id instead of name because of rename)
- if: $CI_PROJECT_ID != "17852514"
- if: $CI_PROJECT_ID != "1725"
when: never
# Do not run pipelines on integration branches
- if: $CI_COMMIT_REF_NAME =~ /^integrate\/.*/
......@@ -48,7 +48,7 @@ retrigger:
- PROJECTS=$(
.gitlab-ci/get_manifest_projects.py
--manifest=default.xml
--remote=seco-north
--remote=seco-ne
--concat-namespaces
)
# Add the gitlab-ci project
......
......@@ -148,7 +148,7 @@ def update_submodule_in_repo(repo: Repo, submodule_project: Project, new_revisio
def update_gitlab_ci_include(content, include_project, new_revision):
# Remove the SECO-Northern-Europe part from the project filter
# Remove the group part from the project filter
# as it is normally specified by $CI_PROJECT_ROOT_NAMESPACE
include_project = include_project.split("/", 1)[1]
......