docker task 2 try_5

This commit is contained in:
Kamila 2022-04-03 12:30:04 +02:00
parent 743350919d
commit 82f0abf86a
2 changed files with 7 additions and 19 deletions

View File

@ -1,11 +1,8 @@
pipeline {
agent any
agent {
docker { image 'kambobdocker420/ium:version2.0' }
}
parameters {
buildSelector(
defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR'
)
}
stages {
@ -14,15 +11,6 @@ pipeline {
echo 'Hello world but for the second time!'
}
}
stage('Copy and proceed') {
steps {
copyArtifacts filter: 'apps_*.csv', fingerprintArtifacts: true, projectName: 's444517-create-dataset', selector: buildParameter('BUILD_SELECTOR')
sh 'chmod +x -R ./data_stats.sh'
sh './data_stats.sh'
archiveArtifacts artifacts: 'stats.txt'
}
}
}
}

View File

@ -35,13 +35,13 @@ train, validate, test = np.split(data.sample(frac=1, random_state=42), [int(.6*l
print(f"Data shape: {data.shape}\nTrain shape: {train.shape}\nTest shape: {test.shape}\nValidation shape:{validate.shape}")
f = open("apps_train.csv", "w")
f.write(train)
f.write(str(train))
f.close()
f = open("apps_test.csv", "w")
f.write(test)
f.write(str(test))
f.close()
f = open("apps_validate.csv", "w")
f.write(validate)
f.close()
f.write(str(validate))
f.close()