Code Monkey home page Code Monkey logo

salesforce-pipeline's Introduction

Feature Plans

Currently all of the major features have been implemented below is the list of all of the features currently implementd

More to come stay tuned ! :D

1. Code Formatting
2. Run flow on PR and on Merge to master
3. Install node dependencies
4. Install CLI
5. Run flows only when needed
6. Commit to branch when action finishes and changes are detected
7. Create a package from source directory
8. Deploy the package
9. Run Unit tests
10. Generate Report and post to codev.io
11. Pull code from org with a CRON job [current interval every 10 minues needs to be changed to nightly basis]

Upcoming Features

Below are the planned features

1. Delta Deploy
    1. Deploy only files from the commit or from the package
2. Send mails/Notifications when deployment is success or is failed
3. Create a branching stategy
4. Pre commit hooks and validations on local setup
5. look into currently facing apex validation problems
6. Deploy code only if there is change in force-app\main\default

salesforce-pipeline's People

Contributors

shreyas-girjapure avatar

Watchers

 avatar

salesforce-pipeline's Issues

Profiles Deployment issues

If you delete a class and try to deploy your code next via metadata api you 
will get errors while deploying your all of the profiles 

So currently profiles have been removed from package.xml

Useful Commands learned

  • Print Heads of git logs
    git log --oneline -n 3
    prints the last 3 logs and heads

  • Get names of the files changed between the heads
    git --no-pager diff --name-status $BEFORE $AFTER

  • Command to create a zip for package
    sfdx force:mdapi:retrieve -r ./mdAPIZip -u IDFC-dev -k force-app\main\default\manifest\package.xml

  • Validate Package
    sfdx force:source:deploy -x force-app\main\default\manifest\package.xml -c

  • Deploy component
    sfdx force:source:deploy -x force-app\main\default\manifest\package.xml

  • Run specified Tests
    sfdx force:source:deploy -x force-app\main\default\manifest\package.xml -l RunSpecifiedTests -r "AssetAndLiabilityTrigger_Test,AssetLiabilityTriggerHelper_Test" -c

  • Deployment report
    sfdx force:source:deploy:report --verbose

  • Deployment with ID
    sfdx force:source:deploy:report --verbose -i 0Af72000004ajad

  • Storing org info in json file
    sfdx force:org:display -u shreyasHome --verbose --json > authFile.json

  • Run tests and output to some directory
    sfdx force:apex:test:run -c -r tap -d ./tests/apex -w 20 -v -l RunLocalTests

  • Run Test for specified names
    sfdx force:apex:test:run -c -r human -d ./tests/apex -w 20 -v -l RunSpecifiedTests -n "TemperatureConverterTest,CalculatorClassTest"

  • Admins changes can be pulled by
    sfdx force:source:pull -f

Blogs Articles and URLs referred

Check workflow for Pull Request runs

Currently everything is implemented and tested for push events.
For concrete changes have been made for pull requests. Need to check runs for PRs as well.

Implement code modularizations if needed for PR and Push events separately

Run Tests only for the classes changed

Currently all org tests are running ,
This is causing delays in deployments. By specifying the tests OR making pipeline smart we can make this more performant.

Note :
When designing the test classes if there is some org wide pattern for naming the classes then we can make our code smart to detect test classes for changed class.

Delta Deploy

Deploy only the diff or Delta not the whole source code.
currently whole source folder is retrieved and pushed for deployment.

Create a branching strategy

Currently changes are directly deployed to master.

We need a branching strategy to provide safe and quick deployments.

Here scale of the project and teams working on it are important factors to be considered.

Run Apex server

This needs to be checked again but problem is that on local apex server never 
starts  this is to format and validate apex code before deployment.

Prettier Format Issues with Apex code

Prettier is providing with formatting errors when tries to format .cls files with bad indentation.
Same is problem with prettier installing on virtual platform

Plan was to add prettier formatting support so that all of the code remains in sync

problem with the prettier is that it adds a extra space in mostly xml ymls and line break at the end of js 

this causes problems in case of scheduled refresh of branch with source code.

Currently all of the problem causing files have been removed 

Also .cls files are excluded from the formatting , Prettier is causing issues with formatting of those files.

Adding Support for Prettier

Plan was to add prettier formatting support so that all of the code remains in sync
problem with the prettier is that it adds a extra space in mostly xml ymls and line break at the end of js
this causes problems in case of scheduled refresh of branch with source code.
Currently all of the problem causing files have been removed
Also .cls files are excluded from the formatting , Prettier is causing issues with formatting of those files.

Schedular Runs

Schedular runs of github actions are not on time 

Currently they are set to be run every 10 minutes but are not behaving as expected

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.