Skip to content

Commit 7da67f6

Browse files
authored
ci: add shared test volume to sandbox deploy
1 parent 1f0ab64 commit 7da67f6

3 files changed

Lines changed: 37 additions & 8 deletions

File tree

dev/deploy-to-container/cli.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,19 @@ async function main () {
155155
} else {
156156
console.info('Existing assets docker volume found.')
157157
}
158+
159+
// Get shared test docker volume
160+
console.info('Querying shared test docker volume...')
161+
const testVolume = await dock.getVolume(`dt-test-${branch}`)
162+
if (testVolume) {
163+
console.info('Existing shared test docker volume found. Deleting first...')
164+
await testVolume.remove({ force: true })
165+
}
166+
console.info('Creating new shared test docker volume...')
167+
await dock.createVolume({
168+
Name: `dt-test-${branch}`
169+
})
170+
console.info('Created shared test docker volume successfully.')
158171

159172
// Create DB container
160173
console.info(`Creating DB docker container... [dt-db-${branch}]`)
@@ -211,7 +224,8 @@ async function main () {
211224
],
212225
HostConfig: {
213226
Binds: [
214-
'dt-assets:/assets'
227+
'dt-assets:/assets',
228+
`dt-test-${branch}:/test`
215229
],
216230
Init: true,
217231
NetworkMode: 'shared',
@@ -243,7 +257,8 @@ async function main () {
243257
},
244258
HostConfig: {
245259
Binds: [
246-
'dt-assets:/assets'
260+
'dt-assets:/assets',
261+
`dt-test-${branch}:/test`
247262
],
248263
NetworkMode: 'shared',
249264
RestartPolicy: {

dev/deploy-to-container/settings_local.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
CELERY_BROKER_URL = '__MQCONNSTR__'
3030

3131
IDSUBMIT_IDNITS_BINARY = "/usr/local/bin/idnits"
32-
IDSUBMIT_REPOSITORY_PATH = "test/id/"
33-
IDSUBMIT_STAGING_PATH = "test/staging/"
34-
INTERNET_DRAFT_ARCHIVE_DIR = "test/archive/"
35-
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = "test/archive/"
36-
RFC_PATH = "test/rfc/"
32+
IDSUBMIT_REPOSITORY_PATH = "/test/id/"
33+
IDSUBMIT_STAGING_PATH = "/test/staging/"
34+
INTERNET_DRAFT_ARCHIVE_DIR = "/test/archive/"
35+
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = "/test/archive/"
36+
RFC_PATH = "/test/rfc/"
3737

3838
AGENDA_PATH = '/assets/www6s/proceedings/'
3939
MEETINGHOST_LOGO_PATH = AGENDA_PATH
@@ -75,6 +75,6 @@
7575
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = '/assets/ietf-ftp/internet-drafts/'
7676

7777
NOMCOM_PUBLIC_KEYS_DIR = 'data/nomcom_keys/public_keys/'
78-
SLIDE_STAGING_PATH = 'test/staging/'
78+
SLIDE_STAGING_PATH = '/test/staging/'
7979

8080
DE_GFM_BINARY = '/usr/local/bin/de-gfm'

dev/deploy-to-container/start.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
#!/bin/bash
22

3+
echo "Creating /test directories..."
4+
for sub in \
5+
/test/id \
6+
/test/staging \
7+
/test/archive \
8+
/test/rfc \
9+
/test/media \
10+
/test/wiki/ietf \
11+
; do
12+
if [ ! -d "$sub" ]; then
13+
echo "Creating dir $sub"
14+
mkdir -p "$sub";
15+
fi
16+
done
317
echo "Fixing permissions..."
418
chmod -R 777 ./
519
echo "Ensure all requirements.txt packages are installed..."

0 commit comments

Comments
 (0)