-
Notifications
You must be signed in to change notification settings - Fork 3
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 #14 from xendit/fix/pipeline-yaml
Fix/pipeline yaml
- Loading branch information
Showing
7 changed files
with
104 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,48 @@ | ||
- pipeline: 'Static Application Security Testing' | ||
trigger_mode: ON_EVERY_PUSH | ||
ref_name: refs/pull/* | ||
ref_type: WILDCARD | ||
- pipeline: "Static Application Security Testing" | ||
on: "EVENT" | ||
events: | ||
- type: "PUSH" | ||
refs: | ||
- "refs/heads/master" | ||
- "refs/pull/*" | ||
priority: "NORMAL" | ||
auto_clear_cache: true | ||
fetch_all_ref: true | ||
trigger_condition: ALWAYS | ||
fetch_all_refs: true | ||
trigger_conditions: | ||
- trigger_condition: "ALWAYS" | ||
tags: [] | ||
worker_assignment: "FIXED" | ||
actions: | ||
- action: 'Run SAST' | ||
type: RUN_DOCKER_CONTAINER | ||
trigger_condition: VAR_IS | ||
- action: "Run SAST" | ||
type: "RUN_DOCKER_CONTAINER" | ||
region: "ap-southeast-1" | ||
docker_image_name: "xendit/sast" | ||
docker_image_tag: "latest" | ||
inline_commands: "run.sh" | ||
volume_mappings: | ||
- "/:/usr/deploy" | ||
shell: "SH" | ||
variables: | ||
- key: "OWNER" | ||
value: "store-channels" | ||
type: "VAR" | ||
trigger_conditions: | ||
- trigger_condition: "VAR_IS" | ||
trigger_variable_value: "master" | ||
trigger_variable_key: "BUDDY_EXECUTION_PULL_REQUEST_BASE_BRANCH" | ||
docker_image_name: xendit/sast | ||
docker_image_tag: latest | ||
integration_hash: 5e85761fc5f225000f97dd99 | ||
region: ap-southeast-1 | ||
inline_commands: run.sh | ||
volume_mappings: | ||
- '/:/usr/deploy' | ||
variables: | ||
- key: OWNER | ||
value: store-channels | ||
- action: "Send notification to channel" | ||
type: "SLACK" | ||
trigger_time: "ON_FAILURE" | ||
content: "$BUDDY_PIPELINE_NAME execution failed. Please check details in Sonarqube" | ||
blocks: "[{\"type\":\"section\",\"fields\":[{\"type\":\"mrkdwn\",\"text\":\"*Failed execution:* <$BUDDY_EXECUTION_URL|Execution #$BUDDY_EXECUTION_ID $BUDDY_EXECUTION_COMMENT>\"},{\"type\":\"mrkdwn\",\"text\":\"*Pipeline:* <$BUDDY_PIPELINE_URL|$BUDDY_PIPELINE_NAME>\"},{\"type\":\"mrkdwn\",\"text\":\"*Sonar Link:* <https://sonar.tidnex.com/project/issues?id=$BUDDY_PROJECT_NAME&resolved=false&types=VULNERABILITY&severities=BLOCKER|$BUDDY_PROJECT_NAME>\"},{\"type\":\"mrkdwn\",\"text\":\"*Project:* <$BUDDY_PROJECT_URL|$BUDDY_PROJECT_NAME>\"}]}]" | ||
channel: "C01G4EK29QR" | ||
trigger_condition: "ALWAYS" | ||
integration_hash: "5ea6524a42eba4000eb35fbb" | ||
zone_id: "" | ||
trigger_hours: [] | ||
trigger_days: [] | ||
integration_hash: "5e85761fc5f225000f97dd99" | ||
- action: "Send notification to channel" | ||
type: "SLACK" | ||
trigger_time: "ON_FAILURE" | ||
content: "$BUDDY_PIPELINE_NAME execution failed. Please check details in Sonarqube" | ||
blocks: "[{\"type\":\"section\",\"fields\":[{\"type\":\"mrkdwn\",\"text\":\"*Failed execution:* <$BUDDY_EXECUTION_URL|Execution #$BUDDY_EXECUTION_ID $BUDDY_EXECUTION_COMMENT>\"},{\"type\":\"mrkdwn\",\"text\":\"*Pipeline:* <$BUDDY_PIPELINE_URL|$BUDDY_PIPELINE_NAME>\"},{\"type\":\"mrkdwn\",\"text\":\"*Sonar Link:* <https://sonar.tidnex.com/project/issues?id=$BUDDY_PROJECT_NAME&resolved=false&types=VULNERABILITY&severities=BLOCKER|$BUDDY_PROJECT_NAME>\"},{\"type\":\"mrkdwn\",\"text\":\"*Project:* <$BUDDY_PROJECT_URL|$BUDDY_PROJECT_NAME>\"}]}]" | ||
channel: "C01G4EK29QR" | ||
trigger_conditions: | ||
- trigger_condition: "ALWAYS" | ||
zone_id: "" | ||
trigger_hours: [] | ||
trigger_days: [] | ||
integration_hash: "5ea6524a42eba4000eb35fbb" |
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 |
---|---|---|
|
@@ -29,12 +29,12 @@ | |
|
||
$comparisonHash = sha1( | ||
implode('|', [ | ||
$publicKey, | ||
$customerId, | ||
$invoiceId, | ||
$amount, | ||
$currencyCode, | ||
$secretKey | ||
$publicKey, | ||
$customerId, | ||
$invoiceId, | ||
$amount, | ||
$currencyCode, | ||
$secretKey | ||
]) | ||
); | ||
if ($verificationHash !== $comparisonHash) { | ||
|
@@ -60,7 +60,8 @@ | |
<title><?= $title ?></title> | ||
|
||
<!-- Bootstrap --> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | ||
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | ||
|
||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | ||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> | ||
|
@@ -93,14 +94,15 @@ | |
<input type="hidden" name="customer_id" value="<?= $customerId ?>"> | ||
<input type="hidden" name="return_url" value="<?= $returnUrl ?>"> | ||
<input type="hidden" name="custom_reference" value="<?= $customReference ?>"> | ||
<input type="hidden" name="verification_hash" value="<?= $verificationHash?>"> | ||
<input type="hidden" name="verification_hash" value="<?= $verificationHash ?>"> | ||
|
||
<div id="newCardInfo"> | ||
<div class="form-group"> | ||
<label>Description</label> | ||
<div class="input-group"> | ||
<input type="text" name="card_description" id="inputCardDescription" class="form-control" placeholder="Card description" | ||
value="<?=$_POST['card_description'] ?? ''?>" | ||
<input type="text" name="card_description" id="inputCardDescription" class="form-control" | ||
placeholder="Card description" | ||
value="<?= $_POST['card_description'] ?? '' ?>" | ||
> | ||
<div class="input-group-append"> | ||
<span class="input-group-text text-muted"> | ||
|
@@ -111,35 +113,43 @@ | |
</div> | ||
<div class="form-group"> | ||
<label>Card Number</label> | ||
<input type="tel" name="card_number" id="inputCardNumber" class="form-control" required placeholder="1234 1234 1234 1234" | ||
<input type="tel" name="card_number" id="inputCardNumber" class="form-control" required | ||
placeholder="1234 1234 1234 1234" | ||
data-supported-cards="visa,mastercard,amex,jcb" | ||
value="<?=$_POST['card_number'] ?? ''?>" | ||
value="<?= $_POST['card_number'] ?? '' ?>" | ||
> | ||
</div> | ||
<div class="row"> | ||
<div class="form-group col-md-6 col-sm-6"> | ||
<label>Expiry Date</label> | ||
<input type="text" name="card_expired" id="inputCardExpiry" class="form-control" required | ||
placeholder="MM / YY" | ||
value="<?=$_POST['card_expiry_date'] ?? ''?>" | ||
value="<?= $_POST['card_expiry_date'] ?? '' ?>" | ||
> | ||
</div> | ||
<div class="form-group col-md-6 col-sm-6"> | ||
<label>CVV Number</label> | ||
<input type="password" name="card_cvv" id="inputCardCVV" class="form-control" required placeholder="CVN" > | ||
<input type="password" name="card_cvv" id="inputCardCVV" class="form-control" required | ||
placeholder="CVN"> | ||
</div> | ||
</div> | ||
</div> | ||
<p class="validation"></p> | ||
<button type="submit" id="btnSaveCC" class="btn btn-primary">Save Changes</button> | ||
<button type="button" data-href="<?=$_POST['payment_method_url'] ?? ''?>" id="btnCancel" class="btn btn-secondary">Cancel</button> | ||
<button type="button" data-href="<?= $_POST['payment_method_url'] ?? '' ?>" id="btnCancel" | ||
class="btn btn-secondary">Cancel | ||
</button> | ||
</form> | ||
|
||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> | ||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" | ||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" | ||
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" | ||
crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" | ||
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" | ||
crossorigin="anonymous"></script> | ||
|
||
<script type="text/javascript" src="https://js.xendit.co/v1/xendit.min.js"></script> | ||
<script src="/assets/js/jquery.payment.js"></script> | ||
|
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