ci: fix build workflow to handle non-existant shared test volume

This commit is contained in:
Nicolas Giard 2022-12-22 22:25:33 -05:00 committed by GitHub
parent d38ca93054
commit bd34dd47d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,12 +158,11 @@ async function main () {
// Get shared test docker volume
console.info('Querying shared test docker volume...')
const testVolume = await dock.getVolume(`dt-test-${branch}`)
console.info(testVolume)
if (testVolume) {
console.info('Existing shared test docker volume found. Deleting first...')
try {
const testVolume = await dock.getVolume(`dt-test-${branch}`)
console.info('Attempting to delete any existing shared test docker volume...')
await testVolume.remove({ force: true })
}
} catch (err) {}
console.info('Creating new shared test docker volume...')
await dock.createVolume({
Name: `dt-test-${branch}`