Skip to content

Commit

Permalink
GitLab provenance: change version to v0alpha1, include links to GitLab
Browse files Browse the repository at this point in the history
OIDC docs.
  • Loading branch information
wlynch committed Apr 24, 2023
1 parent 2b1269a commit 2806bc7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion workspaces/libnpmpublish/lib/provenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const GITHUB_BUILD_TYPE_PREFIX = 'https://github.com/npm/cli/gha'
const GITHUB_BUILD_TYPE_VERSION = 'v2'

const GITLAB_BUILD_TYPE_PREFIX = 'https://github.com/npm/cli/gitlab'
const GITLAB_BUILD_TYPE_VERSION = 'v1alpha1'
const GITLAB_BUILD_TYPE_VERSION = 'v0alpha1'

const generateProvenance = async (subject, opts) => {
var payload
Expand Down
2 changes: 1 addition & 1 deletion workspaces/libnpmpublish/lib/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const buildMetadata = async (registry, manifest, tarballData, spec, opts) => {
if (!process.env.SIGSTORE_ID_TOKEN) {
throw Object.assign(
/* eslint-disable-next-line max-len */
new Error('Provenance generation in GitLab CI requires "SIGSTORE_ID_TOKEN" with "sigstore" audience to be present in "id_tokens"'),
new Error('Provenance generation in GitLab CI requires "SIGSTORE_ID_TOKEN" with "sigstore" audience to be present in "id_tokens". See https://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html for more info.'),
{ code: 'EUSAGE' }
)
}
Expand Down
2 changes: 1 addition & 1 deletion workspaces/libnpmpublish/test/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ t.test('publish existing package with provenance in gitlab', async t => {
expectedSubject,
'provenance subject matches expectations')
t.hasStrict(provenance.predicate.buildType,
'https://github.com/npm/cli/gitlab/v1alpha1',
'https://github.com/npm/cli/gitlab/v0alpha1',
'buildType matches expectations')
t.hasStrict(provenance.predicate.builder.id,
`${serverUrl}/${repository}/-/runners/${runnerID}`,
Expand Down

0 comments on commit 2806bc7

Please sign in to comment.