#!/bin/bash

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Updates product release and other data in the docker environment.
#
# Usage: docker/run_update_data.sh

set -eo pipefail

HOSTUSER=$(id -u):$(id -g)

DC="$(which docker-compose)"

# Fetch release data (verbosely)
${DC} run app shell ./socorro-cmd crontabber --reset-job=archivescraper
${DC} run app shell ./socorro-cmd crontabber --job=archivescraper \
    --crontabber.class-ArchiveScraperCronApp.verbose

# Create ES indexes for the next few weeks
${DC} run app shell ./socorro-cmd create_recent_indices

#!/bin/bash

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Updates product release and other data in the docker environment.
#
# Usage: docker/run_update_data.sh

set -eo pipefail

HOSTUSER=$(id -u):$(id -g)

DC="$(which docker-compose)"

# Fetch release data (verbosely)
${DC} run app shell ./socorro-cmd crontabber --reset-job=archivescraper
${DC} run app shell ./socorro-cmd crontabber --job=archivescraper \
    --crontabber.class-ArchiveScraperCronApp.verbose

# Insert data that's no longer on archive.mozilla.org
${DC} run app shell python ./scripts/insert_missing_versions.py

# Create ES indexes for the next few weeks
${DC} run app shell ./socorro-cmd create_recent_indices

Add missing versions to "make updatedata"
Add missing versions to "make updatedata"

This changes "make updatedata" to also run the insert_missing_versions.py
script after running the archivescraper crontabber job.
