diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..d3461d9ff --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM jenkins/jenkins:lts +USER root + +RUN apt update -y \ + && apt install -y binutils-dev libssl-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev cmake build-essential python3 +# && cmake . \ +# && make \ +# && make install +# +#COPY /kworkflow/ /tests/ +#WORKDIR /tests/ +RUN apt install -y shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl +USER kworkflow +# && ls \ +# && ./run_tests.sh prepare \ +# && mkdir kcov_out/ \ +# && git config --global user.email "kw@kworkflow.net" \ +# && git config --global user.name "Kworkflow" \ +# && ./run_tests.sh prepare \ +# && kcov --include-path=src,kw --exclude-pattern=src/bash_autocomplete.sh,src/help.sh kcov_out/ ./run_tests.sh diff --git a/jenkinsfiles/codecov b/jenkinsfiles/codecov index b5b8a12ed..895085e3f 100644 --- a/jenkinsfiles/codecov +++ b/jenkinsfiles/codecov @@ -1,26 +1,28 @@ pipeline { agent any stages { - - stage('Build'){ - steps{ - sh ''' - apt update -y - apt install -y shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl - ./run_tests.sh prepare - rm -rf kcov_out - mkdir kcov_out/ - git config --global user.email "kw@kworkflow.net" - git config --global user.name "Kworkflow" - ./run_tests.sh - kcov --include-path=src,kw \ - --exclude-pattern=src/bash_autocomplete.sh,src/help.sh \ - kcov_out/ ./run_tests.sh - mv kcov_out/run_tests.sh.*/cobertura.xml $(pwd)/cobertura.xml - ''' - cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'cobertura.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false + stage('Build') { + steps { + echo 'Building..' + sh "ls" + } + } + stage('Test') { + steps { + parallel( + "Test": { + echo 'Testing..' + }, + "Integration Test": { + echo 'Integration Test testing 1234567...' + } + ) + } + } + stage('Deploy') { + steps { + echo 'Deploying 123....' } } - } } diff --git a/jenkinsfiles/formatter-shfmt b/jenkinsfiles/formatter-shfmt index e69de29bb..605122ea5 100644 --- a/jenkinsfiles/formatter-shfmt +++ b/jenkinsfiles/formatter-shfmt @@ -0,0 +1,28 @@ +pipeline { + agent { + dockerfile true + } + stages { + + stage('Build'){ + steps{ + sh ''' + apt update -y + apt install -y shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl + ./run_tests.sh prepare + rm -rf kcov_out + mkdir kcov_out/ + git config --global user.email "kw@kworkflow.net" + git config --global user.name "Kworkflow" + ./run_tests.sh + kcov --include-path=src,kw \ + --exclude-pattern=src/bash_autocomplete.sh,src/help.sh \ + kcov_out/ ./run_tests.sh + mv kcov_out/run_tests.sh.*/cobertura.xml $(pwd)/cobertura.xml + ''' + cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'cobertura.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false + } + } + + } +} diff --git a/jenkinsfiles/integration_tests b/jenkinsfiles/integration_tests index e69de29bb..dc2fbdf6f 100644 --- a/jenkinsfiles/integration_tests +++ b/jenkinsfiles/integration_tests @@ -0,0 +1,26 @@ +pipeline { + agent { dockerfile true } + stages { + + stage('Build'){ + steps{ + sh ''' + apt update -y + apt install -y shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl + ./run_tests.sh prepare + rm -rf kcov_out + mkdir kcov_out/ + git config --global user.email "kw@kworkflow.net" + git config --global user.name "Kworkflow" + ./run_tests.sh + kcov --include-path=src,kw \ + --exclude-pattern=src/bash_autocomplete.sh,src/help.sh \ + kcov_out/ ./run_tests.sh + mv kcov_out/run_tests.sh.*/cobertura.xml $(pwd)/cobertura.xml + ''' + cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'cobertura.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false + } + } + + } +} diff --git a/jenkinsfiles/setup_and_doc b/jenkinsfiles/setup_and_doc index e69de29bb..dc2fbdf6f 100644 --- a/jenkinsfiles/setup_and_doc +++ b/jenkinsfiles/setup_and_doc @@ -0,0 +1,26 @@ +pipeline { + agent { dockerfile true } + stages { + + stage('Build'){ + steps{ + sh ''' + apt update -y + apt install -y shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl + ./run_tests.sh prepare + rm -rf kcov_out + mkdir kcov_out/ + git config --global user.email "kw@kworkflow.net" + git config --global user.name "Kworkflow" + ./run_tests.sh + kcov --include-path=src,kw \ + --exclude-pattern=src/bash_autocomplete.sh,src/help.sh \ + kcov_out/ ./run_tests.sh + mv kcov_out/run_tests.sh.*/cobertura.xml $(pwd)/cobertura.xml + ''' + cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'cobertura.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false + } + } + + } +} diff --git a/jenkinsfiles/shellcheck-reviewdog b/jenkinsfiles/shellcheck-reviewdog index e69de29bb..dc2fbdf6f 100644 --- a/jenkinsfiles/shellcheck-reviewdog +++ b/jenkinsfiles/shellcheck-reviewdog @@ -0,0 +1,26 @@ +pipeline { + agent { dockerfile true } + stages { + + stage('Build'){ + steps{ + sh ''' + apt update -y + apt install -y shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl + ./run_tests.sh prepare + rm -rf kcov_out + mkdir kcov_out/ + git config --global user.email "kw@kworkflow.net" + git config --global user.name "Kworkflow" + ./run_tests.sh + kcov --include-path=src,kw \ + --exclude-pattern=src/bash_autocomplete.sh,src/help.sh \ + kcov_out/ ./run_tests.sh + mv kcov_out/run_tests.sh.*/cobertura.xml $(pwd)/cobertura.xml + ''' + cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'cobertura.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false + } + } + + } +} diff --git a/jenkinsfiles/unit_tests b/jenkinsfiles/unit_tests index e69de29bb..dc2fbdf6f 100644 --- a/jenkinsfiles/unit_tests +++ b/jenkinsfiles/unit_tests @@ -0,0 +1,26 @@ +pipeline { + agent { dockerfile true } + stages { + + stage('Build'){ + steps{ + sh ''' + apt update -y + apt install -y shunit2 bc sqlite3 bsdmainutils libxml-xpath-perl + ./run_tests.sh prepare + rm -rf kcov_out + mkdir kcov_out/ + git config --global user.email "kw@kworkflow.net" + git config --global user.name "Kworkflow" + ./run_tests.sh + kcov --include-path=src,kw \ + --exclude-pattern=src/bash_autocomplete.sh,src/help.sh \ + kcov_out/ ./run_tests.sh + mv kcov_out/run_tests.sh.*/cobertura.xml $(pwd)/cobertura.xml + ''' + cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'cobertura.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false + } + } + + } +}