Commit 24772d39 authored by Bert-Jan Fikse's avatar Bert-Jan Fikse

testerdetesttest

parent a85b9d88
Pipeline #14783 failed
## used to test projects in test-folder
## Can be used as example
include 'https://dev.whatwedo.ch/whatwedo/ci-jobs/raw/master/symfony4.yml'
add_release:
<<: *add_release
add_version:
<<: *add_version
......@@ -62,24 +62,21 @@
-
####add_version
*Verwendung*
`
`
*Parameter*
-
-
-
-
-
```
include 'https://dev.whatwedo.ch/whatwedo/ci-jobs/raw/master/modules/add_version.yml
add_version:
<<: *add_version
```
####add_release
*Verwendung*
`
`
```
include 'https://dev.whatwedo.ch/whatwedo/ci-jobs/raw/master/modules/add_release.yml
add_release:
<<: *add_release
```
*Parameter*
-
-
-
-
-
####track_release_sentry
*Verwendung*
`
......
.add_release: &add_release:
script:
- echo $CI_BUILD_REF > RELEASE
\ No newline at end of file
.add_version: &add_version:
script:
- echo "`git tag | tail -n1`-`git log --format="%h" -n 1`" > VERSION
- cat VERSION
\ No newline at end of file
.build_image_develop : &build_image_develop:
stage: deploy
script:
- docker build -t registry.we.hn/sport-point/spt-portal:develop .
- docker push registry.we.hn/sport-point/spt-portal:develop
only:
- develop
environment:
name: Entwicklungsumgebung
url: https://development.sensopro.cloud
\ No newline at end of file
.test_node_dependencies : &test_node_dependencies:
stage: test
image: whatwedo/node:latest
allow_failure: true
script:
- npm install
- node_modules/.bin/nsp check
\ No newline at end of file
.test_dependencies : &test_dependencies:
stage: test
image: whatwedo/php72:latest
script:
- php -v
- curl -OL http://get.sensiolabs.org/security-checker.phar
- php security-checker.phar --version
- php security-checker.phar security:check composer.lock
.test_phpcs : &test_phpcs:
stage: test
image: whatwedo/php70:latest
allow_failure: true
script:
- php -v
- curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
- php phpcs.phar --version
- php phpcs.phar --standard=app/config/phpcs/whatwedo ./src
\ No newline at end of file
.test_phpunit : &test_phpunit:
stage: test
image: whatwedo/symfony4:latest
allow_failure: true
script:
- apt-get update
- apt-get install php7.2-zip -y
- php -v
- curl -sS https://getcomposer.org/installer | php
- php composer.phar config -g github-oauth.github.com a8f60ea1982d9f782ab8f3a2069f808d68019910
- php composer.phar global require hirak/prestissimo
- php composer.phar install --no-scripts --prefer-dist
- php composer.phar dump-autoload --optimize
- echo 'DATABASE_URL=sqlite:///%kernel.project_dir%/var/tmp/iet-gibb-test.db' > .env
- echo 'APP_ENV=test' >> .env
- make test
# This file is a "template" of which env vars need to be defined for your application
# Copy this file to .env file for development, create environment variables when deploying to production
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=084ef10e05d953a226f78c5bb52c341f
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS=localhost,example.com
###< symfony/framework-bundle ###
###> symfony/framework-bundle ###
/.env
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###
This diff is collapsed.
#!/usr/bin/env php
<?php
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
use Symfony\Component\Dotenv\Dotenv;
set_time_limit(0);
require __DIR__.'/../vendor/autoload.php';
if (!class_exists(Application::class)) {
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
}
if (!isset($_SERVER['APP_ENV'])) {
if (!class_exists(Dotenv::class)) {
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
}
(new Dotenv())->load(__DIR__.'/../.env');
}
$input = new ArgvInput();
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);
if ($debug) {
umask(0000);
if (class_exists(Debug::class)) {
Debug::enable();
}
}
$kernel = new Kernel($env, $debug);
$application = new Application($kernel);
$application->run($input);
{
"type": "project",
"license": "proprietary",
"require": {
"php": "^7.0.8",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/console": "^3.4",
"symfony/flex": "^1.0",
"symfony/framework-bundle": "^3.4",
"symfony/lts": "^3",
"symfony/yaml": "^3.4"
},
"require-dev": {
"symfony/dotenv": "^3.4"
},
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false
}
}
}
This diff is collapsed.
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
];
framework:
router:
strict_requirements: true
framework:
secret: '%env(APP_SECRET)%'
#default_locale: en
#csrf_protection: true
#http_method_override: true
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: ~
#esi: true
#fragments: true
php_errors:
log: true
cache:
# Put the unique name of your app here: the prefix seed
# is used to compute stable namespaces for cache keys.
#prefix_seed: your_vendor_name/app_name
# The app cache caches to the filesystem by default.
# Other options include:
# Redis
#app: cache.adapter.redis
#default_redis_provider: redis://localhost
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
#app: cache.adapter.apcu
framework:
router:
strict_requirements: ~
framework:
test: true
session:
storage_id: session.storage.mock_file
# This file is the entry point to configure your own HTTP routes.
# Files in the routes/ subdirectory configure the routes for your dependencies.
#index:
# path: /
# defaults: { _controller: 'App\Controller\DefaultController::index' }
# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
public: false # Allows optimizing the container by removing unused services; this also means
# fetching services directly from the container via $container->get() won't work.
# The best practice is to be explicit about your dependencies anyway.
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/*'
exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
<?php
use App\Kernel;
use Symfony\Component\Debug\Debug;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\HttpFoundation\Request;
require __DIR__.'/../vendor/autoload.php';
// The check is to ensure we don't use .env in production
if (!isset($_SERVER['APP_ENV'])) {
if (!class_exists(Dotenv::class)) {
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
}
(new Dotenv())->load(__DIR__.'/../.env');
}
$env = $_SERVER['APP_ENV'] ?? 'dev';
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env));
if ($debug) {
umask(0000);
Debug::enable();
}
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) {
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
}
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {
Request::setTrustedHosts(explode(',', $trustedHosts));
}
$kernel = new Kernel($env, $debug);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
<?php
namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\RouteCollectionBuilder;
class Kernel extends BaseKernel
{
use MicroKernelTrait;
const CONFIG_EXTS = '.{php,xml,yaml,yml}';
public function getCacheDir()
{
return $this->getProjectDir().'/var/cache/'.$this->environment;
}
public function getLogDir()
{
return $this->getProjectDir().'/var/log';
}
public function registerBundles()
{
$contents = require $this->getProjectDir().'/config/bundles.php';
foreach ($contents as $class => $envs) {
if (isset($envs['all']) || isset($envs[$this->environment])) {
yield new $class();
}
}
}
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader)
{
$container->addResource(new FileResource($this->getProjectDir().'/config/bundles.php'));
// Feel free to remove the "container.autowiring.strict_mode" parameter
// if you are using symfony/dependency-injection 4.0+ as it's the default behavior
$container->setParameter('container.autowiring.strict_mode', true);
$container->setParameter('container.dumper.inline_class_loader', true);
$confDir = $this->getProjectDir().'/config';
$loader->load($confDir.'/{packages}/*'.self::CONFIG_EXTS, 'glob');
$loader->load($confDir.'/{packages}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, 'glob');
$loader->load($confDir.'/{services}'.self::CONFIG_EXTS, 'glob');
$loader->load($confDir.'/{services}_'.$this->environment.self::CONFIG_EXTS, 'glob');
}
protected function configureRoutes(RouteCollectionBuilder $routes)
{
$confDir = $this->getProjectDir().'/config';
$routes->import($confDir.'/{routes}/*'.self::CONFIG_EXTS, '/', 'glob');
$routes->import($confDir.'/{routes}/'.$this->environment.'/**/*'.self::CONFIG_EXTS, '/', 'glob');
$routes->import($confDir.'/{routes}'.self::CONFIG_EXTS, '/', 'glob');
}
}
{
"psr/cache": {
"version": "1.0.1"
},
"psr/container": {
"version": "1.0.0"
},
"psr/log": {
"version": "1.0.2"
},
"psr/simple-cache": {
"version": "1.0.1"
},
"symfony/cache": {
"version": "v3.4.13"
},
"symfony/class-loader": {
"version": "v3.4.13"
},
"symfony/config": {
"version": "v3.4.13"
},
"symfony/console": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "e3868d2f4a5104f19f844fe551099a00c6562527"
}
},
"symfony/debug": {
"version": "v3.4.13"
},
"symfony/dependency-injection": {
"version": "v3.4.13"
},
"symfony/dotenv": {
"version": "v3.4.13"
},
"symfony/event-dispatcher": {
"version": "v3.4.13"
},
"symfony/filesystem": {
"version": "v3.4.13"
},
"symfony/finder": {
"version": "v3.4.13"
},
"symfony/flex": {
"version": "1.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.0",
"ref": "e921bdbfe20cdefa3b82f379d1cd36df1bc8d115"
}
},
"symfony/framework-bundle": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "87c585d24de9f43bca80ebcfd5cf5cb39445d95f"
}
},
"symfony/http-foundation": {
"version": "v3.4.13"
},
"symfony/http-kernel": {
"version": "v3.4.13"
},
"symfony/lts": {
"version": "v3"
},
"symfony/polyfill-apcu": {
"version": "v1.8.0"
},
"symfony/polyfill-mbstring": {
"version": "v1.8.0"
},
"symfony/routing": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "ba769b98463f9d5f3d907db32bb64337d1e62ecb"
}
},
"symfony/yaml": {
"version": "v3.4.13"
}
}
#!/bin/bash
# Install system deps
apt-get update && apt-get install -qq php7.0-apcu
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment