GithubHelp home page GithubHelp logo

dxatscale / dxatscale-template Goto Github PK

View Code? Open in Web Editor NEW
24.0 8.0 38.0 147 KB

DX@Scale Repository template including starter pipelines for major CI/CD platforms

Home Page: https://docs.dxatscale.io

License: MIT License

Shell 100.00%
hacktoberfest cicd azure-pipelines salesforce gitlab-ci github-actions sfdx dxatscale

dxatscale-template's Introduction

This repository contains all the core salesforce code and metadata for project

Development

This project is using a scratch org development model. In order to contribute you will need to create a scratch org with and push all metadata configuration and code.

Dependencies

  • sf cli
  • @dxatscale/sfpowerscripts plugin ( npm i -g @dxatscale/sfpowerscripts)

Scratch Org Setup

For this you will need to be authenticated to a Dev Hub org - this is typically the Production Org

  • Authenticate to the DevHub (Production Org)

    You need to perform this step only once

     $ sf auth:web:login -setalias devhub
    
  • Clone the repository

  • There are two options: fetch a scratch org with package dependencies pre-installed, or create an empty scratch org

    • Option A: Fetch a scratch org from the pool [Preferred]

      
      sfp pool:fetch -t dev -a  <alias>
      
    • Option B: Create a scratch org and install all dependencies

      sfdx org:create --definitionfile config/project-scratch-def.json --setalias <myScratchOrg> --targetdevhubusername <devhub-alias>
      sfp dependency:install --targetusername <myScratchOrg> -v <devhub-alias>
      
      Push the source code
      sf project deploy start --targetusername <myScratchOrg>
      
      

File structure

src

Each domain should be represented by a subfolder under this directory. For example, the core schema is defined as src/core-crm.

src-env-specific

Metadata that is specific to a particular org should be stored here, under the relevant org folder e.g. sit.

src-access-management

This folder is comprised of metadata relating to profiles and other access management.

scripts

Container for scripts organised by domain e.g. customer, candidates. Initialisation scripts for scratch orgs are also found here.

forceignores

Container for .forceignore files belonging to different scratchorg configurations.

src-temp

New metadata created in scratch orgs is automatically pulled to this location, and must be moved into a package as it does not get deployed.

dxatscale-template's People

Contributors

azlam-abdulsalam avatar calvinle1 avatar cjbradshaw avatar eneag-sf avatar marco10507 avatar petter-eikeland avatar ramesh-karanji avatar rocko1204 avatar rubiatoej avatar rygramer avatar vuha-acn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dxatscale-template's Issues

Dead link

using url instead of path to a file containing the url

this line is causing problem

- sfdx auth:sfdxurl:store -f "$SHAREDDEV_SFDX_AUTH_URL" -a "$SHAREDDEV_ALIAS"

it should store auth_url in a file and then reference the file but it tires to use url itself as file path

When checking I noticed this was implemented in right manner and was changed in commit
74de749

So this makes me think and brings questions to mind. Why ? Is it supposed to work this way?

Gitlab Template : Release stage should be independent

In the current gitlab template, the release pipeline is dependent on the outcome of the publish stage, This is an incorrect behaviour.

Release pipeline should be independent and doesn't dependent on any previous stages. It should be triggered manually from the main/release* branch with release definition as the input parameter

issue with azure pipelines quick-build-deploy

Hey,

I was getting an error when trying to deployy packages to dev using the updated repository. I was able to fix it by changing the template yml.

Steps to reproduce:
Merge code with Main and run the quick-build-deploy pipeline(Based off .azure-pipelines/quick-build-deploy.yml)
Error received:

 ›   Warning: sfpowerscripts orchestrator deploy is not a sfdx command.
Did you mean force source deploy? [y/n]: 
 ›   Error: Run sfdx help for a list of available commands.
##[error]Bash exited with code '127'.

Resolution:
Changed line 114 of .azure-pipelines/quick-build-deploy.yml from:
- script: sfdx sfpowerscripts:orchestrator:deploy -u dev --skipifalreadyinstalled -g "##[group],##[endgroup]"
to
- script: sfp orchestrator:deploy -u dev --skipifalreadyinstalled -g "##[group],##[endgroup]"

Build and Publish failing

Playing around with this and running it for the first time. I get an error on the Build and Phase stage -

Permission installation not allowed to Create organization package

`Publishing core
Publishing core Version 1.0.0-4571028596 with tag main...
npm notice
npm notice package: @olopsman/[email protected]
npm notice === Tarball Contents ===
npm notice 1.2kB artifact_metadata.json
npm notice 276B changelog.json
npm notice 150B package.json
npm notice 670B source/.forceignore
npm notice 801B source/config/project-scratch-def.json
npm notice 684B source/forceignores/.buildignore
npm notice 684B source/forceignores/.prepareignore
npm notice 684B source/forceignores/.quickbuildignore
npm notice 684B source/forceignores/.validateignore
npm notice 2.1kB source/manifests/sfdx-project.json.ori
npm notice 267B source/sfdx-project.json
npm notice 481B source/src/core-crm/main/default/objects/Account/fields/AccountNumber__c.field-meta.xml
npm notice 88B source/src/core-crm/README.md
npm notice === Tarball Details ===
npm notice name: @olopsman/core_sfpowerscripts_artifact
npm notice version: 1.0.0-4571028596
npm notice filename: @olopsman/core_sfpowerscripts_artifact-1.0.0-4571028596.tgz
npm notice package size: 2.3 kB
npm notice unpacked size: 8.8 kB
npm notice shasum: e44190d28ffb590d58964ee067420cc9a1507e1b
npm notice integrity: sha512-5KGZuvAd6Zbq5[...]/6NpZLDsDsW9Q==
npm notice total files: 13
npm notice
npm notice Publishing to https://npm.pkg.github.com/
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://npm.pkg.github.com/@olopsman%2fcore_sfpowerscripts_artifact - Permission installation not allowed to Create organization package
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.

npm ERR! A complete log of this run can be found in:
npm ERR! /github/home/.npm/logs/2023-03-31T02_5025_409Z-debug-0.log`

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.