Skip to content

Updated the description on how to update a delegation during a signing #945

Updated the description on how to update a delegation during a signing

Updated the description on how to update a delegation during a signing #945

#
# Copyright 2022 The Sigstore Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: TUF Client tests
on:
workflow_dispatch:
push:
paths:
- 'repository/**'
pull_request:
jobs:
client:
runs-on: ubuntu-latest
steps:
# Set up a repository server with python
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 2
- run: |
cd repository/repository/
python -m http.server 8001 &
echo "REPO=http://localhost:8001" >> $GITHUB_ENV
# Test with go-tuf client
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20'
check-latest: true
- run: |
go install github.com/theupdateframework/go-tuf/cmd/tuf-client@v0.5.1
- run: |
# Only 5.root.json is compatible with new versions of go-tuf
if [ -f repository/repository/5.root.json ]; then
tuf-client init http://localhost:8001 repository/repository/5.root.json
tuf-client list http://localhost:8001
fi
# Verify with a go-tuf client that can understand deprecated keys
go run ./tests/client-tests init http://localhost:8001 repository/repository/1.root.json
go run ./tests/client-tests list http://localhost:8001
# Test with rust client
- name: Configure cargo cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: |
/tmp/tuftool-target
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-tuftool
- name: Install tuftool
run: |
cargo install tuftool \
--version "0.10.0" --target-dir /tmp/tuftool-target
- run: |
tuftool download out \
--root repository/repository/2.root.json \
-t http://localhost:8001/targets \
-m http://localhost:8001
# Test with python-tuf ngclient
- run: |
python3 -m pip install securesystemslib[crypto,pynacl] tuf
python3 tests/client-tests/python-tuf.py