Skip to content

Commit

Permalink
Bump version to 1.23.0
Browse files Browse the repository at this point in the history
  • Loading branch information
karkhaz committed Apr 11, 2022
2 parents 9ce9c61 + 3a0fb8d commit 8b042ac
Show file tree
Hide file tree
Showing 38 changed files with 1,991 additions and 509 deletions.
62 changes: 62 additions & 0 deletions .github/actions/build/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build and test Deb package for Litani
description: Build and test Deb package for Litani
inputs:
version:
description: Version of deb package
required: true
outputs:
deb-package-path:
description: Deb Package Path
value: ${{steps.create_packages.outputs.deb_package}}
deb-package-name:
description: Deb Package Name
value: ${{steps.create_packages.outputs.deb_package_name}}
runs:
using: composite
steps:
- name: Setup directory for deb package
run: |
echo ${{ inputs.version }}
sudo apt-get install -y mandoc scdoc ninja-build
mkdir -p litani-${{ inputs.version }}/{DEBIAN,usr/{bin,libexec/litani,share/{doc/litani,man/{man1,man5,man7}}}}
touch litani-${{ inputs.version }}/DEBIAN/control
cat << EOF > litani-${{ inputs.version }}/DEBIAN/control
Package: Litani
Version: ${{ inputs.version }}
Architecture: amd64
Depends: ninja-build, gnuplot, graphviz, python3-jinja2
Maintainer: Kareem Khazem <karkhaz@amazon.co.uk>
Description: Litani is a build system that provides an HTML dashboard of
job results, as well as a JSON-formatted record of job results. It
provides platform-independent job control (timeouts, return code control)
and an output format that is easy to render into reports (for example,
using the built-in renderer).
EOF
./doc/configure && ninja
mv bin lib templates litani litani-${{ inputs.version }}/usr/libexec/litani/
mv doc/out/man/*.1 litani-${{ inputs.version }}/usr/share/man/man1
mv doc/out/man/*.5 litani-${{ inputs.version }}/usr/share/man/man5
mv doc/out/man/*.7 litani-${{ inputs.version }}/usr/share/man/man7
mv doc/out/html/index.html litani-${{ inputs.version }}/usr/share/doc/litani
ln -s /usr/libexec/litani/litani litani-${{ inputs.version }}/usr/bin/
rm -r $(ls -A | grep -v litani-${{ inputs.version }})
shell: bash
- name: Create .deb package
id: create_packages
run: |
sudo dpkg-deb --build --root-owner-group litani-${{ inputs.version }}
deb_package_name="$(ls *.deb)"
echo "::set-output name=deb_package::$deb_package_name"
echo "::set-output name=deb_package_name::$deb_package_name"
shell: bash
- name: Install Litani using deb package
run: sudo apt-get update && sudo apt install -y ./litani-${{ inputs.version }}.deb
shell: bash
- name: Test deb package
run: |
litani -h
man litani
litani init --project-name test
litani add-job --command '/usr/bin/true' --pipeline-name 'test' --ci-stage test
litani run-build
shell: bash
27 changes: 27 additions & 0 deletions .github/workflows/create-deb-package-on-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]

name: Upload deb package to artifacts
jobs:
ubuntu-20_04-package:
if: "contains(github.event.pull_request.labels.*.name, 'create-deb-package')"
name: Generate ubuntu-20.04 debian package on PR
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Get Version
run: |
echo "VERSION=$(./litani -V)" >> $GITHUB_ENV
- name: Build Deb Package
id: build_deb_package
uses: ./.github/actions/build
with:
version: ${{ env.VERSION }}
- name: Upload report as artifact
uses: actions/upload-artifact@main
with:
name: ${{ env.VERSION }}-${{ runner.os }}-deb-package
path: ${{ steps.build_deb_package.outputs.deb-package-path }}
22 changes: 22 additions & 0 deletions .github/workflows/release-brew.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
release:
types: [created]

name: Release to brew
jobs:
homebrew-pr:
name: Homebrew Bump Formula PR
runs-on: macos-10.15
steps:
- name: Get release tag name
run: echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\/}" >> $GITHUB_ENV
- name: Configure git user name and email
uses: Homebrew/actions/git-user-config@master
with:
username: aws-build-accumulator-release-ci
- name: Create homebrew PR
run: |
brew update-reset
brew bump-formula-pr --tag "$RELEASE_TAG" --revision "$GITHUB_SHA" litani
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.RELEASE_CI_ACCESS_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/release-deb-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
release:
types: [created]

name: Release deb package
jobs:
ubuntu-20_04-package:
name: Generate ubuntu-20.04 debian package
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Get Version
run: echo "VERSION=${GITHUB_REF/refs\/tags\/}" >> $GITHUB_ENV
- name: Build Deb Package
id: build_deb_package
uses: ./.github/actions/build
with:
version: ${{ env.VERSION }}
- name: Upload release binary
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.build_deb_package.outputs.deb-package-path }}
asset_name: ${{ steps.build_deb_package.outputs.deb-package-name }}
asset_content_type: application/x-deb
85 changes: 0 additions & 85 deletions .github/workflows/release-packages.yaml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,18 @@ jobs:
run: |
brew install ninja
python3 -m pip install jinja2
- name: Run Unit and e2e tests
run: ./test/run
continue-on-error: true
timeout-minutes: 5

- name: Get absolute path to report dir
run: echo "REPORT_PATH=$(readlink test/output/latest/html)" >> $GITHUB_ENV

- name: Upload report as artifact
uses: actions/upload-artifact@main
if: always()
with:
name: Report
path: ${{ env.REPORT_PATH }}
73 changes: 73 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,79 @@
CHANGELOG
`````````

Version 1.23.0 -- 2022-04-11
----------------------------
Summary=======

- Add get-jobs and set-jobs subcommands

- Add concurrency-safe HTML directory API

- Various improvements to HTML output

- Various improvements to user-facing and developer documentation

- Various improvements to automated release workflow

- Litani now dumps the stderr of all jobs regardless of return code


Details
=======

- Add get-jobs and set-jobs subcommands

Add two new subcommands for litani, get-jobs and set-jobs. These
subcommands act as primitives for interacting with the list of jobs for a
litani run. Testing indicates that using set-jobs is ~80x faster than using
add-jobs sequentially.

get-jobs returns the list of jobs that have been added to a litani run
either to stdout or to a file specified by the user. set-jobs allows the
user to overwrite the job list by passing in a new list of jobs through
stdin, a file, or a json string.

set-jobs allows the user to set many jobs at the same time without the
overhead of starting up the python interpreter before each job is added.

Using get-jobs and set-jobs together, the user can achieve the same
effect as transform-jobs in a more flexible manner which may be more
familiar to those used to working with unix pipelines or sequences.
These functions have also replaced the underlying code of
transform-jobs.


- Add concurrency-safe HTML directory API

This feature adds 3 new commands that allow Litani clients to access the
HTML report, either for continuous viewing or modification.

- `litani print-html-dir` prints the path to a HTML report directory
that will be continuously updated with new progress while litani
run-build runs. This is the command for local users to use for viewing
the HTML report in a browser, for example.
- `litani acquire-html-dir` prints the path to an exclusively-locked
HTML report directory. After this command terminates, the printed-out
directory will not be deleted or modified until `litani release-html-dir`
is subsequently called. This is the command to use when you require
prolonged exclusive access to HTML data, for example while doing a
file transfer.
- `litani release-html-dir` releases the lock on a previously-acquired
HTML report directory. This allows other processes to attempt to lock
the directory, and also allows `litani run-build` to acquire the
directory for garbage collection.

This feature gives users a safe way to get the path to a HTML report
directory that meets their usage requirements, and without relying on
internal Litani implementation details.


- Improvements to HTML output:
- The pipeline page displays a list of tags for any job that has tags
- The front dashboard displays the total runtime after the run completes
- Minor colour, wording, and font fixes


Version 1.22.0 -- 2022-03-15
----------------------------
- Print out stderr when a job fails
Expand Down
Loading

0 comments on commit 8b042ac

Please sign in to comment.