Initial implementation CI environments#41
Conversation
|
Excellent work, @ss-gxp! Thank you 🍺. I will look at this feature soon. |
|
And it would be great if you could fix the tests according your changes. See https://travis-ci.org/corpsee/php-censor/jobs/214704570 |
|
Useful feature. I have a number of solutions in my project. Solutions differ with each other by the database structure and the set of modules included. I could probably use this environments if I had an access to environment name variable in .php-censor.yml. |
|
I think it is good idea - seting the %ENVIRONMENT% variable if the environment is exists. @ss-gxp what are you think about it? |
|
Yes, |
|
Docs ❤️ Thanks! |
| } | ||
|
|
||
| if (!$table->hasColumn('name')) { | ||
| $table->addColumn('name', 'string', ['limit' => 20])->save(); |
There was a problem hiding this comment.
I would make a limit of 250 (like a 'branch' field in the 'build' table). 20 is too short
| $table = $this->table('build'); | ||
|
|
||
| if (!$table->hasColumn('environment')) { | ||
| $table->addColumn('environment', 'string', ['limit' => 20])->save(); |
There was a problem hiding this comment.
I would make a limit of 250 (like a 'branch' field in the 'build' table). 20 is too short
| $this->interpolation_vars['%COMMIT_URI%'] = $build->getCommitLink(); | ||
| $this->interpolation_vars['%BRANCH%'] = $build->getBranch(); | ||
| $this->interpolation_vars['%BRANCH_URI%'] = $build->getBranchLink(); | ||
| $this->interpolation_vars['%ENVIRONMENT%'] = $build->getEnvironment(); |
There was a problem hiding this comment.
I would add:
putenv('PHPCI_ENVIRONMENT=' . $this->interpolation_vars['%ENVIRONMENT%']);| ], | ||
| 'environment' => [ | ||
| 'type' => 'varchar', | ||
| 'length' => 20, |
There was a problem hiding this comment.
I would make a limit of 250 (like a 'branch' field in the 'build' table). 20 is too short
|
Thanks! I merged manualy this branch. |
The environment can include several branches.
When commit to a branch, builds all environments in which the branch enters.
When build the environment, the branches related to it merge into it.
If no environment is specified, it should work as before.
Builds:

Build view:

Edit project
