Skip to content

Commit

Permalink
#296 updating json example and apex code to create environment exampl…
Browse files Browse the repository at this point in the history
…e in order to make it more detailed
  • Loading branch information
Daniel Ventura committed Dec 20, 2022
1 parent 47b54d3 commit 522ade8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"Name":"_ParentBU_","environmentVariables":[{"name":"suffix","value":"_Parent"}],"properties":[{"propertyName":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"propertyName":"MID","apiName":"mid","value":"1111111","hideValue":false}]},{"Name":"MCDEV_Training_DEV","environmentVariables":[{"name":"suffix","value":"_DEV"}],"properties":[{"propertyName":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"propertyName":"MID","apiName":"mid","value":"2222222","hideValue":false}]},{"Name":"MCDEV_Training_Prod_1","environmentVariables":[{"name":"suffix","value":"_PROD1"}],"properties":[{"propertyName":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"propertyName":"MID","apiName":"mid","value":"33333333","hideValue":false}]},{"Name":"MCDEV_Training_Prod_2","environmentVariables":[{"name":"suffix","value":"_PROD2"}],"properties":[{"propertyName":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"propertyName":"MID","apiName":"mid","value":"4444444","hideValue":false}]},{"Name":"MCDEV_Training_QA","environmentVariables":[{"name":"suffix","value":"_QA"}],"properties":[{"propertyName":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"propertyName":"MID","apiName":"mid","value":"55555555","hideValue":false}]}]
[{"Name":"_ParentBU_","environmentVariables":[{"name":"suffix","value":"_Parent"}],"properties":[{"name":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"name":"MID","apiName":"mid","value":"1111111","hideValue":false}]},{"Name":"MCDEV_Training_DEV","environmentVariables":[{"name":"suffix","value":"_DEV"}],"properties":[{"name":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"name":"MID","apiName":"mid","value":"2222222","hideValue":false}]},{"Name":"MCDEV_Training_Prod_1","environmentVariables":[{"name":"suffix","value":"_PROD1"}],"properties":[{"name":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"name":"MID","apiName":"mid","value":"33333333","hideValue":false}]},{"Name":"MCDEV_Training_Prod_2","environmentVariables":[{"name":"suffix","value":"_PROD2"}],"properties":[{"name":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"name":"MID","apiName":"mid","value":"4444444","hideValue":false}]},{"Name":"MCDEV_Training_QA","environmentVariables":[{"name":"suffix","value":"_QA"}],"properties":[{"name":"CredentialName","apiName":"credential_name","value":"CREDENTIAL_NAME","hideValue":false},{"name":"MID","apiName":"mid","value":"55555555","hideValue":false}]}]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ copado.CreateExecution.Request request = new copado.CreateExecution.Request();
request.parentId = '[functionId]';
request.templateName = '[jobTemplateApiName]';
request.callback = '[callBackClassName]';
request.preSteps = new List<copado__JobStep__c>();
request.postSteps = new List<copado__JobStep__c>();
request.runAfterInstantiation = true; copado.CreateExecution.execute(new List<copado.CreateExecution.Request>{ request });
request.dataJson = '[{"Name":"ENVIRONMENT_NAME","environmentVariables":[{"name":"ENVIRONMENT_VARIABLE_NAME","value":"ENVIRONMENT_VARIABLE_VALUE"}],"properties":[{"name":"PROPERTY_NAME","apiName":"PROPERTY_API_NAME","value":"PROPERTY_VALUE","hideValue":TRUE_OR_FALSE}]}]';
request.runAfterInstantiation = true;
copado.CreateExecution.execute(new List<copado.CreateExecution.Request>{ request });

0 comments on commit 522ade8

Please sign in to comment.