From f4fe1edc7702162b9ea50957831b53d6d42a94f5 Mon Sep 17 00:00:00 2001 From: "dare@darey.io" Date: Tue, 22 Dec 2020 14:26:07 +0000 Subject: [PATCH 1/2] todo --- Jenkinsfile | 98 ----------------------------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index c405829a7..000000000 --- a/Jenkinsfile +++ /dev/null @@ -1,98 +0,0 @@ -pipeline { - agent any - - - stages { - - stage("Initial cleanup") { - steps { - dir("${WORKSPACE}") { - deleteDir() - } - } - } - - stage('Checkout SCM') { - steps { - git branch: 'main', url: 'https://github.com/darey-devops/php-todo.git' - } - } - - - stage('Install Dependencies') { - steps { - sh 'mv .env.sample .env' - sh 'composer install' - sh 'php artisan migrate' - sh 'php artisan db:seed' - sh 'php artisan key:generate' - } - } - - - stage('Execute Unit Tests') { - steps { - sh './vendor/bin/phpunit' - } - } - - - stage('Publish & Plot Code Coverage Report') { - steps { - sh 'phploc app/ --log-csv build/logs/phploc.csv' - - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Lines of Code (LOC),Comment Lines of Code (CLOC),Non-Comment Lines of Code (NCLOC),Logical Lines of Code (LLOC) ', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'A - Lines of code', yaxis: 'Lines of Code' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Directories,Files,Namespaces', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'B - Structures Containers', yaxis: 'Count' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Average Class Length (LLOC),Average Method Length (LLOC),Average Function Length (LLOC)', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'C - Average Length', yaxis: 'Average Lines of Code' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Cyclomatic Complexity / Lines of Code,Cyclomatic Complexity / Number of Methods ', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'D - Relative Cyclomatic Complexity', yaxis: 'Cyclomatic Complexity by Structure' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Classes,Abstract Classes,Concrete Classes', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'E - Types of Classes', yaxis: 'Count' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Methods,Non-Static Methods,Static Methods,Public Methods,Non-Public Methods', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'F - Types of Methods', yaxis: 'Count' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Constants,Global Constants,Class Constants', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'G - Types of Constants', yaxis: 'Count' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Test Classes,Test Methods', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'I - Testing', yaxis: 'Count' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Logical Lines of Code (LLOC),Classes Length (LLOC),Functions Length (LLOC),LLOC outside functions or classes ', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'AB - Code Structure by Logical Lines of Code', yaxis: 'Logical Lines of Code' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: 'Functions,Named Functions,Anonymous Functions', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'H - Types of Functions', yaxis: 'Count' - plot csvFileName: 'plot-396c4a6b-b573-41e5-85d8-73613b2ffffb.csv', csvSeries: [[displayTableFlag: false, exclusionValues: ' Interfaces,Traits,Classes,Methods,Functions,Constants', file: 'build/logs/phploc.csv', inclusionFlag: 'INCLUDE_BY_STRING', url: '']], group: 'phploc', numBuilds: '100', style: 'line', title: 'BB - Structure Objects', yaxis: 'Count' - - - } - } - - - -stage ('Deploy Artifact') { - steps { - sh 'zip -qr ${WORKSPACE}/php-todo.zip ${WORKSPACE}/*' - script { - def server = Artifactory.server 'artifactory-server' - def uploadSpec = """{ - "files": [{ - "pattern": "php-todo.zip", - "target": "php-todo" - }] - }""" - - server.upload(uploadSpec) - } - // sh 'jfrog rt upload ${WORKSPACE}/php-todo.zip http://35.157.31.6:8082/artifactory/php-todo/todo-${BUILD_NUMBER}.zip' - } - -} - - -stage ('Deploy to Dev Environment') { - steps { - build job: 'ansible-project/main', parameters: [[$class: 'StringParameterValue', name: 'env', value: 'dev']], propagate: false, wait: true - } - } - - -} - - // post { - // always { - // echo 'Clean up' - // // xunit thresholds: [failed(failureNewThreshold: '0', failureThreshold: '0', unstableNewThreshold: '0', unstableThreshold: '0'), skipped(failureNewThreshold: '0', failureThreshold: '0', unstableNewThreshold: '0', unstableThreshold: '0')], tools: [PHPUnit(deleteOutputFiles: true, failIfNotNew: true, pattern: 'build/logs/junit.xml', skipNoTestFiles: false, stopProcessingIfError: true)] - // } - // } - -} \ No newline at end of file From b9f0eeedc100765839b23d8d3cd019a0eba95735 Mon Sep 17 00:00:00 2001 From: Emmanuel Ezeali Date: Mon, 20 Jun 2022 20:19:33 -0400 Subject: [PATCH 2/2] Update .env.sample --- .env.sample | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index 1c39502a5..b7f940993 100644 --- a/.env.sample +++ b/.env.sample @@ -3,10 +3,12 @@ APP_DEBUG=true APP_KEY=SomeRandomString APP_URL=http://localhost -DB_HOST=127.0.0.1 +DB_HOST=172.31.34.157 DB_DATABASE=homestead DB_USERNAME=homestead DB_PASSWORD=sePret^i +DB_CONNECTION=mysql +DB_PORT=3306 CACHE_DRIVER=file SESSION_DRIVER=file @@ -21,4 +23,4 @@ MAIL_HOST=mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null -MAIL_ENCRYPTION=null \ No newline at end of file +MAIL_ENCRYPTION=null