Supporting no Apex tests
This commit is contained in:
Родитель
d660711a9b
Коммит
3323469559
16
app.js
16
app.js
|
@ -229,8 +229,6 @@ router.post('/deploying', (req, res) => {
|
|||
|
||||
postgresHelper.insertDeployment(insertQuery).then((result) => {
|
||||
|
||||
console.log('insert', result);
|
||||
|
||||
script = `${startingDirectory}mkdir ${directory};cd ${directory};git clone ${param} .`;
|
||||
|
||||
commands.run(command, script, () => {
|
||||
|
@ -238,16 +236,10 @@ router.post('/deploying', (req, res) => {
|
|||
message: `Successfully cloned ${param}`
|
||||
});
|
||||
});
|
||||
|
||||
// break;
|
||||
|
||||
});
|
||||
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
case 'auth':
|
||||
|
||||
sfdxurl = `echo "force://${consumerKey}:${consumerSecret}:${refresh_token}@${instance_url}" > sfdx.key`;
|
||||
|
@ -314,6 +306,14 @@ router.post('/deploying', (req, res) => {
|
|||
|
||||
case 'test':
|
||||
|
||||
if (!param) {
|
||||
res.json({
|
||||
message: 'No tests executed.'
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
script = `${startingDirectory}cd ${directory};export FORCE_SHOW_SPINNER=;sfdx force:apex:test:run -r human --json | jq -r .result | jq -r .summary | jq -r .outcome`;
|
||||
|
||||
commands.run(command, script, (result) => {
|
||||
|
|
|
@ -6,9 +6,9 @@ module.exports = {
|
|||
run: (command, commandScript, result) => {
|
||||
// console.log(command, commandScript);
|
||||
exec(commandScript, (err, stdout, stderr) => {
|
||||
if (stderr || err) {
|
||||
console.log(`${command}:err`, err);
|
||||
console.log(`${command}:stderr`, stderr);
|
||||
if (stderr && err) {
|
||||
console.log(`${command}:err`, err);
|
||||
console.log(`${command}:stderr`, stderr);
|
||||
}
|
||||
result(stdout);
|
||||
});
|
||||
|
|
|
@ -77,7 +77,7 @@ $(document).ready(() => {
|
|||
}
|
||||
})
|
||||
.then(() => {
|
||||
return deployingApi('test', timestamp);
|
||||
return deployingApi('test', timestamp, runApexTests);
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<script type="text/javascript" src="../../scripts/choose.js"></script>
|
||||
|
||||
<main class="sfdx-slim slds-card">
|
||||
|
||||
|
||||
<h2 class="slds-text-heading_medium slds-p-top_medium slds-p-bottom_medium">Confirm Deployment Details</h2>
|
||||
|
||||
<p class="slds-p-bottom_medium">
|
||||
|
@ -18,14 +18,22 @@
|
|||
<input type="radio" id="radio-1" name="options" checked="checked" value="https://github.com/wadewegner/sfdx-dreamhouse">
|
||||
<label class="slds-radio__label" for="radio-1">
|
||||
<span class="slds-radio_faux"></span>
|
||||
<span class="slds-form-element__label">https://github.com/wadewegner/sfdx-dreamhouse</span>
|
||||
<span class="slds-form-element__label">https://github.com/wadewegner/sfdx-dreamhouse</span>
|
||||
</label>
|
||||
</span>
|
||||
<span class="slds-radio">
|
||||
<input type="radio" id="radio-2" name="options" value="https://github.com/wadewegner/sfdx-simple">
|
||||
<label class="slds-radio__label" for="radio-2">
|
||||
<span class="slds-radio_faux"></span>
|
||||
<span class="slds-form-element__label">https://github.com/wadewegner/sfdx-simple</span>
|
||||
<span class="slds-form-element__label">https://github.com/wadewegner/sfdx-simple</span>
|
||||
</label>
|
||||
</span>
|
||||
|
||||
<span class="slds-radio">
|
||||
<input type="radio" id="radio-3" name="options" value="https://github.com/wadewegner/northern-trail">
|
||||
<label class="slds-radio__label" for="radio-3">
|
||||
<span class="slds-radio_faux"></span>
|
||||
<span class="slds-form-element__label">https://github.com/wadewegner/northern-trail</span>
|
||||
</label>
|
||||
</span>
|
||||
</div>
|
||||
|
|
Загрузка…
Ссылка в новой задаче