Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mv lifecycle to stand-alone directory #5425

Merged
merged 14 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .github/workflows/check-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
env:
# Common versions
GO_VERSION: "1.20"
PROJECT_PATH: "./lifecycle"

jobs:
coverage:
Expand All @@ -39,7 +40,7 @@ jobs:
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev

- name: Run Coverage
run: make coverage
run: cd ${{ env.PROJECT_PATH }} && make coverage

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
3 changes: 2 additions & 1 deletion .github/workflows/check-format-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
env:
# Common versions
GO_VERSION: "1.23"
PROJECT_PATH: "./lifecycle"

jobs:
format-code:
Expand All @@ -39,7 +40,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}

- name: Format Code
run: make format
run: cd ${{ env.PROJECT_PATH }} && make format

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
env:
# Common versions
GO_VERSION: "1.20"
PROJECT_PATH: "./lifecycle"

jobs:
check-license:
Expand All @@ -38,4 +39,4 @@ jobs:
go-version: ${{ env.GO_VERSION }}

- name: Check License
run: make verify-license
run: cd ${{ env.PROJECT_PATH }} && make verify-license
33 changes: 17 additions & 16 deletions .github/workflows/import-patch-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Import Patch Images Package
env:
# Common versions
GO_VERSION: "1.20"
PROJECT_PATH: "./lifecycle"

on:
workflow_call:
Expand Down Expand Up @@ -41,7 +42,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Resolve Modules
id: set-matrix
run: bash ./scripts/resolve-patch-modules.sh ${{ inputs.arch }} "true"
run: bash ./${{ env.PROJECT_PATH }}/scripts/resolve-patch-modules.sh ${{ inputs.arch }} "true"
resolve-modules:
runs-on: ubuntu-24.04
outputs:
Expand All @@ -58,7 +59,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Resolve Modules
id: set-matrix
run: bash ./scripts/resolve-patch-modules.sh ${{ inputs.arch }}
run: bash ./${{ env.PROJECT_PATH }}/scripts/resolve-patch-modules.sh ${{ inputs.arch }}
build:
needs: [ resolve-modules ]
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -91,12 +92,12 @@ jobs:

- name: Build Binaries
run: |
make build BINS=${{ matrix.binary }} PLATFORM=linux_${{ matrix.arch }}
cd ${{ env.PROJECT_PATH }} && make build BINS=${{ matrix.binary }} PLATFORM=linux_${{ matrix.arch }}
- name: Save Binaries
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.binary }}-${{ matrix.arch }}
path: bin/linux_${{ matrix.arch}}/${{ matrix.binary }}
path: ${{ env.PROJECT_PATH }}/bin/linux_${{ matrix.arch}}/${{ matrix.binary }}
test:
runs-on: ubuntu-24.04
if: ${{ (inputs.e2e == true) }}
Expand All @@ -120,13 +121,13 @@ jobs:
run: sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev
- name: Build E2e Test
run: |
go install github.com/onsi/ginkgo/v2/ginkgo
cd ${{ env.PROJECT_PATH }} && go install github.com/onsi/ginkgo/v2/ginkgo
cd test/e2e && ginkgo build .
- name: Save E2e Test
uses: actions/upload-artifact@v4
with:
name: e2e.test
path: test/e2e/e2e.test
path: ${{ env.PROJECT_PATH }}/test/e2e/e2e.test
docker:
needs: [ resolve-modules-arch,build ]
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -155,25 +156,25 @@ jobs:
uses: actions/download-artifact@v4
with:
name: lvscare-${{ matrix.arch }}
path: docker/lvscare
path: ${{ env.PROJECT_PATH }}/docker/lvscare

- name: Download sealctl
uses: actions/download-artifact@v4
with:
name: sealctl-${{ matrix.arch }}
path: docker/patch
path: ${{ env.PROJECT_PATH }}/docker/patch

- name: Download image-cri-shim
uses: actions/download-artifact@v4
with:
name: image-cri-shim-${{ matrix.arch }}
path: docker/patch
path: ${{ env.PROJECT_PATH }}/docker/patch

- name: Download sealos
uses: actions/download-artifact@v4
with:
name: sealos-${{ matrix.arch }}
path: docker/sealos
path: ${{ env.PROJECT_PATH }}/docker/sealos

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -182,22 +183,22 @@ jobs:

- name: Chmod a+x for docker
run: |
chmod a+x docker/sealos/*
chmod a+x docker/patch/*
chmod a+x docker/lvscare/*
chmod a+x ${{ env.PROJECT_PATH }}/docker/sealos/*
chmod a+x ${{ env.PROJECT_PATH }}/docker/patch/*
chmod a+x ${{ env.PROJECT_PATH }}/docker/lvscare/*

- name: Build and Push lvscare Image
uses: docker/build-push-action@v6
with:
context: docker/lvscare
file: docker/lvscare/Dockerfile.main
context: ${{ env.PROJECT_PATH }}/docker/lvscare
file: ${{ env.PROJECT_PATH }}/docker/lvscare/Dockerfile.main
push: true
build-args: Bin=lvscare
platforms: linux/${{ matrix.arch }}
tags: localhost:5000/${{ github.repository_owner }}/lvscare:${{ env.GIT_COMMIT_SHORT_SHA }}-${{ matrix.arch }}

- name: Build and Save Cluster Images
run: docker/patch/save-cluster-images.sh
run: ${{ env.PROJECT_PATH }}/docker/patch/save-cluster-images.sh
env:
ARCH: ${{ matrix.arch }}
OWNER: ${{ github.repository_owner }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
uses: goreleaser/goreleaser-action@v6
with:
args: release --clean --release-footer-tmpl=scripts/release/footer.md.tmpl --release-header-tmpl=scripts/release/head.md.tmpl
workdir: ./lifecycle
env:
USERNAME: ${{ github.repository_owner }}
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ vendor
pkg/registry/save/testdata/registry
.dummy.report.md
deploy/cloud/tars
.vscode/
.vscode/
/lifecycle/tools/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

IMAGE=localhost:5000/${OWNER}/lvscare:$GIT_COMMIT_SHORT_SHA-$ARCH
PATCH=ghcr.io/${OWNER}/sealos-patch:$GIT_COMMIT_SHORT_SHA-$ARCH
PATCH_DIR=docker/patch
PATCH_DIR=lifecycle/docker/patch
SEALOS=sudo sealos
SEALOS_VERSION=4.1.7

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ endif

# Linux command settings
STAGING_DIR := $(ROOT_DIR)/staging/src/github.com/labring
CODE_DIRS := $(ROOT_DIR)/pkg $(ROOT_DIR)/cmd $(ROOT_DIR)/controllers $(STAGING_DIR)/image-cri-shim $(STAGING_DIR)/lvscare
CODE_DIRS := $(ROOT_DIR)/pkg $(ROOT_DIR)/cmd $(STAGING_DIR)/image-cri-shim $(STAGING_DIR)/lvscare
FIND := find $(CODE_DIRS)

# verbose settings
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading