Skip to content

Commit c0fc26c

Browse files
authored
Add basic E2E tests (#2230)
Add a simple workflow that stands up the docker compose services and uses cosign to sign and verify using the local services. Signed-off-by: Colleen Murphy <[email protected]>
1 parent a4ee860 commit c0fc26c

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

.github/workflows/e2e.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#
2+
# Copyright 2025 The Sigstore Authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
name: E2E
17+
18+
on:
19+
push:
20+
branches:
21+
- main
22+
pull_request:
23+
24+
permissions:
25+
contents: read
26+
27+
jobs:
28+
e2e:
29+
name: Verify docker compose functionality with cosign
30+
runs-on: ubuntu-latest
31+
32+
steps:
33+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34+
with:
35+
persist-credentials: false
36+
37+
- uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
38+
39+
- uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
40+
41+
- name: Start Fulcio services
42+
run: |
43+
docker compose up --build --wait -d
44+
45+
- name: Make trusted root and signing config
46+
run: |
47+
curl http://localhost:5555/api/v1/rootCert > root.pem
48+
cosign trusted-root create \
49+
--fulcio="url=http://localhost:5555,certificate-chain=root.pem" \
50+
--ctfe="url=http://localhost:6962,public-key=./config/ctfe/pubkey.pem,start-time=2025-11-25T21:41:42+00:00" \
51+
--out=trusted-root.json
52+
cosign signing-config create \
53+
--fulcio="url=http://localhost:5555,api-version=1,start-time=2024-01-01T00:00:00Z,operator=test" \
54+
--out=signing-config.json
55+
56+
- name: Get test OIDC token
57+
uses: sigstore-conformance/extremely-dangerous-public-oidc-beacon@main
58+
59+
- name: Sign and verify with ID token
60+
run: |
61+
set -e
62+
echo "sample blob" > myblob
63+
cosign sign-blob myblob \
64+
-y \
65+
--identity-token $(cat ./oidc-token.txt) \
66+
--trusted-root=trusted-root.json \
67+
--signing-config=signing-config.json \
68+
--bundle=bundle.json
69+
cosign verify-blob myblob \
70+
--insecure-ignore-tlog \
71+
--trusted-root=trusted-root.json \
72+
--certificate-identity=https://github.com/sigstore-conformance/extremely-dangerous-public-oidc-beacon/.github/workflows/extremely-dangerous-oidc-beacon.yml@refs/heads/main \
73+
--certificate-oidc-issuer=https://token.actions.githubusercontent.com \
74+
--bundle=bundle.json

0 commit comments

Comments
 (0)