-
Notifications
You must be signed in to change notification settings - Fork 4
/
oe.yml
36 lines (33 loc) · 2.04 KB
/
oe.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# needs project-level variables (configured in gitlab's CI settings)
# - RSYNC_REPO_SRV: rsync url to publish package feeds
# - RSYNC_REPO_PORT (optional): ssh port to join rsync server for package feeds
# - RSYNC_SSTATE_SRV: rsync url to publish shared-state cache
# - RSYNC_SSTATE_PORT (optional): ssh port to join rsync server for shared-state cache
# needs global variables:
# - POKY_BASE: poky version nickname for separate download dirs
# - POKY_ENVINIT: shell scriptlet to initialize oe environement (eg. "poky/oe-init-build-env")
# - B: oe build directory
# - BUILD_GEN: generation for separate shared-states
# recommended global variables:
# - BUILDHISTREPO: git buildhistory repository
# - PRSERV: suitable value for PRSERV_HOST in local.conf
# needs platform variables:
# - BRANCHPREFIX_ARCH: for conf template directory and buildhistory branch prefix
# - UPDATE_ARCH: used to separate feeds for different architectures
.oe_setup:
before_script:
- 'test -z "$(git diff-index --name-only HEAD --)" || { echo >&2 "ERROR: local modifications after checkout, probably hit gitlab-runner bug - rerun the job, see https://gitlab.com/gitlab-org/gitlab-runner/-/issues/26993"; exit 1; }'
- BASEBRANCHNAME="${CI_COMMIT_REF_NAME#${BRANCHPREFIX_ARCH}/}"
- ./ci/mkconf --dir "${B}" --sstate-gen "${BUILD_GEN}" --download-dir "${HOME}/downloads-${POKY_BASE}" --template-conf "$PWD/conf-${BRANCHPREFIX_ARCH}" --buildhistory-repo "$BUILDHISTREPO" --buildhistory-ref "${BRANCHPREFIX_ARCH}/$BASEBRANCHNAME" --prserv "$PRSERV" --oe-env "${POKY_ENVINIT}"
.oe_deploy:
after_script:
- BASEBRANCHNAME="${CI_COMMIT_REF_NAME#${BRANCHPREFIX_ARCH}/}"
- ./ci/feed-publish --dir "${B}" --arch "${UPDATE_ARCH}" --feed "$BASEBRANCHNAME" --rsync-to "${RSYNC_REPO_SRV}" --ssh-port "${RSYNC_REPO_PORT}"
- ./ci/sstate-publish --sstate-gen "${BUILD_GEN}" --rsync-to "${RSYNC_SSTATE_SRV}" --ssh-port "${RSYNC_SSTATE_PORT}"
.oe_buildlogs_artifacts:
artifacts:
name: "oe-logs-${UPDATE_ARCH}-${CI_JOB_ID}"
when: always
expire_in: never
paths:
- "artifacts/"