Skip to content

Commit

Permalink
Merge branch 'main' into build-for-static-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kahboom authored Mar 21, 2024
2 parents 788bbf9 + bd53c72 commit ea0a3fd
Show file tree
Hide file tree
Showing 12 changed files with 1,467 additions and 69 deletions.
11 changes: 11 additions & 0 deletions .github/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
coverage:
status:
project:
default:
informational: true
target: auto
threshold: 0.5%
base: auto

github_checks:
annotations: false
5 changes: 5 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ jobs:
run: npm install
- name: ⚙️ Run tests
run: npm run test --coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: securesign/rekor-search-ui
6 changes: 6 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run format
npm run test
npm run build
4 changes: 2 additions & 2 deletions .tekton/rekor-search-ui-1-0-gamma-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ spec:
- name: name
value: git-clone
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:ddc1b741a59e24817b24f190aab820700b6a8cf78cdd1827c403375bdba8aeee
value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:fffe6234a4d60c63b97af86642369e4931a404f6dc8be0d12743f7651a4dc802
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -255,7 +255,7 @@ spec:
- name: name
value: source-build
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:de78aa846dd6a73242c7f93c981ee2ff4ceb5cf97e6a2aaaf3a87ef2e3599798
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:dce619d12de143d9f2b84b6293027cd053580552219f3c632d91acd901ab294b
- name: kind
value: task
resolver: bundles
Expand Down
4 changes: 2 additions & 2 deletions .tekton/rekor-search-ui-1-0-gamma-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ spec:
- name: name
value: git-clone
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:ddc1b741a59e24817b24f190aab820700b6a8cf78cdd1827c403375bdba8aeee
value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:fffe6234a4d60c63b97af86642369e4931a404f6dc8be0d12743f7651a4dc802
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -252,7 +252,7 @@ spec:
- name: name
value: source-build
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:de78aa846dd6a73242c7f93c981ee2ff4ceb5cf97e6a2aaaf3a87ef2e3599798
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:dce619d12de143d9f2b84b6293027cd053580552219f3c632d91acd901ab294b
- name: kind
value: task
resolver: bundles
Expand Down
8 changes: 6 additions & 2 deletions .tekton/rekor-search-ui-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ spec:
value: '{{revision}}'
- name: build-source-image
value: "true"
- name: prefetch-input
value: '{"type": "npm", "path":"."}'
- name: hermetic
value: "true"
pipelineSpec:
finally:
- name: show-sbom
Expand Down Expand Up @@ -162,7 +166,7 @@ spec:
- name: name
value: git-clone
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:ddc1b741a59e24817b24f190aab820700b6a8cf78cdd1827c403375bdba8aeee
value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:fffe6234a4d60c63b97af86642369e4931a404f6dc8be0d12743f7651a4dc802
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -247,7 +251,7 @@ spec:
- name: name
value: source-build
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:de78aa846dd6a73242c7f93c981ee2ff4ceb5cf97e6a2aaaf3a87ef2e3599798
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:dce619d12de143d9f2b84b6293027cd053580552219f3c632d91acd901ab294b
- name: kind
value: task
resolver: bundles
Expand Down
8 changes: 6 additions & 2 deletions .tekton/rekor-search-ui-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ spec:
value: '{{revision}}'
- name: build-source-image
value: "true"
- name: prefetch-input
value: '{"type": "npm", "path":"."}'
- name: hermetic
value: "true"
pipelineSpec:
finally:
- name: show-sbom
Expand Down Expand Up @@ -159,7 +163,7 @@ spec:
- name: name
value: git-clone
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:ddc1b741a59e24817b24f190aab820700b6a8cf78cdd1827c403375bdba8aeee
value: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:fffe6234a4d60c63b97af86642369e4931a404f6dc8be0d12743f7651a4dc802
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -244,7 +248,7 @@ spec:
- name: name
value: source-build
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:de78aa846dd6a73242c7f93c981ee2ff4ceb5cf97e6a2aaaf3a87ef2e3599798
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:dce619d12de143d9f2b84b6293027cd053580552219f3c632d91acd901ab294b
- name: kind
value: task
resolver: bundles
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM registry.access.redhat.com/ubi9/nodejs-18@sha256:773645c3eae02529e09c04a843
#
COPY . .
USER root
ENV NODE_ENV production
EXPOSE 3000
RUN echo "export PATH=${PATH}:$HOME/node_modules/.bin" >> ~/.bashrc && \
npm install --ignore-scripts && \
Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
[![🧪 Unit Tests (Jest) 🧪](https://github.com/securesign/rekor-search-ui/actions/workflows/unit-tests.yaml/badge.svg)](https://github.com/securesign/rekor-search-ui/actions/workflows/unit-tests.yaml)
[![codecov](https://codecov.io/gh/securesign/rekor-search-ui/graph/badge.svg?token=1QS2BK1PQL)](https://codecov.io/gh/securesign/rekor-search-ui)

This repo contains a simple UI for searching Search the Rekor public transparency log.

https://search.sigstore.dev/
https://securesign.github.io/rekor-search-ui/

![Rekor UI Screenshot](assets/screenshot.png)

## Requirements

- [Node.js](https://nodejs.org/en) 18.x+
- Access to a [Rekor server](https://github.com/securesign/rekor), or a full deployment of [Trusted Artifact Signer (TAS)](https://access.redhat.com/documentation/en-us/red_hat_trusted_artifact_signer/2024-q1/html/deployment_guide/verify_the_trusted_artifact_signer_installation)

## Getting Started

Install dependencies:
First, install the dependencies:

```bash
npm install
```

First, run the development server:
Then, run the development server:

```bash
npm run dev
Expand All @@ -32,17 +40,17 @@ npm run test

Launches the test runner in the interactive watch mode.

Tests are colocated and live as closely to corresponding code as possible.
Tests are co-located and live as closely to corresponding code as possible.

## Deploy

The app is based on [Next.JS](https://nextjs.org/) and is automatically built & deployed to GitHub Pages when pushing to the `main` branch.

## Internal Server Configuration

This app supports overriding of the default rekor server instance for those running private instances of the sigstore stack.
This app supports overriding of the default rekor server instance for those running private instances of the Trusted Artifact Signer (TAS) stack.
Create a `.env.local` file at the root and include in it this environment variable

```properties
NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN=https://privaterekor.sigstore.dev
NEXT_PUBLIC_REKOR_DEFAULT_DOMAIN=https://privaterekor.example.com
```
17 changes: 17 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { codecovWebpackPlugin } = require("@codecov/webpack-plugin");

/** @type {import('next').NextConfig} */
const nextConfig = {
env: {
Expand All @@ -18,6 +20,21 @@ const nextConfig = {
"@patternfly/react-icons",
"@patternfly/react-styles",
],
webpack: config => {
config.plugins = [
...config.plugins,

// keep codecov webpack plugin after all other plugins
codecovWebpackPlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: "rekor-search-ui-webpack-bundle",
uploadToken: process.env.CODECOV_TOKEN,
}),
];

// important: return the modified config
return config;
},
};

module.exports = nextConfig;
Loading

0 comments on commit ea0a3fd

Please sign in to comment.