-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from Hi-Folks/develop
v0.3.5
- Loading branch information
Showing
10 changed files
with
99 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<fieldset class="border-2 border-blue-200 shadow-xl p-4 rounded-xl" x-data="{ showPloiService: {{ $stepDeployType === 'ploi' ? 'true' : 'false' }}}"> | ||
<legend class="text-xl font-medium text-gray-900 px-2 pb-2">Deployment (Experimental feature)</legend> | ||
<x-form.input-select model="stepDeployType" name="stepDeployType" label="Select Deployment Step" :list="['none'=>'None', 'ploi'=>'Ploi']" help="Deployment: *None* if you don't want to deploy the code in your workflow. Otherwise select from available options" multiselect=0 onChange='showPloiService= $event.target.value==="ploi";'> | ||
</x-form.input-select> | ||
|
||
<div x-show="showPloiService"> | ||
<div class="md:grid md:grid-cols-3 md:gap-3"> | ||
|
||
<div class="col-span-2"> | ||
<x-form.input-select model="stepDeployWebhookType" name="stepDeployWebhookType" label="Ploi Webhook URL: Read from secret or hardcoded" :list="['secret'=>'From Secret', 'hardcoded' => 'Hardcoded']" help="Ploi Webhook URL: Read from secret or hardcoded" multiselect=0> | ||
</x-form.input-select> | ||
</div> | ||
<div class="col-span-1"> | ||
<x-form.input-text model="stepDeployWebhookUrl" name="stepDeployWebhookUrl" label="Webhook URL" help="For secret, fill with the name of your parameter for example WEBHOOK_URL, for Hardcoded, fill with your webhook URL"> | ||
</x-form.input-text> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</fieldset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Deployment Step | ||
- name: Deploy via Ploi | ||
uses: Glennmen/ploi-deploy-action@v1.2.0 | ||
with: | ||
@if ( $stepDeployWebhookType === 'secret' ) | ||
# loaded from secret | ||
webhook_url: $@{{ secrets.WEBHOOK_URL }} | ||
@endif | ||
@if ( $stepDeployWebhookType === 'hardcoded' ) | ||
# loaded hardcoded | ||
webhook_url: {{ $stepDeployWebhookUrl }} | ||
@endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Tests\Feature; | ||
|
||
use Illuminate\Foundation\Testing\DatabaseMigrations; | ||
use Illuminate\Foundation\Testing\RefreshDatabase; | ||
use Tests\TestCase; | ||
use Livewire\Livewire; | ||
use App\Http\Livewire\ConfiguratorForm; | ||
|
||
class DeployTest extends TestCase | ||
{ | ||
|
||
use DatabaseMigrations; | ||
|
||
const DIR_MOCK ="tests/Feature/mock-asserts/"; | ||
|
||
public function testPloiDeploy() | ||
{ | ||
Livewire::test(ConfiguratorForm::class) | ||
->set("name","Test") | ||
->set("stepDeployType","ploi") | ||
->set("stepDeployWebhookType","secret") | ||
->call('submitForm') | ||
->assertSee(file_get_contents(base_path(self::DIR_MOCK."ploi-deploy.yaml"))); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Deployment Step | ||
- name: Deploy via Ploi | ||
uses: Glennmen/ploi-deploy-action@v1.2.0 | ||
with: | ||
# loaded from secret | ||
webhook_url: ${{ secrets.WEBHOOK_URL }} |