Skip to content

Commit 62afe56

Browse files
authored
Enable install.sh CI testing (#7)
1 parent e5f6dbb commit 62afe56

3 files changed

Lines changed: 37 additions & 39 deletions

File tree

.github/workflows/validations.yaml

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -133,39 +133,38 @@ jobs:
133133
runs-on: ubuntu-20.04
134134
steps:
135135
- uses: actions/checkout@v2
136-
# TODO: this can be re-enabled after the first release in the docker org
137-
# - uses: actions/download-artifact@v2
138-
# with:
139-
# name: artifacts
140-
# path: snapshot
141-
#
142-
# - name: Build key for image cache
143-
# run: make install-fingerprint
144-
#
145-
# - name: Restore install.sh test image cache
146-
# id: install-test-image-cache
147-
# uses: actions/cache@v2.1.3
148-
# with:
149-
# path: ${{ github.workspace }}/test/install/cache
150-
# key: ${{ runner.os }}-install-test-image-cache-${{ hashFiles('test/install/cache.fingerprint') }}
151-
#
152-
# - name: Restore tool cache
153-
# id: tool-cache
154-
# uses: actions/cache@v2.1.3
155-
# with:
156-
# path: ${{ github.workspace }}/.tmp
157-
# key: ${{ runner.os }}-tool-${{ hashFiles('Makefile') }}
158-
#
159-
# - name: Load test image cache
160-
# if: steps.install-test-image-cache.outputs.cache-hit == 'true'
161-
# run: make install-test-cache-load
162-
#
163-
# - name: Run install.sh tests (Linux)
164-
# run: make install-test
165-
#
166-
# - name: (cache-miss) Create test image cache
167-
# if: steps.install-test-image-cache.outputs.cache-hit != 'true'
168-
# run: make install-test-cache-save
136+
- uses: actions/download-artifact@v2
137+
with:
138+
name: artifacts
139+
path: snapshot
140+
141+
- name: Build key for image cache
142+
run: make install-fingerprint
143+
144+
- name: Restore install.sh test image cache
145+
id: install-test-image-cache
146+
uses: actions/cache@v2.1.3
147+
with:
148+
path: ${{ github.workspace }}/test/install/cache
149+
key: ${{ runner.os }}-install-test-image-cache-${{ hashFiles('test/install/cache.fingerprint') }}
150+
151+
- name: Restore tool cache
152+
id: tool-cache
153+
uses: actions/cache@v2.1.3
154+
with:
155+
path: ${{ github.workspace }}/.tmp
156+
key: ${{ runner.os }}-tool-${{ hashFiles('Makefile') }}
157+
158+
- name: Load test image cache
159+
if: steps.install-test-image-cache.outputs.cache-hit == 'true'
160+
run: make install-test-cache-load
161+
162+
- name: Run install.sh tests (Linux)
163+
run: make install-test
164+
165+
- name: (cache-miss) Create test image cache
166+
if: steps.install-test-image-cache.outputs.cache-hit != 'true'
167+
run: make install-test-cache-save
169168

170169
Acceptance-Mac:
171170
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline
@@ -185,9 +184,8 @@ jobs:
185184
brew install docker
186185
mkdir ~/.docker
187186
188-
# TODO: put back in after the first release
189-
# - name: Run install.sh tests (Mac)
190-
# run: make install-test-ci-mac
187+
- name: Run install.sh tests (Mac)
188+
run: make install-test-ci-mac
191189

192190
Cli-Linux:
193191
# Note: changing this job name requires making the same update in the .github/workflows/release.yaml pipeline

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# docker-sbom-cli-plugin
1+
# sbom-cli-plugin
22

3-
Plugin for Docker CLI to support SBOM creation using Syft.
3+
Plugin for Docker CLI to support viewing and creating SBOMs for Docker images using Syft.
44

55
**Note: this is a proof of concept / work in progress**
66

test/install/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ UNIT=make unit-local
1212
# acceptance testing is running the current install.sh against the latest release. Note: this could be a problem down
1313
# the line if there are breaking changes made that don't align with the latest release (but will be OK with the next
1414
# release)
15-
ACCEPTANCE_CMD=sh -c '../../install.sh -b /usr/local/bin && docker sbom version'
15+
ACCEPTANCE_CMD=sh -c '../../install.sh && docker sbom version'
1616

1717
# CI cache busting values; change these if you want CI to not use previous stored cache
1818
INSTALL_TEST_CACHE_BUSTER=894d8ca

0 commit comments

Comments
 (0)