Skip to content

Commit

Permalink
feat: Complete rewrite with major simplifications and new features
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
- Re-architected the CLI to lay the foundation for future technologies.
- Renamed the `deploy` command to `apply` to better reflect the changes it performs.
- Renamed the `diff` command to `plan` for clarity and alignment with the IaC ecosystem.
- Environments are now a lazily defined concept, simplifying configuration.
- Switched to a more human-readable configuration format (TOML).
- Streamlined workflow with the introduction of identifiers.
- Relocated the `ping` command to allow pinging both environments and services.
  • Loading branch information
MatisseB authored Feb 26, 2025
1 parent 56c616a commit 357678e
Show file tree
Hide file tree
Showing 222 changed files with 14,750 additions and 7,395 deletions.
21 changes: 19 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
target/
plugins/
# Version control
.git
.gitignore
.github

# Docker-related files
Dockerfile
.dockerignore

# Documentation and miscellaneous files
docs
README.md
licenserc.toml
.prototools
.moon
scripts

# Cargo build output (generated artifacts)
target
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- main

name: Checks
name: License enforcement

permissions:
contents: read
Expand All @@ -19,5 +19,5 @@ jobs:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
- name: Check license headers
uses: korandoru/hawkeye@v5
- name: Check License Header
uses: apache/skywalking-eyes/header@main
57 changes: 57 additions & 0 deletions .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish user docs

on:
push:
tags:
- 'docs/**'

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run
# in-progress and latest queued. However, do NOT cancel in-progress runs as
# we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false


jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup moon
uses: 'moonrepo/setup-toolchain@v0'
with:
auto-install: true
- name: verify documentation
id: check
uses: errata-ai/[email protected]
with:
files: docs/src
fail_on_error: true
vale_flags: "--config=docs/vale/.vale.ini"
- name: build the docs
id: build
run: moon docs:build
- name: Upload artifacts
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: docs/src/.vitepress/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Release LogCraft CLI docker image

on:
push:
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
tags:
- 'lgc/**'

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/release-lgc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: LogCraft CLI Release

permissions:
contents: "write"

on:
push:
tags:
- 'lgc/**'

jobs:
build:
strategy:
matrix:
os: [ubuntu-24.04, macos-15]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: 'moonrepo/setup-toolchain@v0'
with:
auto-install: true

- run: "moon '#plugin:build'"
- run: "moon lgc:build"

- run: "bash scripts/package.sh"

- name: Renaming OS and ARCH to lowercase
id: toLowerCase
run: |
echo osLowercase=$(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
echo archLowercase=$(echo $RUNNER_ARCH | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
- name: Upload CLI Artifacts
uses: actions/upload-artifact@v4
with:
name: lgc
path: |
releases/lgc-${{ steps.toLowerCase.outputs.osLowercase }}-${{ steps.toLowerCase.outputs.archLowercase }}.tar.gz
releases/lgc-${{ steps.toLowerCase.outputs.osLowercase }}-${{ steps.toLowerCase.outputs.archLowercase }}.tar.gz.sha256
releases/lgc-minimal-${{ steps.toLowerCase.outputs.osLowercase }}-${{ steps.toLowerCase.outputs.archLowercase }}.tar.gz
releases/lgc-minimal-${{ steps.toLowerCase.outputs.osLowercase }}-${{ steps.toLowerCase.outputs.archLowercase }}.tar.gz.sha256
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: |
releases/lgc-${{ steps.toLowerCase.outputs.osLowercase }}-${{ steps.toLowerCase.outputs.archLowercase }}.tar.gz
releases/lgc-${{ steps.toLowerCase.outputs.osLowercase }}-${{ steps.toLowerCase.outputs.archLowercase }}.tar.gz.sha256
releases/lgc-minimal-${{ steps.toLowerCase.outputs.osLowercase }}-${{ steps.toLowerCase.outputs.archLowercase }}.tar.gz
releases/lgc-minimal-${{ steps.toLowerCase.outputs.osLowercase }}-${{ steps.toLowerCase.outputs.archLowercase }}.tar.gz.sha256
name: ${{ github.ref_name }}
58 changes: 58 additions & 0 deletions .github/workflows/release-plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: LogCraft Plugin Release

permissions:
contents: "write"

on:
push:
tags:
- 'plugin/**'

jobs:
plan:
runs-on: ubuntu-latest
outputs:
name: ${{ steps.name.outputs.name }}
env:
TAG: ${{ github.ref_name }}
steps:
- name: Get plugin name
id: name
run: |
if [[ "${TAG}" =~ ^plugin/([^/]+)/([^/]+)$ ]]; then
echo "name=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
else
echo "Error: Invalid tag format: ${TAG}" >&2
exit 1
fi
build:
runs-on: ubuntu-24.04
needs: plan
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: 'moonrepo/setup-toolchain@v0'
with:
auto-install: true

- run: "moon '#plugin:build'"
- run: "bash scripts/package-plugins.sh"

- name: Upload Plugins Tarball
uses: actions/upload-artifact@v4
with:
name: plugins-tarball
path: |
releases/plugins.tar.gz
releases/plugins.tar.gz.sha256
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: |
releases/plugins.tar.gz
releases/plugins.tar.gz.sha256
name: ${{ github.ref_name }}
Loading

0 comments on commit 357678e

Please sign in to comment.