Skip to content

Commit

Permalink
Merge branch 'lf-edge:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
roja-zededa authored Aug 29, 2024
2 parents af2a10c + 80611a1 commit 7da8261
Show file tree
Hide file tree
Showing 617 changed files with 78,938 additions and 16,729 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
/pkg/pillar/nireconciler/ @milan-zededa
/pkg/pillar/nistate/ @milan-zededa
/pkg/pillar/sriov/ @uncleDecart
/pkg/pillar/uplinkprober/ @milan-zededa
/pkg/pillar/portprober/ @milan-zededa
/pkg/pillar/utils/ @milan-zededa
/pkg/pillar/volumehandlers/ @OhmSpectator
Expand Down
63 changes: 4 additions & 59 deletions .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# qemu-user-static

---
name: Assets
name: Release Assets
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
Expand Down Expand Up @@ -47,8 +47,8 @@ jobs:
# if the default server is responding -- we can skip apt update
$APT_INSTALL || { sudo apt update && $APT_INSTALL ; }
echo "ARCH=${{ matrix.arch }}" >> "$GITHUB_ENV"
echo "TAG=$(git describe --always --tags | grep -E '[0-9]*\.[0-9]*\.[0-9]*' || echo snapshot)" >> "$GITHUB_ENV"
- name: ensure clean assets dir
echo "TAG=$(git describe --always --tags | grep -E '[0-9]+\.[0-9]+\.[0-9]+-(lts|rc[0-9]+)' || echo snapshot)" >> "$GITHUB_ENV"
- name: ensure clean assets directory
run: |
rm -rf assets && mkdir -p assets
- name: Pull the EVE release from DockerHUB or build it
Expand Down Expand Up @@ -80,60 +80,6 @@ jobs:
docker create --name eve_sources "$EVE_SOURCES" bash
docker export --output assets/collected_sources.tar.gz eve_sources
docker rm eve_sources
- name: Create a GitHub release and clean up artifacts
id: create-release
uses: actions/github-script@v7
with:
result-encoding: string
script: |
console.log(context)
const {TAG} = process.env
// first create a release -- it is OK if that fails,
// since it means the release is already there
try {
const raw = (await github.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: `${TAG}`,
name: `Release ${TAG}`,
prerelease: true,
})).data
console.log(raw)
} catch (e) {}
// get the release ID
const release = (await github.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: `${TAG}`,
})).data
// get assets for that ID
const assets = (await github.repos.listReleaseAssets({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
})).data
// remove all assets (since we will be uploading new ones)
// note that we only consider assets coming from the same
// architecture we're running on -- this is because GH
// release assets can only be flat (no folders allowed)
if (Array.isArray(assets) && assets.length > 0) {
for (const asset of assets) {
if (asset.name.startsWith('${{ env.ARCH }}')) {
await github.repos.deleteReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
asset_id: asset.id,
})
}
}
}
return release.upload_url
- name: Rename files for release
id: rename-files-for-release
run: |
Expand All @@ -146,14 +92,13 @@ jobs:
mv assets/ipxe.efi.cfg assets/${{ env.ARCH }}.ipxe.efi.cfg
mv assets/ipxe.efi.ip.cfg assets/${{ env.ARCH }}.ipxe.efi.ip.cfg
mv assets/collected_sources.tar.gz assets/${{ env.ARCH }}.collected_sources.tar.gz
- name: Upload release files
id: upload-release-files
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ inputs.tag_ref }}
files: |
assets/${{ env.ARCH }}.rootfs.img
assets/${{ env.ARCH }}.kernel
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/commit-messages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2024, Zededa, Inc.
# SPDX-License-Identifier: Apache-2.0
---
name: Lint Commit Messages

on: # yamllint disable-line rule:truthy
push:
branches:
- "master"
- "[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+-stable"
pull_request:
branches:
- "master"
- "[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+-stable"

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
fetch-depth: 0

- name: Fetch the PR's head ref
run: |
git fetch origin ${{ github.event.pull_request.head.sha }}:${{ github.event.pull_request.head.ref }}
git checkout ${{ github.event.pull_request.head.ref }}
- name: Create virtual environment
run: |
cd tools/check-commit-messages
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- name: Lint commit messages
run: |
cd tools/check-commit-messages
source .venv/bin/activate
python check_commit_messages.py ${{ github.event.pull_request.base.sha }}
12 changes: 6 additions & 6 deletions .github/workflows/eden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,26 @@ jobs:
hv: [kvm]
platform: ["generic"]
if: github.event.review.state == 'approved'
uses: lf-edge/eden/.github/workflows/[email protected].10
uses: lf-edge/eden/.github/workflows/[email protected].12
secrets: inherit
with:
eve_image: "evebuild/pr:${{ github.event.pull_request.number }}"
eve_artifact_name: eve-${{ matrix.hv }}-${{ matrix.arch }}-${{ matrix.platform }}
artifact_run_id: ${{ needs.get-run-id.outputs.result }}
eden_version: "0.9.10"
eden_version: "0.9.12"

test_suite_master:
if: github.ref == 'refs/heads/master'
uses: lf-edge/eden/.github/workflows/[email protected].10
uses: lf-edge/eden/.github/workflows/[email protected].12
secrets: inherit
with:
eve_image: "lfedge/eve:snapshot"
eden_version: "0.9.10"
eden_version: "0.9.12"

test_suite_tag:
if: startsWith(github.ref, 'refs/tags')
uses: lf-edge/eden/.github/workflows/[email protected].10
uses: lf-edge/eden/.github/workflows/[email protected].12
secrets: inherit
with:
eve_image: "lfedge/eve:${{ github.ref_name }}"
eden_version: "0.9.10"
eden_version: "0.9.12"
3 changes: 3 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ See [EVE Wiki](https://wiki.lfedge.org/display/EVE/Community) for governance gui
## List of maintainers (in alphabetical order)

* Avi Deitcher `[email protected]`
* Nikolay Martyanov `[email protected]`
* Erik Nordmark `[email protected]`
* Milan Lenco `[email protected]`
* Roman Penyaev `[email protected]`
* Renê Pinto `[email protected]`
* Roman Shaposhnik `[email protected]`
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ endif
# set this to the current tag only if we are building from a tag
ROOTFS_VERSION:=$(if $(findstring snapshot,$(REPO_TAG)),$(EVE_SNAPSHOT_VERSION)-$(REPO_BRANCH)-$(REPO_SHA)$(REPO_DIRTY_TAG)$(DEV_TAG),$(REPO_TAG))

#if KERNEL_TAG is set, append it to the ROOTFS_VERSION but replace docker.io/lfedge/eve-kernel:eve-kernel- part with k-
SHORT_KERNEL_TAG=$(subst docker.io/lfedge/eve-kernel:eve-kernel-,k-,$(KERNEL_TAG))
ROOTFS_VERSION:=$(if $(SHORT_KERNEL_TAG),$(ROOTFS_VERSION)-$(SHORT_KERNEL_TAG),$(ROOTFS_VERSION))

HOSTARCH:=$(subst aarch64,arm64,$(subst x86_64,amd64,$(shell uname -m)))
# by default, take the host architecture as the target architecture, but can override with `make ZARCH=foo`
# assuming that the toolchain supports it, of course...
Expand Down Expand Up @@ -306,7 +310,7 @@ PARSE_PKGS=$(if $(strip $(EVE_HASH)),EVE_HASH=)$(EVE_HASH) DOCKER_ARCH_TAG=$(DOC
LINUXKIT=$(BUILDTOOLS_BIN)/linuxkit
# linuxkit version. This **must** be a published semver version so it can be downloaded already compiled from
# the release page at https://github.com/linuxkit/linuxkit/releases
LINUXKIT_VERSION=v1.3.0
LINUXKIT_VERSION=v1.5.1
LINUXKIT_SOURCE=https://github.com/linuxkit/linuxkit
LINUXKIT_OPTS=$(if $(strip $(EVE_HASH)),--hash) $(EVE_HASH) $(if $(strip $(EVE_REL)),--release) $(EVE_REL)
LINUXKIT_PKG_TARGET=build
Expand Down Expand Up @@ -1014,15 +1018,16 @@ endif

# If DEV=y and file pkg/my_package/build-dev.yml exists, returns the path to that file.
# If RSTATS=y and file pkg/my_package/build-rstats.yml exists, returns the path to that file.
# If HV=kubevirt and file pkg/my_package/build-kubevirt.yml exists, returns the path to that file.
# If HV=kubevirt and DEV=y and file pkg/my_package/build-kubevirt-dev.yml exists, returns the path to that file.
# If HV=kubevirt and DEV!=y and file pkg/my_package/build-kubevirt.yml exists, returns the path to that file.
# Otherwise returns pkg/my_package/build.yml.
get_pkg_build_yml = $(if $(filter kubevirt,$(HV)), $(call get_pkg_build_kubevirt_yml,$1), \
$(if $(filter y,$(RSTATS)), $(call get_pkg_build_rstats_yml,$1), \
$(if $(filter y,$(DEV)), $(call get_pkg_build_dev_yml,$1), build.yml)))
get_pkg_build_dev_yml = $(if $(wildcard pkg/$1/build-dev.yml),build-dev.yml,build.yml)
get_pkg_build_rstats_yml = $(if $(wildcard pkg/$1/build-rstats.yml),build-rstats.yml,build.yml)
get_pkg_build_kubevirt_yml = $(if $($(DEV),y),build-kubevirt-dev.yml, \
$(if $(wildcard pkg/$1/build-kubevirt.yml),build-kubevirt.yml,build.yml))
get_pkg_build_kubevirt_yml = $(if $(and $(filter y,$(DEV)),$(wildcard pkg/$1/build-kubevirt-dev.yml)),build-kubevirt-dev.yml, \
$(if $(wildcard pkg/$1/build-kubevirt.yml),build-kubevirt.yml,build.yml))

eve-%: pkg/%/Dockerfile build-tools $(RESCAN_DEPS)
$(QUIET): "$@: Begin: LINUXKIT_PKG_TARGET=$(LINUXKIT_PKG_TARGET)"
Expand Down
Loading

0 comments on commit 7da8261

Please sign in to comment.