Skip to content

Commit 8b042ac

Browse files
committed
Bump version to 1.23.0
2 parents 9ce9c61 + 3a0fb8d commit 8b042ac

38 files changed

+1991
-509
lines changed

.github/actions/build/action.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build and test Deb package for Litani
2+
description: Build and test Deb package for Litani
3+
inputs:
4+
version:
5+
description: Version of deb package
6+
required: true
7+
outputs:
8+
deb-package-path:
9+
description: Deb Package Path
10+
value: ${{steps.create_packages.outputs.deb_package}}
11+
deb-package-name:
12+
description: Deb Package Name
13+
value: ${{steps.create_packages.outputs.deb_package_name}}
14+
runs:
15+
using: composite
16+
steps:
17+
- name: Setup directory for deb package
18+
run: |
19+
echo ${{ inputs.version }}
20+
sudo apt-get install -y mandoc scdoc ninja-build
21+
mkdir -p litani-${{ inputs.version }}/{DEBIAN,usr/{bin,libexec/litani,share/{doc/litani,man/{man1,man5,man7}}}}
22+
touch litani-${{ inputs.version }}/DEBIAN/control
23+
cat << EOF > litani-${{ inputs.version }}/DEBIAN/control
24+
Package: Litani
25+
Version: ${{ inputs.version }}
26+
Architecture: amd64
27+
Depends: ninja-build, gnuplot, graphviz, python3-jinja2
28+
Maintainer: Kareem Khazem <[email protected]>
29+
Description: Litani is a build system that provides an HTML dashboard of
30+
job results, as well as a JSON-formatted record of job results. It
31+
provides platform-independent job control (timeouts, return code control)
32+
and an output format that is easy to render into reports (for example,
33+
using the built-in renderer).
34+
EOF
35+
./doc/configure && ninja
36+
mv bin lib templates litani litani-${{ inputs.version }}/usr/libexec/litani/
37+
mv doc/out/man/*.1 litani-${{ inputs.version }}/usr/share/man/man1
38+
mv doc/out/man/*.5 litani-${{ inputs.version }}/usr/share/man/man5
39+
mv doc/out/man/*.7 litani-${{ inputs.version }}/usr/share/man/man7
40+
mv doc/out/html/index.html litani-${{ inputs.version }}/usr/share/doc/litani
41+
ln -s /usr/libexec/litani/litani litani-${{ inputs.version }}/usr/bin/
42+
rm -r $(ls -A | grep -v litani-${{ inputs.version }})
43+
shell: bash
44+
- name: Create .deb package
45+
id: create_packages
46+
run: |
47+
sudo dpkg-deb --build --root-owner-group litani-${{ inputs.version }}
48+
deb_package_name="$(ls *.deb)"
49+
echo "::set-output name=deb_package::$deb_package_name"
50+
echo "::set-output name=deb_package_name::$deb_package_name"
51+
shell: bash
52+
- name: Install Litani using deb package
53+
run: sudo apt-get update && sudo apt install -y ./litani-${{ inputs.version }}.deb
54+
shell: bash
55+
- name: Test deb package
56+
run: |
57+
litani -h
58+
man litani
59+
litani init --project-name test
60+
litani add-job --command '/usr/bin/true' --pipeline-name 'test' --ci-stage test
61+
litani run-build
62+
shell: bash
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
pull_request:
3+
types: [opened, synchronize, reopened, labeled, unlabeled]
4+
5+
name: Upload deb package to artifacts
6+
jobs:
7+
ubuntu-20_04-package:
8+
if: "contains(github.event.pull_request.labels.*.name, 'create-deb-package')"
9+
name: Generate ubuntu-20.04 debian package on PR
10+
runs-on: ubuntu-20.04
11+
env:
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Get Version
16+
run: |
17+
echo "VERSION=$(./litani -V)" >> $GITHUB_ENV
18+
- name: Build Deb Package
19+
id: build_deb_package
20+
uses: ./.github/actions/build
21+
with:
22+
version: ${{ env.VERSION }}
23+
- name: Upload report as artifact
24+
uses: actions/upload-artifact@main
25+
with:
26+
name: ${{ env.VERSION }}-${{ runner.os }}-deb-package
27+
path: ${{ steps.build_deb_package.outputs.deb-package-path }}

.github/workflows/release-brew.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
name: Release to brew
6+
jobs:
7+
homebrew-pr:
8+
name: Homebrew Bump Formula PR
9+
runs-on: macos-10.15
10+
steps:
11+
- name: Get release tag name
12+
run: echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\/}" >> $GITHUB_ENV
13+
- name: Configure git user name and email
14+
uses: Homebrew/actions/git-user-config@master
15+
with:
16+
username: aws-build-accumulator-release-ci
17+
- name: Create homebrew PR
18+
run: |
19+
brew update-reset
20+
brew bump-formula-pr --tag "$RELEASE_TAG" --revision "$GITHUB_SHA" litani
21+
env:
22+
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.RELEASE_CI_ACCESS_TOKEN }}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
name: Release deb package
6+
jobs:
7+
ubuntu-20_04-package:
8+
name: Generate ubuntu-20.04 debian package
9+
runs-on: ubuntu-20.04
10+
env:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Get Version
15+
run: echo "VERSION=${GITHUB_REF/refs\/tags\/}" >> $GITHUB_ENV
16+
- name: Build Deb Package
17+
id: build_deb_package
18+
uses: ./.github/actions/build
19+
with:
20+
version: ${{ env.VERSION }}
21+
- name: Upload release binary
22+
uses: actions/[email protected]
23+
with:
24+
upload_url: ${{ github.event.release.upload_url }}
25+
asset_path: ${{ steps.build_deb_package.outputs.deb-package-path }}
26+
asset_name: ${{ steps.build_deb_package.outputs.deb-package-name }}
27+
asset_content_type: application/x-deb

.github/workflows/release-packages.yaml

Lines changed: 0 additions & 85 deletions
This file was deleted.

.github/workflows/run-tests.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,18 @@ jobs:
1616
run: |
1717
brew install ninja
1818
python3 -m pip install jinja2
19+
1920
- name: Run Unit and e2e tests
2021
run: ./test/run
22+
continue-on-error: true
23+
timeout-minutes: 5
24+
25+
- name: Get absolute path to report dir
26+
run: echo "REPORT_PATH=$(readlink test/output/latest/html)" >> $GITHUB_ENV
27+
28+
- name: Upload report as artifact
29+
uses: actions/upload-artifact@main
30+
if: always()
31+
with:
32+
name: Report
33+
path: ${{ env.REPORT_PATH }}

CHANGELOG

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,79 @@
11
CHANGELOG
22
`````````
33

4+
Version 1.23.0 -- 2022-04-11
5+
----------------------------
6+
Summary=======
7+
8+
- Add get-jobs and set-jobs subcommands
9+
10+
- Add concurrency-safe HTML directory API
11+
12+
- Various improvements to HTML output
13+
14+
- Various improvements to user-facing and developer documentation
15+
16+
- Various improvements to automated release workflow
17+
18+
- Litani now dumps the stderr of all jobs regardless of return code
19+
20+
21+
Details
22+
=======
23+
24+
- Add get-jobs and set-jobs subcommands
25+
26+
Add two new subcommands for litani, get-jobs and set-jobs. These
27+
subcommands act as primitives for interacting with the list of jobs for a
28+
litani run. Testing indicates that using set-jobs is ~80x faster than using
29+
add-jobs sequentially.
30+
31+
get-jobs returns the list of jobs that have been added to a litani run
32+
either to stdout or to a file specified by the user. set-jobs allows the
33+
user to overwrite the job list by passing in a new list of jobs through
34+
stdin, a file, or a json string.
35+
36+
set-jobs allows the user to set many jobs at the same time without the
37+
overhead of starting up the python interpreter before each job is added.
38+
39+
Using get-jobs and set-jobs together, the user can achieve the same
40+
effect as transform-jobs in a more flexible manner which may be more
41+
familiar to those used to working with unix pipelines or sequences.
42+
These functions have also replaced the underlying code of
43+
transform-jobs.
44+
45+
46+
- Add concurrency-safe HTML directory API
47+
48+
This feature adds 3 new commands that allow Litani clients to access the
49+
HTML report, either for continuous viewing or modification.
50+
51+
- `litani print-html-dir` prints the path to a HTML report directory
52+
that will be continuously updated with new progress while litani
53+
run-build runs. This is the command for local users to use for viewing
54+
the HTML report in a browser, for example.
55+
- `litani acquire-html-dir` prints the path to an exclusively-locked
56+
HTML report directory. After this command terminates, the printed-out
57+
directory will not be deleted or modified until `litani release-html-dir`
58+
is subsequently called. This is the command to use when you require
59+
prolonged exclusive access to HTML data, for example while doing a
60+
file transfer.
61+
- `litani release-html-dir` releases the lock on a previously-acquired
62+
HTML report directory. This allows other processes to attempt to lock
63+
the directory, and also allows `litani run-build` to acquire the
64+
directory for garbage collection.
65+
66+
This feature gives users a safe way to get the path to a HTML report
67+
directory that meets their usage requirements, and without relying on
68+
internal Litani implementation details.
69+
70+
71+
- Improvements to HTML output:
72+
- The pipeline page displays a list of tags for any job that has tags
73+
- The front dashboard displays the total runtime after the run completes
74+
- Minor colour, wording, and font fixes
75+
76+
477
Version 1.22.0 -- 2022-03-15
578
----------------------------
679
- Print out stderr when a job fails

0 commit comments

Comments
 (0)