Skip to content

Commit

Permalink
Add Cloud Build step to create manifest. (#63)
Browse files Browse the repository at this point in the history
* Add step to create manifest.

* Fix indent.
  • Loading branch information
jiggoha authored Sep 26, 2023
1 parent 8be29f1 commit 4d73b79
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
37 changes: 30 additions & 7 deletions release/cloudbuild_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ steps:
args:
- ls
- output
# TODO(jayhou): change this to sign in the note format.
# Sign the built OS.
- name: gcr.io/cloud-builders/gcloud
args:
Expand Down Expand Up @@ -60,13 +61,35 @@ steps:
- cp
- output/trusted_os.sig
- gs://${_TRUSTED_OS_BUCKET}/${_TEST_TAG_NAME}/trusted_os_transparency_dev.sig

### TODO(jayhou): get WithSecure to sign it, copy their signature to the bucket above.

### TODO(jayhou): Construct log entry / Claimant Model statement.

### TODO(jayhou): Write the firmware release to the transparency log.

### Construct log entry / Claimant Model statement.
- name: golang
args:
- go
- get
- github.com/transparency-dev/armored-witness/cmd/manifest
- name: golang
args:
- go
- run
- github.com/transparency-dev/armored-witness/cmd/manifest
- -git_tag=${_TEST_TAG_NAME}
- -git_commit_fingerprint=${COMMIT_SHA}
- -firmware_file=output/trusted_os.elf
- -firmware_type=TRUSTED_OS
- -tamago_version=${_TAMAGO_VERSION}
- -output_file=output/trusted_os_manifest.json
# Print the content of the manifest JSON.
- name: bash
args:
- cat
- output/trusted_os_manifest.json
# Copy manifest JSON to the release bucket so that WithSecure may read it.
- name: gcr.io/cloud-builders/gcloud
args:
- storage
- cp
- output/trusted_os_manifest.json
- gs://${_TRUSTED_OS_BUCKET}/${_TEST_TAG_NAME}/trusted_os_manifest.json
substitutions:
# Build-related.
_TRUSTED_OS_BUCKET: trusted-os-artifacts-ci
Expand Down
2 changes: 2 additions & 0 deletions release/cloudbuild_withsecure_signature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ steps:
- >-
gcloud storage cp ${_WITHSECURE_DIR}/${_TEST_TAG_NAME}.sig
gs://${_TRUSTED_OS_BUCKET}/$(echo ${_TEST_TAG_NAME} | sed -e "s/^withsecure_v//")/trusted_os_withsecure.sig
### TODO(jayhou): Write the firmware release to the transparency log.
substitutions:
# TODO(jayhou): do not use CI bucket when we flip this trigger to prod.
_TRUSTED_OS_BUCKET: trusted-os-artifacts-ci
Expand Down

0 comments on commit 4d73b79

Please sign in to comment.