<commit_before>#!/bin/bash -xe
#
# Example script for jenkins
#
# Pass the following env vars:

[[ -z $IGORCLIENTURL ]] && exit 1
[[ -z $APIURL ]] && exit 1
[[ -z $TESTSUITE ]] && exit 1
[[ -z $BASENAMEPREFIX ]] && exit 1
[[ -z $ARTIFACTSARCHIVE ]] && exit 1
[[ -z $BUILD_TAG ]] && exit 1
# REPORT_EMAIL_TO
# REPORT_EMAIL_FROM
# ISONAME

pyc() { python -c "$@" ; }
drawline() { pyc "print('$2' * $1);" ; }
highlight() { L=$(drawline ${#1} -) ; echo -e "\n$L\n$@\n$L\n" ; }

# This is an artifact from a previous job
ISONAME=${ISONAME:-$(ls *.iso | tail -n1)}
highlight "Using ISO '$ISONAME'"

[[ $(ls *.iso | wc -l) -gt 1 ]] && { 
    echo More than one iso ; 
    ls *.iso ;
}

[[ -e $ISONAME ]]

highlight "Fetching igor client from server"
curl --silent "${IGORCLIENTURL}" --output "igorclient.sh"
[[ -e igorclient.sh ]]

export PROFILENAME="${BASENAMEPREFIX}${BUILD_TAG}"

highlight "Create cobbler distro and profile by uploading the ISO '$ISONAME'"
bash ./igorclient.sh extra_profile_add "$PROFILENAME" "$ISONAME"

highlight "Create igor job"
bash ./igorclient.sh submit "$TESTSUITE" "$PROFILENAME" ahost
export $(bash ./igorclient.sh cookie)<commit_msg>jenkins: Use default host<commit_after>#!/bin/bash -xe
#
# Example script for jenkins
#
# Pass the following env vars:

[[ -z $IGORCLIENTURL ]] && exit 1
[[ -z $APIURL ]] && exit 1
[[ -z $TESTSUITE ]] && exit 1
[[ -z $BASENAMEPREFIX ]] && exit 1
[[ -z $ARTIFACTSARCHIVE ]] && exit 1
[[ -z $BUILD_TAG ]] && exit 1
# REPORT_EMAIL_TO
# REPORT_EMAIL_FROM
# ISONAME

pyc() { python -c "$@" ; }
drawline() { pyc "print('$2' * $1);" ; }
highlight() { L=$(drawline ${#1} -) ; echo -e "\n$L\n$@\n$L\n" ; }

# This is an artifact from a previous job
ISONAME=${ISONAME:-$(ls *.iso | tail -n1)}
highlight "Using ISO '$ISONAME'"

[[ $(ls *.iso | wc -l) -gt 1 ]] && { 
    echo More than one iso ; 
    ls *.iso ;
}

[[ -e $ISONAME ]]

highlight "Fetching igor client from server"
curl --silent "${IGORCLIENTURL}" --output "igorclient.sh"
[[ -e igorclient.sh ]]

export PROFILENAME="${BASENAMEPREFIX}${BUILD_TAG}"

highlight "Create cobbler distro and profile by uploading the ISO '$ISONAME'"
bash ./igorclient.sh extra_profile_add "$PROFILENAME" "$ISONAME"

highlight "Create igor job"
bash ./igorclient.sh submit "$TESTSUITE" "$PROFILENAME" "default"
export $(bash ./igorclient.sh cookie)
{'fraction_non_alphanumeric': 0.1896404109589041, 'fraction_numerical': 0.009417808219178082, 'mean_word_length': 3.8891213389121337, 'pattern_counts': {'":': 0, '<': 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': '104251', 'n_tokens_mistral': 957, 'n_tokens_neox': 877, 'n_words': 256}