Skip to content

Commit bd34dd4

Browse files
authored
ci: fix build workflow to handle non-existant shared test volume
1 parent d38ca93 commit bd34dd4

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

dev/deploy-to-container/cli.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,11 @@ async function main () {
158158

159159
// Get shared test docker volume
160160
console.info('Querying shared test docker volume...')
161-
const testVolume = await dock.getVolume(`dt-test-${branch}`)
162-
console.info(testVolume)
163-
if (testVolume) {
164-
console.info('Existing shared test docker volume found. Deleting first...')
161+
try {
162+
const testVolume = await dock.getVolume(`dt-test-${branch}`)
163+
console.info('Attempting to delete any existing shared test docker volume...')
165164
await testVolume.remove({ force: true })
166-
}
165+
} catch (err) {}
167166
console.info('Creating new shared test docker volume...')
168167
await dock.createVolume({
169168
Name: `dt-test-${branch}`

0 commit comments

Comments
 (0)