mirror of
https://github.com/Dasharo/meta-dts.git
synced 2026-03-06 14:51:12 -08:00
* .github: workflows: weekly.yml: use develop for building Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com> * .github/workflows/weekly.yml: add deploy-nightly-images Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com> * .github/workflows/build.yml: introduce ref input Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com> * .github/workflows/weekly.yml: fix indentation Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com> * .github/workflows/build.yml: add Prepare nightly SRCREV step, nightly input, hash output Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com> * .github/workflows/weekly.yml: deploy only 2 files, update nightly.ipxe last step Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com> * .github/workflows/weekly.yml: add checkout path, improve cleanup job order Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com> * .github/workflows/weekly.yml: fix nightly.ipxe path Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com> * .github/workflows/weekly.yml: nightly.ipxe correct sed command Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com> --------- Signed-off-by: Daniil Klimuk <daniil.klimuk@3mdeb.com> Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com> Co-authored-by: Artur Raglis <artur.raglis@3mdeb.com>
111 lines
3.6 KiB
YAML
111 lines
3.6 KiB
YAML
---
|
|
name: Weekly clean & rebuild
|
|
on:
|
|
schedule:
|
|
- cron: '0 8 * * 6'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: run-only-one-workflow
|
|
|
|
jobs:
|
|
build-uefi-sb:
|
|
uses: ./.github/workflows/build.yml
|
|
with:
|
|
cacheless: true
|
|
kas-path: meta-dts/kas-uefi-sb.yml
|
|
ref: develop
|
|
nightly: true
|
|
|
|
move-build-artifacts:
|
|
needs: build-uefi-sb
|
|
runs-on:
|
|
labels: dts-builder
|
|
steps:
|
|
- name: Move UEFI SB build artifacts
|
|
run: |
|
|
mv build build-sb
|
|
|
|
build:
|
|
needs: move-build-artifacts
|
|
uses: ./.github/workflows/build.yml
|
|
with:
|
|
cacheless: true
|
|
kas-path: meta-dts/kas.yml
|
|
ref: develop
|
|
nightly: true
|
|
|
|
deploy-cache:
|
|
name: Deploy cache on cache.dasharo.com
|
|
needs: build
|
|
runs-on:
|
|
labels: dts-builder
|
|
steps:
|
|
- name: Prepare SSH key
|
|
shell: bash
|
|
env:
|
|
SSH_KEY: ${{secrets.SSH_KEY}}
|
|
run: |
|
|
echo -e ${SSH_KEY} > ~/.ssh/dts-ci-key
|
|
chmod 600 ~/.ssh/dts-ci-key
|
|
- name: Send sstate-cache folder to cache.dasharo.com
|
|
shell: bash
|
|
run: |
|
|
ssh -i ~/.ssh/dts-ci-key builder@10.1.40.2 "mkdir -p cache/yocto/dts"
|
|
ssh -i ~/.ssh/dts-ci-key builder@10.1.40.2 "mkdir -p cache/yocto/dts/dts-uefi-sb"
|
|
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build/sstate-cache builder@10.1.40.2:cache/yocto/dts
|
|
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build-sb/sstate-cache builder@10.1.40.2:cache/yocto/dts/dts-uefi-sb
|
|
- name: Send downloads folder to cache.dasharo.com
|
|
shell: bash
|
|
run: |
|
|
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build/downloads builder@10.1.40.2:cache/yocto/dts
|
|
rsync -P -e "ssh -i ~/.ssh/dts-ci-key" -rlptD --delete build-sb/downloads builder@10.1.40.2:cache/yocto/dts/dts-uefi-sb
|
|
|
|
deploy-nightly-images:
|
|
name: Deploy nightly DTS artifacts on boot.dasharo.com
|
|
needs: build
|
|
runs-on:
|
|
labels: dts-builder
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: develop
|
|
fetch-depth: 1
|
|
path: "meta-dts"
|
|
- name: Prepare SSH key
|
|
shell: bash
|
|
env:
|
|
SSH_KEY: ${{secrets.SSH_KEY}}
|
|
run: |
|
|
echo -e ${SSH_KEY} > ~/.ssh/dts-ci-key
|
|
chmod 600 ~/.ssh/dts-ci-key
|
|
- name: Deploy DTS on boot.dasharo.com
|
|
shell: bash
|
|
run: |
|
|
cd build/tmp/deploy/images/genericx86-64/
|
|
scp -i ~/.ssh/dts-ci-key bzImage builder@10.1.40.2:boot/dts/nightly/
|
|
scp -i ~/.ssh/dts-ci-key dts-base-image-genericx86-64.cpio.gz builder@10.1.40.2:boot/dts/nightly/dts-base-image.cpio.gz
|
|
- name: Update nightly.ipxe variables
|
|
shell: bash
|
|
env:
|
|
DTS_SCRIPTS_HASH_FROM_BUILD: ${{ needs.build.outputs.dts_scripts_hash_output }}
|
|
run: |
|
|
META_DTS_REVISION_VALUE=$(cd meta-dts && git rev-parse HEAD)
|
|
DTS_SCRIPTS_VERSION_VALUE="${DTS_SCRIPTS_HASH_FROM_BUILD}"
|
|
ssh -i ~/.ssh/dts-ci-key builder@10.1.40.2 "sed -i 's/^set meta_dts_version.*/set meta_dts_version ${META_DTS_REVISION_VALUE}/' boot/dts/nightly.ipxe"
|
|
ssh -i ~/.ssh/dts-ci-key builder@10.1.40.2 "sed -i 's/^set dts_scripts_version.*/set dts_scripts_version ${DTS_SCRIPTS_VERSION_VALUE}/' boot/dts/nightly.ipxe"
|
|
|
|
cleanup:
|
|
name: Cleanup
|
|
if: always()
|
|
needs: [deploy-cache, deploy-nightly-images]
|
|
runs-on:
|
|
labels: dts-builder
|
|
steps:
|
|
- name: Cleanup after deployment
|
|
shell: bash
|
|
run: |
|
|
rm -rf ~/.ssh/dts-ci-key
|
|
rm -rf build build-sb
|