updated
This commit is contained in:
Родитель
9bc6d7e910
Коммит
f839887752
2
.profile
2
.profile
|
@ -12,7 +12,7 @@ echo "Updating PATH to include Salesforce CLI ..."
|
|||
export PATH=$PATH:/app/.local/share/sfdx/cli/bin/
|
||||
|
||||
# echo "Updating Salesforce CLI plugin ..."
|
||||
# sfdx update
|
||||
sfdx update
|
||||
|
||||
echo "Creating local resources ..."
|
||||
mkdir /app/tmp
|
||||
|
|
22
app.js
22
app.js
|
@ -159,17 +159,17 @@ app.get('/oauth/callback', (req, res) => {
|
|||
|
||||
const router = express.Router();
|
||||
|
||||
router.get('/test', (req, res) => {
|
||||
// router.get('/test', (req, res) => {
|
||||
|
||||
const script = `ls -lA;./jq --help`;
|
||||
// const script = `ls -lA;./jq --help`;
|
||||
|
||||
commands.run('test', script, (result) => {
|
||||
res.json({
|
||||
message: result
|
||||
});
|
||||
});
|
||||
// commands.run('test', script, (result) => {
|
||||
// res.json({
|
||||
// message: result
|
||||
// });
|
||||
// });
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
router.post('/deploying', (req, res) => {
|
||||
|
||||
|
@ -184,7 +184,7 @@ router.post('/deploying', (req, res) => {
|
|||
const startingDirectory = process.env.STARTINGDIRECTORY;
|
||||
const directory = `${tokenName}-${timestamp}`;
|
||||
|
||||
const jqDirectory = '/app/.local/share/jq/bin/';
|
||||
// const jqDirectory = '/app/.local/share/jq/bin/';
|
||||
|
||||
let script;
|
||||
let sfdxurl;
|
||||
|
@ -243,7 +243,7 @@ router.post('/deploying', (req, res) => {
|
|||
|
||||
case 'test':
|
||||
|
||||
script = `${startingDirectory}cd ${directory};export FORCE_SHOW_SPINNER=;sfdx force:apex:test:run -r human --json | ${jqDirectory}jq -r .result | ${jqDirectory}jq -r .summary | ${jqDirectory}jq -r .outcome`;
|
||||
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) => {
|
||||
res.json({
|
||||
|
@ -255,7 +255,7 @@ router.post('/deploying', (req, res) => {
|
|||
|
||||
case 'url':
|
||||
|
||||
script = `${startingDirectory}cd ${directory};export FORCE_SHOW_SPINNER=;echo $(sfdx force:org:display --json | ${jqDirectory}jq -r .result | ${jqDirectory}jq -r .instanceUrl)"/secur/frontdoor.jsp?sid="$(sfdx force:org:display --json | ${jqDirectory}jq -r .result | ${jqDirectory}jq -r .accessToken)`;
|
||||
script = `${startingDirectory}cd ${directory};export FORCE_SHOW_SPINNER=;echo $(sfdx force:org:display --json | ./jq -r .result | ./jq -r .instanceUrl)"/secur/frontdoor.jsp?sid="$(sfdx force:org:display --json | ./jq -r .result | ./jq -r .accessToken)`;
|
||||
|
||||
commands.run(command, script, (result) => {
|
||||
res.json({
|
||||
|
|
Загрузка…
Ссылка в новой задаче