ci: add shared test volume to sandbox deploy

This commit is contained in:
Nicolas Giard 2022-12-22 17:15:35 -05:00 committed by GitHub
parent 1f0ab6418f
commit 7da67f64af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 8 deletions

View file

@ -155,6 +155,19 @@ async function main () {
} else {
console.info('Existing assets docker volume found.')
}
// Get shared test docker volume
console.info('Querying shared test docker volume...')
const testVolume = await dock.getVolume(`dt-test-${branch}`)
if (testVolume) {
console.info('Existing shared test docker volume found. Deleting first...')
await testVolume.remove({ force: true })
}
console.info('Creating new shared test docker volume...')
await dock.createVolume({
Name: `dt-test-${branch}`
})
console.info('Created shared test docker volume successfully.')
// Create DB container
console.info(`Creating DB docker container... [dt-db-${branch}]`)
@ -211,7 +224,8 @@ async function main () {
],
HostConfig: {
Binds: [
'dt-assets:/assets'
'dt-assets:/assets',
`dt-test-${branch}:/test`
],
Init: true,
NetworkMode: 'shared',
@ -243,7 +257,8 @@ async function main () {
},
HostConfig: {
Binds: [
'dt-assets:/assets'
'dt-assets:/assets',
`dt-test-${branch}:/test`
],
NetworkMode: 'shared',
RestartPolicy: {

View file

@ -29,11 +29,11 @@ SECRET_KEY = "__SECRETKEY__"
CELERY_BROKER_URL = '__MQCONNSTR__'
IDSUBMIT_IDNITS_BINARY = "/usr/local/bin/idnits"
IDSUBMIT_REPOSITORY_PATH = "test/id/"
IDSUBMIT_STAGING_PATH = "test/staging/"
INTERNET_DRAFT_ARCHIVE_DIR = "test/archive/"
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = "test/archive/"
RFC_PATH = "test/rfc/"
IDSUBMIT_REPOSITORY_PATH = "/test/id/"
IDSUBMIT_STAGING_PATH = "/test/staging/"
INTERNET_DRAFT_ARCHIVE_DIR = "/test/archive/"
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = "/test/archive/"
RFC_PATH = "/test/rfc/"
AGENDA_PATH = '/assets/www6s/proceedings/'
MEETINGHOST_LOGO_PATH = AGENDA_PATH
@ -75,6 +75,6 @@ INTERNET_DRAFT_ARCHIVE_DIR = '/assets/ietf-ftp/internet-drafts/'
INTERNET_ALL_DRAFTS_ARCHIVE_DIR = '/assets/ietf-ftp/internet-drafts/'
NOMCOM_PUBLIC_KEYS_DIR = 'data/nomcom_keys/public_keys/'
SLIDE_STAGING_PATH = 'test/staging/'
SLIDE_STAGING_PATH = '/test/staging/'
DE_GFM_BINARY = '/usr/local/bin/de-gfm'

View file

@ -1,5 +1,19 @@
#!/bin/bash
echo "Creating /test directories..."
for sub in \
/test/id \
/test/staging \
/test/archive \
/test/rfc \
/test/media \
/test/wiki/ietf \
; do
if [ ! -d "$sub" ]; then
echo "Creating dir $sub"
mkdir -p "$sub";
fi
done
echo "Fixing permissions..."
chmod -R 777 ./
echo "Ensure all requirements.txt packages are installed..."