Skip to content
Snippets Groups Projects

Draft: feat: migration EF runner

Open Sébastien Heurtematte requested to merge feat/ef-runner into main
Compare and
1 file
+ 44
32
Compare changes
  • Side-by-side
  • Inline
+ 44
32
@@ -7,9 +7,14 @@ stages:
@@ -7,9 +7,14 @@ stages:
- build
- build
- deploy
- deploy
 
default:
 
tags:
 
- origin:eclipse
 
- ctx:oniro-group
 
include:
include:
- project: eclipse/oniro-core/oniro
- project: eclipse/oniro-core/oniro
ref: kirkstone
ref: feat/ef-runner
file:
file:
- .oniro-ci/dco.yaml
- .oniro-ci/dco.yaml
- .oniro-ci/reuse.yaml
- .oniro-ci/reuse.yaml
@@ -52,7 +57,7 @@ reuse:
@@ -52,7 +57,7 @@ reuse:
.oniro-repo-workspace:
.oniro-repo-workspace:
interruptible: true
interruptible: true
image:
image:
name: registry.ostc-eu.org/ostc/oniro/bitbake-builder:latest
name: docker.io/onirocore/bitbake-builder:latest
variables:
variables:
# URL and branch or revision of the oniro.git repository which contains a
# URL and branch or revision of the oniro.git repository which contains a
# repo manifest file.
# repo manifest file.
@@ -99,6 +104,8 @@ reuse:
@@ -99,6 +104,8 @@ reuse:
# that modify oniro.git in any way (e.g. a branch, a pull request or merge
# that modify oniro.git in any way (e.g. a branch, a pull request or merge
# train).
# train).
GIT_STRATEGY: none
GIT_STRATEGY: none
 
CI_GITLAB_USER_ID: "oniro-core-bot"
 
CI_GITLAB_USER_EMAIL: "oniro-core-bot@eclipse.org"
cache:
cache:
- key:
- key:
prefix: repo-mirror-$CI_ONIRO_MANIFEST_MIRROR_REPO_REV
prefix: repo-mirror-$CI_ONIRO_MANIFEST_MIRROR_REPO_REV
@@ -138,8 +145,8 @@ reuse:
@@ -138,8 +145,8 @@ reuse:
# create and send commits.
# create and send commits.
- gl_section_open_collapsed setup_git "Setting up git"
- gl_section_open_collapsed setup_git "Setting up git"
- git config --global --add safe.directory "$CI_PROJECT_DIR"
- git config --global --add safe.directory "$CI_PROJECT_DIR"
- git config --global user.name "Oniro Core Project Bot"
- git config --global user.email "$CI_GITLAB_USER_EMAIL"
- git config --global user.email "oniro-core-bot@eclipse.org"
- git config --global user.name "$CI_GITLAB_USER_ID"
- gl_section_close setup_git
- gl_section_close setup_git
# Since CI_PROJECT_DIR is set to 'none', GitLab runner does not perform any
# Since CI_PROJECT_DIR is set to 'none', GitLab runner does not perform any
@@ -188,7 +195,7 @@ build-docs:
@@ -188,7 +195,7 @@ build-docs:
extends: [.oniro-repo-workspace]
extends: [.oniro-repo-workspace]
interruptible: true
interruptible: true
image:
image:
name: registry.ostc-eu.org/ostc/oniro/docs-builder:latest
name: docker.io/onirocore/docs-builder:latest
script:
script:
- make -C docs
- make -C docs
- mv docs/build "$CI_PROJECT_DIR"
- mv docs/build "$CI_PROJECT_DIR"
@@ -210,40 +217,45 @@ build-docs:
@@ -210,40 +217,45 @@ build-docs:
<!-- add docs at the exact version are testing -->
<!-- add docs at the exact version are testing -->
<project name="${CI_PROJECT_NAME}" path="docs" remote="oniro-override" revision="${CI_COMMIT_SHA}" />
<project name="${CI_PROJECT_NAME}" path="docs" remote="oniro-override" revision="${CI_COMMIT_SHA}" />
</manifest>
</manifest>
rules:
# rules:
# During the merge request, substitute the "docs" repository that is
# # During the merge request, substitute the "docs" repository that is
# described by the manifest with the project that is the source of the
# # described by the manifest with the project that is the source of the
# merge request. This does not test the merged result but is the next best
# # merge request. This does not test the merged result but is the next best
# thing we can do right now.
# # thing we can do right now.
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
# - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
variables:
# variables:
CI_ONIRO_REPO_WORKSPACE_LOCAL_MANIFEST_INTERPRETER: eval
# CI_ONIRO_REPO_WORKSPACE_LOCAL_MANIFEST_INTERPRETER: eval
CI_ONIRO_REPO_WORKSPACE_LOCAL_MANIFEST: |
# CI_ONIRO_REPO_WORKSPACE_LOCAL_MANIFEST: |
cat <<__EOM__
# cat <<__EOM__
<?xml version="1.0" encoding="UTF-8"?>
# <?xml version="1.0" encoding="UTF-8"?>
<manifest>
# <manifest>
<!-- remove original docs project entry -->
# <!-- remove original docs project entry -->
<remove-project name="oniro-core/docs.git" />
# <remove-project name="oniro-core/docs.git" />
<!-- add remote representing the project -->
# <!-- add remote representing the project -->
<remote name="oniro-override" fetch="${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}/../" />
# <remote name="oniro-override" fetch="${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}/../" />
<!-- add docs at the exact version are testing -->
# <!-- add docs at the exact version are testing -->
<project name="$(basename "$CI_MERGE_REQUEST_SOURCE_PROJECT_PATH")" path="docs" remote="oniro-override" revision="${CI_COMMIT_SHA}" />
# <project name="$(basename "$CI_MERGE_REQUEST_SOURCE_PROJECT_PATH")" path="docs" remote="oniro-override" revision="${CI_COMMIT_SHA}" />
</manifest>
# </manifest>
__EOM__
# __EOM__
# Or when things land.
# # Or when things land.
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
# - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
deploy:
deploy:
extends: .oniro-repo-workspace
extends: .oniro-repo-workspace
image:
image:
name: registry.ostc-eu.org/ostc/oniro/docs-builder:latest
name: docker.io/onirocore/docs-builder:latest
stage: deploy
stage: deploy
 
variables:
 
CI_DOC_DEPLOY_REPO: "gitlab.eclipse.org/eclipse/oniro-core/oniro-readthedocs-aggregated.git"
 
CI_DOC_DEPLOY_REPO_BRANCH: "main"
 
CI_GITLAB_USERNAME: "oniro-core-bot"
 
CI_GITLAB_TOKEN: "<api token from gitlab"
script:
script:
# We are in the root of the git-repo workspace. Because
# We are in the root of the git-repo workspace. Because
# .oniro-repo-workspace uses GIT_STRATEGY=none, the workspace is not
# .oniro-repo-workspace uses GIT_STRATEGY=none, the workspace is not
# cleaned automatically.
# cleaned automatically.
- rm -rf aggregated
- rm -rf aggregated
- git clone https://user:$CI_ONIRO_AGGREGATED_DOCS_TOKEN@gitlab.eclipse.org/eclipse/oniro-core/oniro-readthedocs-aggregated.git aggregated
- git clone https://$CI_GITLAB_USERNAME:$CI_GITLAB_TOKEN@$CI_DOC_DEPLOY_REPO aggregated
- find aggregated -maxdepth 1 -not -path aggregated/.git -not -path aggregated -exec rm -rvf {} \;
- find aggregated -maxdepth 1 -not -path aggregated/.git -not -path aggregated -exec rm -rvf {} \;
- tar -c --dereference -C docs --exclude ./.git --exclude ./.gitlab-ci.yml . | tar -x -C aggregated
- tar -c --dereference -C docs --exclude ./.git --exclude ./.gitlab-ci.yml . | tar -x -C aggregated
# Commit and push back, if something changed.
# Commit and push back, if something changed.
@@ -253,9 +265,9 @@ deploy:
@@ -253,9 +265,9 @@ deploy:
msg="docs repository snapshot - $CI_COMMIT_BRANCH:$CI_COMMIT_SHA";
msg="docs repository snapshot - $CI_COMMIT_BRANCH:$CI_COMMIT_SHA";
git add -A;
git add -A;
git commit -sm "$msg";
git commit -sm "$msg";
git push origin HEAD:main;
git push origin HEAD:$CI_DOC_DEPLOY_REPO_BRANCH;
else
else
echo "Nothing new to commit.";
echo "Nothing new to commit.";
fi
fi
rules:
# rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
# - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
Loading