This project contains tools that make building and maintaining a landscape easier by pulling data from LFX on projects and members.
It is an evolution of the former landscape-tools, with a refactor to add the ability to pull projects from LFX and generate text logos when a pure SVG does not exist. Additional differences include:
- Only leverage LFX data for members and projects; no longer looks up in CrunchBase or other landscapes.
- Pull review data from a TAC repo using a specific project format, if used.
- More verbose error messages that improve debugging.
- Add secrets for
PAT
, which is a GitHub Personal Authorization Token set for therepo
scope. - Add a new label -
automated-build
. This is for this workflow to work and shouldn't be used for anything else. - Add the following code to a
build.yml
file in your landscape repo's.github/workflows/
directory.
name: Build Landscape from LFX
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * *"
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- uses: jmertic/lfx-landscape-tools@e9e2ce77a3152780ec98fe30b8d5d832953a95c3 # 20241114
with:
project_processing: skip # see options in action.yml
env:
token: ${{ secrets.PAT }}
repository: ${{ github.repository }}
ref: ${{ github.ref }}
- Add the following code to a
validate.yml
file in your landscape repo's.github/workflows/
directory.
name: Validate Landscape
on:
merge_group:
pull_request:
branches:
- main
- master
jobs:
validate-landscape:
runs-on: ubuntu-latest
name: "Validate landscape.yml file"
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: cncf/landscape2-validate-action@7f299c46e9b03b4e8bc2896882734fb0b0756b37 # v2.0.0
with:
target_kind: data
target_path: ./landscape.yml
- uses: pascalgn/automerge-action@7961b8b5eec56cc088c140b56d864285eabd3f67 # v0.16.4
if: success()
env:
GITHUB_TOKEN: "${{ secrets.PAT }}"
MERGE_LABELS: "automated-build"
MERGE_RETRY_SLEEP: 300000
MERGE_METHOD: "squash"
You can install this tool on your local computer via pipx
pipx install git+https://github.com/jmertic/lfx-landscape-tools.git
Similarly, you can use the command below to upgrade your local install.
pipx upgrade lfx-landscape-tools
You can then use the lfx_landscape
command to run the various commands. Use lfx_landscape --help
for the options.
Feel free to send issues or pull requests ( with a DCO signoff of course :-) ) in accordance with the contribution guidelines