diff --git a/Jenkinsfile b/Jenkinsfile index acef5e1..361d01f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,25 +1,26 @@ -node { - stage('Preparation') { - properties([ - parameters([ - string( - defaultValue: 'Hello World!', - description: 'Tekst do wyświetlenie', - name: 'INPUT_TEXT', - trim: false - ) - ]) - ]) +pipeline { + agent any + + stages { + stage('Clone repository') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], + doGenerateSubmoduleConfigurations: false, + extensions: [], submoduleCfg: [], + userRemoteConfigs: [[url: 'https://github.com/your-username/your-repo.git']]]) + } + } + + stage('Process data') { + steps { + sh './process_data.sh' + } + } + + stage('Archive artifacts') { + steps { + archiveArtifacts artifacts: 'results.txt', onlyIfSuccessful: true + } + } } - stage('Hello') { - //Wypisz wartość parametru w konsoli (To nie jest polecenie bash, tylko groovy!) - echo "INPUT_TEXT: ${INPUT_TEXT}" - //Wywołaj w konsoli komendę "figlet", która generuje ASCI-art - sh "figlet \"${INPUT_TEXT}\" | tee output.txt" - } - stage('Goodbye') { - echo 'Goodbye!' - //Zarchiwizuj wynik - archiveArtifacts 'output.txt' - } -} \ No newline at end of file +}