<commit_before>#!/usr/bin/env bash

docker run  --name jenkins2 \
            -d -p 9080:8080 -p 50000:50000 \
            -v /home/vagrant/docker:/var/jenkins_home \
            jenkinsci/jenkins:2.0

<commit_msg>Update jenkins2 scripts<commit_after>#!/usr/bin/env bash

export JK_MAJOR=2.1

docker images | grep jenkinsci/jenkins
if [ "$?" == "1" ]; then
    docker pull jenkinsci/jenkins:$JK_MAJOR
fi


docker inspect -f {{.State.Running}} jenkins2

# If jenkins is not running
if [ "$?" == "1" ]; then

    mkdir -p /home/vagrant/jenkins_home

    docker run  --name jenkins2 \
                -d -p 9080:8080 -p 50000:50000 \
                -v /home/vagrant/jenkins_home:/var/jenkins_home \
                jenkinsci/jenkins:$JK_MAJOR

    if [ "$?" == "1" ]; then
        sudo chown -R vagrant /home/vagrant/jenkins_home
        docker start jenkins2
    fi
fi

docker ps -a | grep jenkins2

echo -e "\nACCESS TO JENKINS AT --> http://192.168.50.4:9080\n"
{'fraction_non_alphanumeric': 0.1340956340956341, 'fraction_numerical': 0.06444906444906445, 'mean_word_length': 2.1887417218543046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '4084570', 'n_tokens_mistral': 433, 'n_tokens_neox': 364, 'n_words': 84}