-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,991 additions
and
509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.