Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ user_guide_src/build/*
user_guide_src/cilexer/build/*
user_guide_src/cilexer/dist/*
user_guide_src/cilexer/pycilexer.egg-info/*
/vendor/


# IDE Files
#-------------------------
Expand Down
72 changes: 72 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
pipeline {
agent any

environment {
CI_ENV = 'production'
}

stages {
stage('Checkout') {
steps {
git branch: 'main', url: 'https://github.com/callmevan1120/CodeIgniter.git'
}
}

stage('Install Dependencies') {
steps {
sh '''
# Install dependencies
composer install --no-dev --optimize-autoloader

composer update

# Pastikan package mikey179/vfsStream terinstal
if ! composer show | grep -q "mikey179/vfsStream"; then
echo "Package mikey179/vfsStream tidak ditemukan, menginstal..."
composer require --dev mikey179/vfsStream
fi

# File yang akan diubah
FILE="mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStream.php"

# Periksa apakah file ada sebelum menjalankan sed
if [ -f "$FILE" ]; then
sed -i.bak s/name{0}/name[0]/ "$FILE"
else
echo "File $FILE tidak ditemukan, melewati perintah sed."
fi
'''
}
}

stage('Run Tests') {
steps {
sh 'phpunit'
}
post {
success {
junit 'application/tests/results/*.xml'
}
failure {
echo 'Tests failed!'
}
}
}

stage('Deploy') {
steps {
echo 'Deploying to production environment...'
// Tambahkan perintah deploy sesuai kebutuhan Anda
}
}
}

post {
success {
echo 'Pipeline completed successfully!'
}
failure {
echo 'Pipeline failed!'
}
}
}
6 changes: 6 additions & 0 deletions application/tests/Example_test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
class Example_test extends PHPUnit_Framework_TestCase {
public function testExample() {
$this->assertTrue(true);
}
}
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
"phpunit --color=always --coverage-text --configuration tests/travis/sqlite.phpunit.xml"
],
"post-install-cmd": [
"sed -i s/name{0}/name[0]/ vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php"
"sed -i s/name{0}/name[0]/ vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStream.php"
],
"post-update-cmd": [
"sed -i s/name{0}/name[0]/ vendor/mikey179/vfsstream/src/main/php/org/bovigo/vfs/vfsStream.php"
"sed -i s/name{0}/name[0]/ vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStream.php"
]
},
"require-dev": {
"mikey179/vfsstream": "1.6.*",
"phpunit/phpunit": "4.* || 5.* || 9.*"
"mikey179/vfsstream": "1.1.*",
"phpunit/phpunit": "4.* || 5.*"
}
}
7 changes: 7 additions & 0 deletions vendor/autoload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

// autoload.php @generated by Composer

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

return ComposerAutoloaderInit07478d198fc3d0499f102aefd1275be5::getLoader();
1 change: 1 addition & 0 deletions vendor/bin/doctrine
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../doctrine/orm/bin/doctrine
1 change: 1 addition & 0 deletions vendor/bin/doctrine-dbal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../doctrine/dbal/bin/doctrine-dbal
1 change: 1 addition & 0 deletions vendor/bin/doctrine.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../doctrine/orm/bin/doctrine.php
Loading