Skip to content

Commit

Permalink
Merge branch 'main' into Add-per-device-files-configuration-implement…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
RZandvoort committed Mar 24, 2024
2 parents f7fa830 + 609d16f commit 2d8d9f8
Show file tree
Hide file tree
Showing 28 changed files with 1,333 additions and 704 deletions.
8 changes: 4 additions & 4 deletions .github/commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* eslint-disable import/no-extraneous-dependencies */
const { maxLineLength } = require('@commitlint/ensure')
const validateBodyMaxLengthIgnoringDeps = async (parsedCommit) => {
const { maxLineLength } = await import('@commitlint/ensure');

const bodyMaxLineLength = 100

const validateBodyMaxLengthIgnoringDeps = (parsedCommit) => {
const { type, scope, body } = parsedCommit
const isDepsCommit =
type === 'chore'
&& body != null
&& body.includes('Updates the requirements on');

const bodyMaxLineLength = 100;

return [
isDepsCommit || !body || maxLineLength(body, bodyMaxLineLength),
`body's lines must not be longer than ${bodyMaxLineLength}`,
Expand Down
1 change: 1 addition & 0 deletions .github/spellcheck-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ ser
childs
ot
marshalling
te
9 changes: 0 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
on:
push:
branches:
- main
- "*.*.x"
tags:
- v*
schedule:
- cron: '0 0 * * *'

name: Continuous Delivery

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ jobs:
run: |
docker run -d -v `pwd`:/code:z --workdir /code --user root -e SQLITE_MANUFACTURER_DATABASE_URL='../ci-manufacturer-db.sqlite' -e SQLITE_OWNER_DATABASE_URL='../ci-owner-db.sqlite' -e SQLITE_RENDEZVOUS_DATABASE_URL='../ci-rendezvous-db.sqlite' --name tests devcontainer-fdo-rs sleep infinity
docker exec --user root tests cargo build --lib --bins --workspace --verbose
docker exec --user root tests diesel migration run --migration-dir ./migrations/migrations_manufacturing_server_sqlite --database-url ./ci-manufacturer-db.sqlite
docker exec --user root tests diesel migration run --migration-dir ./migrations/migrations_owner_onboarding_server_sqlite --database-url ./ci-owner-db.sqlite
docker exec --user root tests diesel migration run --migration-dir ./migrations/migrations_manufacturing_server_sqlite --database-url ./ci-manufacturer-db.sqlite
docker exec --user root tests diesel migration run --migration-dir ./migrations/migrations_owner_onboarding_server_sqlite --database-url ./ci-owner-db.sqlite
docker exec --user root tests diesel migration run --migration-dir ./migrations/migrations_rendezvous_server_sqlite --database-url ./ci-rendezvous-db.sqlite
docker exec --user root tests cargo test
docker exec --user root tests cargo test -- --ignored
docker stop tests
docker rm tests
64 changes: 38 additions & 26 deletions .packit.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# https://packit.dev/docs/configuration/

specfile_path: fido-device-onboard.spec
Expand All @@ -13,33 +14,44 @@ upstream_tag_template: v{version}
copy_upstream_release_description: true

srpm_build_deps:
- cargo
- cargo
- openssl-devel

actions:
create-archive:
- bash -c "sed -i -r \"s/Source0:.+/Source0:\ fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar/\" fido-device-onboard.spec"
- bash -c "sed -i \"/Source1/d\" fido-device-onboard.spec"
- bash -c "git archive --prefix=fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}/ --format=tar HEAD > fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
- bash -c "tar -xvf fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
- bash -c "ls -1 ./fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
fix-spec-file:
- "cat fido-device-onboard.spec"
create-archive:
- bash -c "cp ./patches/0001-Revert-chore-use-git-fork-for-aws-nitro-enclaves-cos.patch ."
- bash -c "git archive --prefix=fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}/ --format=tar HEAD > fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
- bash -c "./make-vendored-tarfile.sh ${PACKIT_PROJECT_VERSION}"
- bash -c "tar -xvf fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"
- bash -c "ls -1 ./fido-device-onboard-rs-${PACKIT_PROJECT_VERSION}.tar"

jobs:
- job: copr_build
trigger: pull_request
targets:
- fedora-development-aarch64
- fedora-development
- fedora-latest
- fedora-latest-aarch64
- job: copr_build
trigger: commit
branch: main
owner: "@fedora-iot" # copr repo namespace
project: fedora-iot # copr repo name so you can consume the builds
targets:
- fedora-development-aarch64
- fedora-development
- fedora-latest
- fedora-latest-aarch64
- &fdo_copr_build
job: copr_build
trigger: pull_request
targets:
epel-9: {}
fedora-latest-stable: {}
fedora-latest: {}
fedora-rawhide: {}
fedora-eln:
additional_repos:
- https://kojipkgs.fedoraproject.org/repos/eln-build/latest/$basearch/

- job: tests
trigger: pull_request
identifier: onboarding
fmf_path: test/fmf
tmt_plan: plans/onboarding
targets:
epel-9: {}
fedora-latest-stable: {}
fedora-latest: {}
fedora-rawhide: {}

- <<: *fdo_copr_build
trigger: commit
branch: main
owner: "@fedora-iot" # copr repo namespace
project: fedora-iot # copr repo name so you can consume the builds
...
Loading

0 comments on commit 2d8d9f8

Please sign in to comment.