diff --git a/Jenkinsfile2 b/Jenkinsfile2 new file mode 100644 index 0000000..7842e5a --- /dev/null +++ b/Jenkinsfile2 @@ -0,0 +1,25 @@ +pipeline { + agent any + parameters { + buildSelector( + defaultSelector: lastSuccessful(), + description: 'Which build to use for copying artifacts', + name: 'BUILD_SELECTOR' + ) + } + stages { + stage('Check out from version control') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 's444421', url: 'https://git.wmi.amu.edu.pl/s444421/ium_444421.git']]]) + } + } + stage('Shell Script') { + steps { + copyArtifacts fingerprintArtifacts: true, projectName:'s444421-create-dataset', selector: buildParameter('BUILD_SELECTOR') + sh 'chmod u+x ./get_stats.sh' + sh './get_stats.sh' + archiveArtifacts 'stats.txt' + } + } + } +} \ No newline at end of file diff --git a/download_data.sh b/download_data.sh index bdf5b46..da38a59 100644 --- a/download_data.sh +++ b/download_data.sh @@ -1,3 +1,3 @@ kaggle datasets download -d tejashvi14/travel-insurance-prediction-data unzip -o travel-insurance-prediction-data.zip -head -n $CUTOFF TravelInsurancePrediction.csv >> travel_insurance_data.txt \ No newline at end of file +head -n $CUTOFF TravelInsurancePrediction.csv > travel_insurance_data.txt \ No newline at end of file diff --git a/get_stats.sh b/get_stats.sh new file mode 100644 index 0000000..174e1ea --- /dev/null +++ b/get_stats.sh @@ -0,0 +1 @@ +wc -l travel_insurance_data.txt > stats.txt \ No newline at end of file