Skip to content

Commit b6272c7

Browse files
Fix scorecard version in Scorecard Docker images (#1480)
Co-authored-by: Azeem Shaikh <azeems@google.com>
1 parent 361fbd0 commit b6272c7

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

cloudbuild/scorecard-tag.yaml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
build:
16-
images:
17-
- gcr.io/openssf/scorecard:$TAG_NAME
18-
options: {}
19-
steps:
20-
- args:
21-
- build
22-
- -t
23-
- gcr.io/openssf/scorecard:$TAG_NAME
24-
- .
25-
name: gcr.io/cloud-builders/docker
26-
description: scorecard build based on tag
27-
github:
28-
name: scorecard
29-
owner: ossf
30-
push:
31-
tag: .*
32-
name: scorecard-tag
33-
tags:
34-
- v*
15+
steps:
16+
- id: 'Get Git history'
17+
name: 'gcr.io/cloud-builders/git'
18+
args: ['fetch', '--unshallow', '--tags', 'origin', '$COMMIT_SHA']
19+
- name: 'gcr.io/cloud-builders/docker'
20+
args: ['build', '.',
21+
'-t', 'gcr.io/openssf/scorecard:stable',
22+
'-t', 'gcr.io/openssf/scorecard:$TAG_NAME',
23+
'-f', 'Dockerfile']
24+
images: ['gcr.io/openssf/scorecard']

cloudbuild/scorecard.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# limitations under the License.
1414

1515
steps:
16+
- id: 'Get Git history'
17+
name: 'gcr.io/cloud-builders/git'
18+
args: ['fetch', '--unshallow', '--tags', 'origin', '$COMMIT_SHA']
1619
- name: 'gcr.io/cloud-builders/docker'
1720
args: ['build', '.',
1821
'-t', 'gcr.io/openssf/scorecard:latest',

0 commit comments

Comments
 (0)