Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rekor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SafSec
rekor
Commits
4bbd263f
Unverified
Commit
4bbd263f
authored
3 years ago
by
Kenny Leung
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Mirror signed release images from GCR to GHCR as part of release (#701)
Signed-off-by:
Kenny Leung
<
kleung@chainguard.dev
>
parent
6ee1b234
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+1
-0
1 addition, 0 deletions
Makefile
release/README.md
+2
-1
2 additions, 1 deletion
release/README.md
release/cloudbuild.yaml
+25
-0
25 additions, 0 deletions
release/cloudbuild.yaml
release/release.mk
+15
-0
15 additions, 0 deletions
release/release.mk
with
43 additions
and
1 deletion
Makefile
+
1
−
0
View file @
4bbd263f
...
...
@@ -46,6 +46,7 @@ endif
KO_PREFIX
?=
gcr.io/projectsigstore
export
KO_DOCKER_REPO
=
$(
KO_PREFIX
)
REKOR_YAML
?=
rekor-
$(
GIT_TAG
)
.yaml
GHCR_PREFIX
?=
ghcr.io/sigstore/rekor
# Binaries
SWAGGER
:=
$(
TOOLS_BIN_DIR
)
/swagger
...
...
This diff is collapsed.
Click to expand it.
release/README.md
+
2
−
1
View file @
4bbd263f
...
...
@@ -31,7 +31,7 @@ $ git push origin ${RELEASE_TAG}
```
shell
$
gcloud builds submit
--config
<PATH_TO_CLOUDBUILD>
\
--substitutions
_GIT_TAG
=
<_GIT_TAG>,_TOOL_ORG
=
sigstore,_TOOL_REPO
=
rekor,_STORAGE_LOCATION
=
rekor-releases,_KEY_RING
=
<KEY_RING>,_KEY_NAME
=
<KEY_NAME>
\
--substitutions
_GIT_TAG
=
<_GIT_TAG>,_TOOL_ORG
=
sigstore,_TOOL_REPO
=
rekor,_STORAGE_LOCATION
=
rekor-releases,_KEY_RING
=
<KEY_RING>,_KEY_NAME
=
<KEY_NAME>
,_GITHUB_USER
=
<GITHUB_USER>
\
--project
<GCP_PROJECT>
```
...
...
@@ -47,6 +47,7 @@ Where:
-
`_KEY_NAME`
key name of your cosign key.
-
`_KEY_VERSION`
version of the key storaged in KMS. Default
`1`
.
-
`_KEY_LOCATION`
location in GCP where the key is storaged. Default
`global`
.
-
`_GITHUB_USER`
GitHub user to authenticate for pushing to GHCR.
4.
When the job finish, whithout issues, you should be able to see in GitHub a draft release.
You now can review the release, make any changes if needed and then publish to make it an official release.
...
...
This diff is collapsed.
Click to expand it.
release/cloudbuild.yaml
+
25
−
0
View file @
4bbd263f
...
...
@@ -86,6 +86,30 @@ steps:
&& make sign-container-release \
&& make sign-keyless-release
-
name
:
gcr.io/cloud-builders/docker
entrypoint
:
'
bash'
dir
:
"
go/src/sigstore/fulcio"
env
:
-
"
GOPATH=/workspace/go"
-
"
GOBIN=/workspace/bin"
-
PROJECT_ID=${PROJECT_ID}
-
KEY_LOCATION=${_KEY_LOCATION}
-
KEY_RING=${_KEY_RING}
-
KEY_NAME=${_KEY_NAME}
-
KEY_VERSION=${_KEY_VERSION}
-
GIT_TAG=${_GIT_TAG}
-
KO_PREFIX=gcr.io/${PROJECT_ID}
-
COSIGN_EXPERIMENTAL=true
-
GOOGLE_SERVICE_ACCOUNT_NAME=keyless@${PROJECT_ID}.iam.gserviceaccount.com
-
GITHUB_USER=${_GITHUB_USER}
secretEnv
:
-
GITHUB_TOKEN
args
:
-
'
-c'
-
|
echo $$GITHUB_TOKEN | docker login ghcr.io -u $$GITHUB_USER --password-stdin \
&& make copy-signed-release-to-ghcr
availableSecrets
:
secretManager
:
-
versionName
:
projects/${PROJECT_NUMBER}/secrets/GITHUB_TOKEN/versions/latest
...
...
@@ -117,3 +141,4 @@ substitutions:
_KEY_NAME
:
'
honk-crypto'
_KEY_VERSION
:
'
1'
_KEY_LOCATION
:
'
global'
_GITHUB_USER
:
'
placeholder'
This diff is collapsed.
Click to expand it.
release/release.mk
+
15
−
0
View file @
4bbd263f
...
...
@@ -42,6 +42,21 @@ sign-keyless-rekor-cli-release:
.PHONY
:
sign-keyless-release
sign-keyless-release
:
sign-keyless-rekor-server-release sign-keyless-rekor-cli-release
####################
# copy image to GHCR
####################
.PHONY
:
copy-rekor-server-signed-release-to-ghcr
copy-cosign-signed-release-to-ghcr
:
cosign copy
$(
KO_PREFIX
)
/rekor-server:
$(
GIT_VERSION
)
$(
GHCR_PREFIX
)
/rekor-server:
$(
GIT_VERSION
)
.PHONY
:
copy-rekor-cli-signed-release-to-ghcr
copy-cosigned-signed-release-to-ghcr
:
cosign copy
$(
KO_PREFIX
)
/rekor-cli:
$(
GIT_VERSION
)
$(
GHCR_PREFIX
)
/rekor-cli:
$(
GIT_VERSION
)
.PHONY
:
copy-signed-release-to-ghcr
copy-signed-release-to-ghcr
:
copy-rekor-server-signed-release-to-ghcr copy-rekor-cli-signed-release-to-ghcr
## --------------------------------------
## Dist / maybe we can deprecate
## --------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment