<commit_before>#!/bin/bash

TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
TRAVIS_TAG=1.5.4
DOCKER_IMAGES=(django nginx)
for docker_image in "${DOCKER_IMAGES[@]}"
do
  if [ "${TRAVIS_TAG}" != "" ] && [ "${DOCKER_USER}" != "" ] && [  "${DOCKER_PASS}" != "" ]; then
    if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
      TRAVIS_TAG=`date +%Y-%m-%d`
    fi
    REPO="defectdojo/defectdojo-${docker_image}"
    docker tag ${REPO} "defectdojo/${TRAVIS_BRANCH}-${docker_image}":${TRAVIS_TAG}
    echo ${DOCKER_USER}
    echo ${REPO}
    docker login -u "${DOCKER_USER}" -p "{$DOCKER_PASS}";
    docker push {$REPO};
  fi
done<commit_msg>docker hub<commit_after>#!/bin/bash

TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
TRAVIS_TAG=1.5.4
DOCKER_IMAGES=(django nginx)
for docker_image in "${DOCKER_IMAGES[@]}"
do
  if [ "${TRAVIS_TAG}" != "" ] && [ "${DOCKER_USER}" != "" ] && [  "${DOCKER_PASS}" != "" ]; then
    if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
      TRAVIS_TAG=`date +%Y-%m-%d`
    fi
    REPO="defectdojo/defectdojo-${docker_image}"
    docker tag ${REPO} "defectdojo/${TRAVIS_BRANCH}-${docker_image}":${TRAVIS_TAG}
    echo ${DOCKER_USER}
    echo ${REPO}
    docker login -u ${DOCKER_USER} -p {$DOCKER_PASS}
    docker push {$REPO}
  fi
done
{'fraction_non_alphanumeric': 0.21232368225686712, 'fraction_numerical': 0.004454342984409799, 'mean_word_length': 4.265625, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3197977', 'n_tokens_mistral': 587, 'n_tokens_neox': 567, 'n_words': 102}