Skip to content
Open

km #37

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6a52d3b
dummy Jenkins
Oct 25, 2023
72d5f0c
Added Jenkinsfile
Mubarokahh Oct 25, 2023
78cd2c4
dummy Jenkins
Oct 25, 2023
60d98cf
dummy Jenkins
Oct 25, 2023
607f0c9
changes
Oct 25, 2023
c3a0358
gi
Oct 26, 2023
bc4674a
user
Oct 26, 2023
2ece694
yes
Oct 26, 2023
b00cffb
Update Jenkinsfile
Mubarokahh Oct 26, 2023
9abfb81
Update Jenkinsfile
Mubarokahh Oct 26, 2023
98e7f84
Update Jenkinsfile
Mubarokahh Oct 26, 2023
e206ff8
Rename .env to .env.sample
Mubarokahh Oct 26, 2023
7ad00d6
Update Jenkinsfile
Mubarokahh Oct 26, 2023
1e8eebf
Update Jenkinsfile
Mubarokahh Oct 26, 2023
f0da7de
Update Jenkinsfile
Mubarokahh Oct 26, 2023
0fbbbb7
Update Jenkinsfile
Mubarokahh Oct 26, 2023
ee56a12
Update Jenkinsfile
Mubarokahh Oct 26, 2023
cadfe62
Update Jenkinsfile
Mubarokahh Oct 26, 2023
43160bd
Update Jenkinsfile
Mubarokahh Oct 26, 2023
560b07c
Update Jenkinsfile
Mubarokahh Oct 26, 2023
18b8e39
Update Jenkinsfile
Mubarokahh Oct 27, 2023
177d827
Update Jenkinsfile
Mubarokahh Oct 27, 2023
3004444
Update Jenkinsfile
Mubarokahh Oct 27, 2023
0fba469
Update Jenkinsfile
Mubarokahh Oct 27, 2023
df2dffd
Update Jenkinsfile
Mubarokahh Oct 27, 2023
b5b3d41
Update Jenkinsfile
Mubarokahh Oct 27, 2023
d8059b2
Update Jenkinsfile
Mubarokahh Oct 27, 2023
5cc4599
Update Jenkinsfile
Mubarokahh Oct 27, 2023
150963d
Update Jenkinsfile
Mubarokahh Oct 27, 2023
8412579
Update Jenkinsfile
Mubarokahh Oct 27, 2023
56c722f
Update Jenkinsfile
Mubarokahh Oct 27, 2023
626283c
Update Jenkinsfile
Mubarokahh Oct 27, 2023
1ed21f5
Update Jenkinsfile
Mubarokahh Oct 27, 2023
f011fcf
Update Jenkinsfile
Mubarokahh Oct 27, 2023
56a5f26
Update Jenkinsfile
Mubarokahh Oct 27, 2023
d29a119
Update Jenkinsfile
Mubarokahh Oct 27, 2023
e18cd55
Update Jenkinsfile
Mubarokahh Oct 27, 2023
cf09ea5
Update Jenkinsfile
Mubarokahh Oct 27, 2023
1c8c2b4
Update Jenkinsfile
Mubarokahh Oct 27, 2023
08b781d
Update Jenkinsfile
Mubarokahh Oct 27, 2023
eb512eb
Update Jenkinsfile
Mubarokahh Oct 27, 2023
f2839e4
Update Jenkinsfile
Mubarokahh Oct 27, 2023
a5aa1e8
Update Jenkinsfile
Mubarokahh Oct 27, 2023
5f7bfb7
Update Jenkinsfile
Mubarokahh Oct 27, 2023
4dc79e3
Update Jenkinsfile
Mubarokahh Oct 27, 2023
849067a
Update Jenkinsfile
Mubarokahh Oct 27, 2023
9adb37f
Update Jenkinsfile
Mubarokahh Oct 27, 2023
2929e55
Update Jenkinsfile
Mubarokahh Oct 27, 2023
c4dd3f4
Update Jenkinsfile
Mubarokahh Oct 27, 2023
a1810d3
Update Jenkinsfile
Mubarokahh Oct 28, 2023
cb34c56
Update Jenkinsfile
Mubarokahh Oct 30, 2023
a59ed74
Update Jenkinsfile
Mubarokahh Oct 30, 2023
5938dfa
Update Jenkinsfile
Mubarokahh Oct 30, 2023
63c53f4
added new file
Jan 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 4 additions & 2 deletions .env.sample
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ APP_DEBUG=true
APP_KEY=SomeRandomString
APP_URL=http://localhost

DB_HOST=127.0.0.1
DB_HOST=172.31.39.56
DB_CONNECTION=mysql
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=sePret^i
DB_PORT=3306

CACHE_DRIVER=file
SESSION_DRIVER=file
Expand All @@ -21,4 +23,4 @@ MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_ENCRYPTION=null
Empty file modified ExcludeFiles
100644 → 100755
Empty file.
102 changes: 102 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
pipeline {
agent any

environment {
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/ec2-user/.config/composer/vendor/bin"
}

stages {

stage("Initial cleanup") {
steps {
dir("${WORKSPACE}") {
deleteDir()
}
}
}

stage('Checkout SCM') {
steps {
git branch: 'main', url: 'https://github.com/Mubarokahh/php-todo.git'
}
}

stage('Prepare 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('Code Analysis') {
steps {
sh 'phploc app/ --log-csv build/logs/phploc.csv'
}
}
stage('Plot Code Coverage Report') {
steps {
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('Package Artifact'){
steps{
sh "zip -qr php-todo.zip ${WORKSPACE}/*"
}
}
stage('SonarQube Quality Gate') {
environment {
scannerHome = tool 'SonarQubeScanner'
}
steps {
withSonarQubeEnv('sonarqube') {
sh "${scannerHome}/bin/sonar-scanner"
}
}
}
stage ('Upload Artifact to Artifactory') {
steps {
script {
def server = Artifactory.server 'artifactory-server'
def uploadSpec = """{
"files": [
{
"pattern": "php-todo.zip",
"target": "SHALLOM/php-todo",
"props": "type=zip;status=ready"

}
]
}"""

server.upload spec: uploadSpec
}
}
}

stage ('Deploy to Dev Environment') {
steps {
build job: 'ansible-config-mgt/main', parameters: [[$class: 'StringParameterValue', name: 'env', value: 'dev']], propagate: false, wait: true
}
}
}
}

Empty file modified LICENSE.txt
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified app/Console/Commands/Inspire.php
100644 → 100755
Empty file.
Empty file modified app/Console/Kernel.php
100644 → 100755
Empty file.
Empty file modified app/Events/Event.php
100644 → 100755
Empty file.
Empty file modified app/Exceptions/Handler.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/AuthController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Auth/PasswordController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Controller.php
100644 → 100755
Empty file.
Empty file modified app/Http/Kernel.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/Authenticate.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/EncryptCookies.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/RedirectIfAuthenticated.php
100644 → 100755
Empty file.
Empty file modified app/Http/Middleware/VerifyCsrfToken.php
100644 → 100755
Empty file.
Empty file modified app/Http/Requests/Request.php
100644 → 100755
Empty file.
Empty file modified app/Http/routes.php
100644 → 100755
Empty file.
Empty file modified app/Jobs/Job.php
100644 → 100755
Empty file.
Empty file modified app/Listeners/.gitkeep
100644 → 100755
Empty file.
Empty file modified app/Policies/.gitkeep
100644 → 100755
Empty file.
Empty file modified app/Providers/AppServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/AuthServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/EventServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Providers/RouteServiceProvider.php
100644 → 100755
Empty file.
Empty file modified app/Task.php
100644 → 100755
Empty file.
Empty file modified app/User.php
100644 → 100755
Empty file.
Empty file modified artisan
100644 → 100755
Empty file.
Empty file modified bootstrap/app.php
100644 → 100755
Empty file.
Empty file modified bootstrap/autoload.php
100644 → 100755
Empty file.
Empty file modified bootstrap/cache/.gitignore
100644 → 100755
Empty file.
Empty file modified build.xml
100644 → 100755
Empty file.
Empty file modified composer.json
100644 → 100755
Empty file.
Empty file modified composer.lock
100644 → 100755
Empty file.
Empty file modified config/app.php
100644 → 100755
Empty file.
Empty file modified config/auth.php
100644 → 100755
Empty file.
Empty file modified config/broadcasting.php
100644 → 100755
Empty file.
Empty file modified config/cache.php
100644 → 100755
Empty file.
Empty file modified config/compile.php
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions config/database.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@

'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'host' => env('DB_HOST', '127.0.0.1'),
'database' => env('DB_DATABASE', 'homestead'),
'username' => env('DB_USERNAME', 'homestead'),
'password' => env('DB_PASSWORD', 'sePret^i'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
Expand Down
Empty file modified config/filesystems.php
100644 → 100755
Empty file.
Empty file modified config/mail.php
100644 → 100755
Empty file.
Empty file modified config/queue.php
100644 → 100755
Empty file.
Empty file modified config/services.php
100644 → 100755
Empty file.
Empty file modified config/session.php
100644 → 100755
Empty file.
Empty file modified config/view.php
100644 → 100755
Empty file.
Empty file modified database/.gitignore
100644 → 100755
Empty file.
Empty file modified database/factories/ModelFactory.php
100644 → 100755
Empty file.
Empty file modified database/migrations/.gitkeep
100644 → 100755
Empty file.
Empty file modified database/migrations/2014_10_12_000000_create_users_table.php
100644 → 100755
Empty file.
Empty file.
Empty file modified database/migrations/2015_10_27_141258_create_tasks_table.php
100644 → 100755
Empty file.
Empty file modified database/seeds/.gitkeep
100644 → 100755
Empty file.
Empty file modified database/seeds/DatabaseSeeder.php
100644 → 100755
Empty file.
Empty file added dockerfile
Empty file.
Empty file modified gulpfile.js
100644 → 100755
Empty file.
Empty file modified package.json
100644 → 100755
Empty file.
Empty file modified phpunit.xml
100644 → 100755
Empty file.
Empty file modified public/.htaccess
100644 → 100755
Empty file.
Empty file modified public/1.txt
100644 → 100755
Empty file.
Empty file modified public/favicon.ico
100644 → 100755
Empty file.
Empty file modified public/index.php
100644 → 100755
Empty file.
Empty file modified public/robots.txt
100644 → 100755
Empty file.
Empty file modified public/web.config
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions quickstart
Submodule quickstart added at f6cebb
Empty file modified resources/assets/sass/app.scss
100644 → 100755
Empty file.
Empty file modified resources/lang/en/auth.php
100644 → 100755
Empty file.
Empty file modified resources/lang/en/pagination.php
100644 → 100755
Empty file.
Empty file modified resources/lang/en/passwords.php
100644 → 100755
Empty file.
Empty file modified resources/lang/en/validation.php
100644 → 100755
Empty file.
Empty file modified resources/views/common/errors.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/errors/503.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/layouts/app.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/tasks.blade.php
100644 → 100755
Empty file.
Empty file modified resources/views/vendor/.gitkeep
100644 → 100755
Empty file.
Empty file modified resources/views/welcome.blade.php
100644 → 100755
Empty file.
Empty file modified server.php
100644 → 100755
Empty file.
Empty file modified sonar.properties
100644 → 100755
Empty file.
Empty file modified storage/app/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/app/public/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/cache/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/sessions/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/framework/views/.gitignore
100644 → 100755
Empty file.
Empty file modified storage/logs/.gitignore
100644 → 100755
Empty file.
Empty file modified tests/ExampleTest.php
100644 → 100755
Empty file.
Empty file modified tests/TestCase.php
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit8b1485987e7c5949da82435d403e52e8::getLoader();
119 changes: 119 additions & 0 deletions vendor/bin/php-parse
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
#!/usr/bin/env php
<?php

/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../nikic/php-parser/bin/php-parse)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/

namespace Composer;

$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';

if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;

public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;

return (bool) $this->handle;
}

public function stream_read($count)
{
$data = fread($this->handle, $count);

if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}

$this->position += strlen($data);

return $data;
}

public function stream_cast($castAs)
{
return $this->handle;
}

public function stream_close()
{
fclose($this->handle);
}

public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}

public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}

return false;
}

public function stream_tell()
{
return $this->position;
}

public function stream_eof()
{
return feof($this->handle);
}

public function stream_stat()
{
return array();
}

public function stream_set_option($option, $arg1, $arg2)
{
return true;
}

public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}

return false;
}
}
}

if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse');
}
}

return include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse';
Loading