mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-12 16:55:31 -04:00
Figure out and document styling of player.
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
parent
ad103e6d7a
commit
2f5bb77fbb
12 changed files with 2860 additions and 1114 deletions
|
@ -14,9 +14,18 @@ ENV PATH="${PATH}:/usr/local/go/bin:/root/go/bin"
|
|||
RUN go install github.com/sigstore/cosign/cmd/cosign@latest
|
||||
RUN go install github.com/sigstore/rekor/cmd/rekor-cli@latest
|
||||
|
||||
ENV SHELL=/bin/bash
|
||||
# Enable RGB colors in PS1
|
||||
ENV TERM=xterm-256color
|
||||
ENV COLUMNS=200
|
||||
# Set width of terminal, default is ~80 and leads to broken lines for long lines,
|
||||
# e.g., curl & cosign commands.
|
||||
ENV COLUMNS=512
|
||||
# For PS1 to work shell needs to specified
|
||||
ENV SHELL=/bin/bash
|
||||
# ANSI color codes are used to control PS1 prompt. We use "\033[38;2;<r>;<g>;<b>m"
|
||||
# to control the foreground color with RBG colors [1]. Non-printable characters
|
||||
# need to be escaped with additional \[ and \], see [2].
|
||||
# [1]: https://stackoverflow.com/a/33206814/2306355
|
||||
# [2]: https://stackoverflow.com/a/19501528/2306355
|
||||
RUN echo 'export PS1="\[\033[38;2;144;255;153m\]~/constellation\[\033[0m\]\r\n\[\033[38;2;139;4;221m\]$\[\033[0m\] "' >> /root/.bashrc
|
||||
|
||||
# Copy install scripts
|
||||
|
|
|
@ -7,7 +7,7 @@ set CTRLC \003
|
|||
set record_name [lindex $argv 0];
|
||||
|
||||
proc expect_prompt {} {
|
||||
# make sure this matches your prompt
|
||||
# This matches the trailing 0m of our ANSI control sequence. See PS1 in Dockerfile.
|
||||
expect "0m "
|
||||
}
|
||||
|
||||
|
@ -17,12 +17,6 @@ proc run_command {cmd} {
|
|||
expect -timeout 1
|
||||
}
|
||||
|
||||
proc send_keystroke_to_interactive_process {key {addl_sleep 2}} {
|
||||
send "$key"
|
||||
expect -timeout 1
|
||||
sleep $addl_sleep
|
||||
}
|
||||
|
||||
# Start recording
|
||||
spawn asciinema rec --overwrite /recordings/check-sbom.cast
|
||||
send "\r"
|
||||
|
@ -47,7 +41,7 @@ run_command "curl -sLO https://github.com/edgelesssys/constellation/releases/lat
|
|||
expect_prompt
|
||||
run_command "grype constellation.spdx.sbom -o table -q"
|
||||
expect_prompt
|
||||
run_command "echo We are safe! :)"
|
||||
run_command "echo We are safe!"
|
||||
|
||||
# Stop recording
|
||||
send "exit"
|
||||
|
|
|
@ -2,18 +2,19 @@
|
|||
# Note: Expects to be able to run 'sudo install' without a password
|
||||
|
||||
set timeout -1
|
||||
set send_human {0.005 0.015 1 0.05 0.3}
|
||||
set send_human {0.05 0 1 0.05 0.3}
|
||||
set CTRLC \003
|
||||
set record_name [lindex $argv 0];
|
||||
|
||||
proc expect_prompt {} {
|
||||
# make sure this matches your prompt
|
||||
# This matches the trailing 0m of our ANSI control sequence. See PS1 in Dockerfile.
|
||||
expect "0m "
|
||||
}
|
||||
|
||||
proc run_command {cmd} {
|
||||
send -h "$cmd\r"
|
||||
expect -timeout 3
|
||||
send -h "$cmd"
|
||||
send "\r"
|
||||
expect -timeout 1
|
||||
}
|
||||
|
||||
# Start recording
|
||||
|
@ -22,25 +23,26 @@ send "\r"
|
|||
expect_prompt
|
||||
|
||||
### Step 0: Requirements
|
||||
# run_command "echo Step 0: Installing requirements"
|
||||
# expect_prompt
|
||||
# run_command "go install github.com/sigstore/cosign/cmd/cosign@latest"
|
||||
# expect_prompt
|
||||
# run_command "go install github.com/sigstore/rekor/cmd/rekor-cli@latest"
|
||||
# expect_prompt
|
||||
run_command "echo Step 0: Installing requirements"
|
||||
expect_prompt
|
||||
run_command "go install github.com/sigstore/cosign/cmd/cosign@latest"
|
||||
expect_prompt
|
||||
run_command "go install github.com/sigstore/rekor/cmd/rekor-cli@latest"
|
||||
expect_prompt
|
||||
|
||||
### Step 1: Download CLI
|
||||
run_command "echo Step 1: Download CLI and signature"
|
||||
expect_prompt
|
||||
run_command "curl -LO https://github.com/edgelesssys/constellation/releases/latest/download/constellation-linux-amd64"
|
||||
run_command "curl -sLO https://github.com/edgelesssys/constellation/releases/download/v2.2.2/constellation-linux-amd64"
|
||||
expect_prompt
|
||||
run_command "curl -LO https://github.com/edgelesssys/constellation/releases/latest/download/constellation-linux-amd64.sig"
|
||||
run_command "curl -sLO https://github.com/edgelesssys/constellation/releases/download/v2.2.2/constellation-linux-amd64.sig"
|
||||
expect_prompt
|
||||
|
||||
### Step 2: Verify the CLI using cosign
|
||||
run_command "echo Step 2: Verify the CLI using cosign and the public Rekor transparency log"
|
||||
expect_prompt
|
||||
run_command "COSIGN_EXPERIMENTAL=1 cosign verify-blob --key https://edgeless.systems/es.pub --signature constellation-linux-amd64.sig constellation-linux-amd64"
|
||||
# run_command "COSIGN_EXPERIMENTAL=1 cosign verify-blob --key https://edgeless.systems/es.pub --signature constellation-linux-amd64.sig constellation-linux-amd64"
|
||||
run_command "COSIGN_EXPERIMENTAL=1 cosign verify-blob --key https://github.com/edgelesssys/constellation/releases/download/v2.2.2/cosign.pub --signature constellation-linux-amd64.sig constellation-linux-amd64"
|
||||
expect_prompt
|
||||
|
||||
### Step 2b: Verify the CLI manually
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue