Skip to content

Commit f5df667

Browse files
ci: merge main to release
ci: merge main to release
2 parents f380b1a + ea8377d commit f5df667

52 files changed

Lines changed: 1224 additions & 1242 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-celery-worker.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
echo "IS_RELEASE=true" >> $GITHUB_ENV
9999
100100
- name: Create Draft Release
101-
uses: ncipollo/release-action@v1.16.0
101+
uses: ncipollo/release-action@v1.18.0
102102
if: ${{ github.ref_name == 'release' }}
103103
with:
104104
prerelease: true
@@ -317,7 +317,7 @@ jobs:
317317
histCoveragePath: historical-coverage.json
318318

319319
- name: Create Release
320-
uses: ncipollo/release-action@v1.16.0
320+
uses: ncipollo/release-action@v1.18.0
321321
if: ${{ env.SHOULD_DEPLOY == 'true' }}
322322
with:
323323
allowUpdates: true
@@ -330,7 +330,7 @@ jobs:
330330
token: ${{ secrets.GITHUB_TOKEN }}
331331

332332
- name: Update Baseline Coverage
333-
uses: ncipollo/release-action@v1.16.0
333+
uses: ncipollo/release-action@v1.18.0
334334
if: ${{ github.event.inputs.updateCoverage == 'true' || github.ref_name == 'release' }}
335335
with:
336336
allowUpdates: true

dev/celery/Dockerfile

Lines changed: 0 additions & 23 deletions
This file was deleted.

dev/coverage-action/package-lock.json

Lines changed: 7 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/coverage-action/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"@actions/core": "1.11.1",
1010
"@actions/github": "6.0.1",
1111
"lodash": "4.17.21",
12-
"luxon": "3.6.1"
12+
"luxon": "3.7.1"
1313
}
1414
}

dev/deploy-to-container/cli.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ async function main () {
7070
.replace('__HOSTNAME__', hostname)
7171
)
7272
await fs.copy(path.join(basePath, 'docker/scripts/app-create-dirs.sh'), path.join(releasePath, 'app-create-dirs.sh'))
73+
await fs.copy(path.join(basePath, 'docker/scripts/app-init-celery.sh'), path.join(releasePath, 'app-init-celery.sh'))
7374
await fs.copy(path.join(basePath, 'dev/deploy-to-container/start.sh'), path.join(releasePath, 'start.sh'))
7475
await fs.copy(path.join(basePath, 'test/data'), path.join(releasePath, 'test/data'))
7576
console.info('Updated configuration files.')
@@ -98,14 +99,6 @@ async function main () {
9899
})
99100
console.info('Pulled latest MQ docker image.')
100101

101-
// Pull latest Celery image
102-
console.info('Pulling latest Celery docker image...')
103-
const celeryImagePullStream = await dock.pull('ghcr.io/ietf-tools/datatracker-celery:latest')
104-
await new Promise((resolve, reject) => {
105-
dock.modem.followProgress(celeryImagePullStream, (err, res) => err ? reject(err) : resolve(res))
106-
})
107-
console.info('Pulled latest Celery docker image.')
108-
109102
// Terminate existing containers
110103
console.info('Ensuring existing containers with same name are terminated...')
111104
const containers = await dock.listContainers({ all: true })
@@ -221,7 +214,7 @@ async function main () {
221214
const celeryContainers = {}
222215
for (const conConf of conConfs) {
223216
celeryContainers[conConf.name] = await dock.createContainer({
224-
Image: 'ghcr.io/ietf-tools/datatracker-celery:latest',
217+
Image: 'ghcr.io/ietf-tools/datatracker-app-base:latest',
225218
name: `dt-${conConf.name}-${branch}`,
226219
Hostname: `dt-${conConf.name}-${branch}`,
227220
Env: [
@@ -243,7 +236,7 @@ async function main () {
243236
Name: 'unless-stopped'
244237
}
245238
},
246-
Cmd: ['--loglevel=INFO']
239+
Entrypoint: ['bash', '-c', 'chmod +x ./app-init-celery.sh && ./app-init-celery.sh']
247240
})
248241
}
249242
console.info('Created Celery docker containers successfully.')

docker/celery.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/ietf-tools/datatracker-celery:latest
1+
FROM ghcr.io/ietf-tools/datatracker-app-base:latest
22
LABEL maintainer="IETF Tools Team <tools-discuss@ietf.org>"
33

44
ENV DEBIAN_FRONTEND=noninteractive
@@ -34,7 +34,7 @@ RUN bash /tmp/library-scripts/docker-setup-python.sh "none" "/usr/local" "${PIPX
3434
RUN rm -rf /tmp/library-scripts
3535

3636
# Copy the startup file
37-
COPY dev/celery/docker-init.sh /docker-init.sh
37+
COPY docker/scripts/app-init-celery.sh /docker-init.sh
3838
RUN sed -i 's/\r$//' /docker-init.sh && \
3939
chmod +x /docker-init.sh
4040

docker/docker-compose.celery.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,22 @@ if [[ "${CELERY_ROLE}" == "worker" ]]; then
9090
run_as_celery_uid /usr/local/bin/python $WORKSPACEDIR/ietf/manage.py check
9191
fi
9292

93+
USER_BIN_PATH="/home/dev/.local/bin"
94+
WATCHMEDO="$USER_BIN_PATH/watchmedo"
95+
CELERY="$USER_BIN_PATH/celery"
9396
trap 'trap "" TERM; cleanup' TERM
9497
# start celery in the background so we can trap the TERM signal
95-
if [[ -n "${DEV_MODE}" ]]; then
96-
watchmedo auto-restart \
98+
if [[ -n "${DEV_MODE}" && -x "${WATCHMEDO}" ]]; then
99+
$WATCHMEDO auto-restart \
97100
--patterns '*.py' \
98101
--directory 'ietf' \
99102
--recursive \
100103
--debounce-interval 5 \
101104
-- \
102-
celery --app="${CELERY_APP:-ietf}" "${CELERY_OPTS[@]}" $@ &
105+
$CELERY --app="${CELERY_APP:-ietf}" "${CELERY_OPTS[@]}" $@ &
103106
celery_pid=$!
104107
else
105-
celery --app="${CELERY_APP:-ietf}" "${CELERY_OPTS[@]}" "$@" &
108+
$CELERY --app="${CELERY_APP:-ietf}" "${CELERY_OPTS[@]}" "$@" &
106109
celery_pid=$!
107110
fi
108111

0 commit comments

Comments
 (0)