Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bbaca16
Fix if conditions in release branch merge handler workflow
gfarb Dec 16, 2022
bf31cd9
set fetch depth on checkout in release branch merge handler
gfarb Dec 16, 2022
90e58bb
Merge remote-tracking branch 'origin' into dev
gfarb Dec 19, 2022
4936eba
Upgrade to node 18
gfarb Dec 19, 2022
d0067e1
setup script update to check if SFDX_PLUGINS var is null & updated pa…
gfarb Dec 20, 2022
1de46ec
update if statement to check if SFDX_PLUGINS is not null
gfarb Dec 20, 2022
ef5016d
revert changes to local setup script, update codespace setup script
gfarb Dec 20, 2022
707709b
test changes to codespaces setup script to create unsignedPluginAllow…
gfarb Dec 20, 2022
ec7fce2
nvmrc file, updated package-lock, remove bad file, update setup scrip…
gfarb Dec 21, 2022
f97b641
only remove package-lock if node_modules was cleaned up
gfarb Dec 21, 2022
dd8082f
fix syntax bug in setup script
gfarb Dec 21, 2022
c9481d1
Test fix for unsignedPluginAllowList.json generation
gfarb Dec 21, 2022
5d3c12e
only run plugin logic in setup if there are plugins to install
gfarb Dec 21, 2022
e802209
setup script path cleanup and puppeteer installation for email deliv …
gfarb Dec 21, 2022
27b5ab6
Fix compile release notes and delete artifacts
gfarb Dec 22, 2022
feb671f
Update codespaces setup script to not remove package-lock
gfarb Dec 22, 2022
924b096
remove nvm install and redundant node module installations
gfarb Dec 28, 2022
7b2da16
Only create release.md if it does not already exist
gfarb Dec 28, 2022
994fdbc
Merge remote-tracking branch 'origin/main' into dev
rdietrick Mar 19, 2025
9ec421b
upgrade node version
rdietrick Mar 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=16-bullseye
ARG VARIANT=18-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
Expand All @@ -9,7 +9,6 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends jq gawk age \
&& apt-get -y install --no-install-recommends ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils


# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
Expand Down
66 changes: 33 additions & 33 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.162.0/containers/javascript-node
{
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 10, 12, 14
"args": { "VARIANT": "14" }
},
// Set *default* container specific settings.json values on container create.
// "settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"salesforce.salesforcedx-vscode-expanded"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
"postCreateCommand": "bash scripts/codespaces/setup",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/java:1": {},
"ghcr.io/devcontainers/features/common-utils:1": {}
}
}
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 10, 12, 14
"args": { "VARIANT": "18" }
},

// Set *default* container specific settings.json values on container create.
// "settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"salesforce.salesforcedx-vscode-expanded"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
"postCreateCommand": "bash scripts/codespaces/setup",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/java:1": {},
"ghcr.io/devcontainers/features/common-utils:1": {}
}
}
8 changes: 4 additions & 4 deletions .github/workflows/issue-branch-creation-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
if: steps.branchFilter.outputs.matches == 'true'
run: |
echo "${{ secrets.SALESFORCE_JWT_KEY }}" > server.key
npx sfdx-cli force:auth:jwt:grant \
--clientid ${{ secrets.SALESFORCE_CLIENT_ID }} \
--jwtkeyfile server.key \
npx sf auth jwt grant \
--client-id ${{ secrets.SALESFORCE_CLIENT_ID }} \
--jwt-key-file server.key \
--username ${{ secrets.SALESFORCE_DEVHUB_USERNAME }} \
--setdefaultdevhubusername -a DevHub
--set-default-dev-hub -a DevHub
rm server.key
- name: Extract Branch Name
if: steps.branchFilter.outputs.matches == 'true'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push-to-main-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ jobs:
- name: Install profile decompose sf plugin # ERROR: Unable to convert this command; you must convert it manually.

if: steps.requires-deploy.outputs.changed == '1'
run: echo y | npx sfdx-cli plugins:install @rdietrick/sfdx-profile-decompose
run: echo y | npx sf plugins install @rdietrick/sfdx-profile-decompose

- name: Authenticate DevHub
if: steps.requires-deploy.outputs.changed == '1'
env:
SALESFORCE_JWT_KEY: ${{ secrets.SALESFORCE_JWT_KEY }}
run: |
echo "${SALESFORCE_JWT_KEY}" > server.key
npx sfdx-cli force:auth:jwt:grant --clientid ${{ secrets.SALESFORCE_CLIENT_ID }} --jwtkeyfile server.key --username ${{ secrets.SALESFORCE_DEVHUB_USERNAME}} --setdefaultdevhubusername -a DevHub
npx sf auth jwt grant --client-id ${{ secrets.SALESFORCE_CLIENT_ID }} --jwt-key-file server.key --username ${{ secrets.SALESFORCE_DEVHUB_USERNAME}} --set-default-dev-hub -a DevHub
npx sf org display --json -o DevHub > sfdx-auth.json

- name: Recompose profiles
if: steps.requires-deploy.outputs.changed == '1' && vars.SALESFORCE_FORMATTED_PROFILES_AND_PERMS == 'false'
run: |
npx sfdx-cli profiles:aggregate
npx sf profiles:aggregate
rm -rf force-app/main/default/profiles/decomposed force-app/main/default/permissionsets/decomposed

- name: Generate Destructive Changes Param
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-branch-pull-request-handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
- name: Recompose Profiles
if: steps.branchFilter.outputs.matches == 'true' && steps.requires-deploy.outputs.changed == '1' && vars.SALESFORCE_FORMATTED_PROFILES_AND_PERMS == 'false'
run: |
echo y | npx sfdx-cli plugins:install @rdietrick/sfdx-profile-decompose
npx sfdx-cli profiles:aggregate
echo y | npx sf plugins:install @rdietrick/sfdx-profile-decompose
npx sf profiles:aggregate
rm -rf force-app/main/default/profiles/decomposed force-app/main/default/permissionsets/decomposed
- name: Check First Deploy
if: vars.GENERATE_RELEASE == 'true' && steps.branchFilter.outputs.matches == 'true'
Expand Down Expand Up @@ -80,14 +80,14 @@ jobs:
echo "$SFDX_AUTH_SECRET_KEY" >> key.txt
age --decrypt -i key.txt ${LOGIN_ENC_FILE}.age > ${LOGIN_ENC_FILE}
rm key.txt
npx sfdx force:auth:sfdxurl:store -f ${LOGIN_ENC_FILE} -a is${{ steps.branchFilter.outputs.issueNumber }}uat
npx sf org login sfdx-url -f ${LOGIN_ENC_FILE} -a is${{ steps.branchFilter.outputs.issueNumber }}uat
- name: Deploy Source to Sandbox
if: steps.branchFilter.outputs.matches == 'true' && steps.requires-deploy.outputs.changed == '1'
env:
LOGIN_ENC_FILE: auth/sandbox-login-url-${{ steps.branchFilter.outputs.branchName }}-uat.txt
run: |
npx sfdx project generate manifest -p force-app -n temp-deploy-manifest
npx sfdx project deploy start -o is${{ steps.branchFilter.outputs.issueNumber }}uat -x temp-deploy-manifest.xml ${{ steps.check_for_destructive_changes.outputs.DESTRUCTIVE_FILES }} -w ${{ vars.DEPLOYMENT_TIMEOUT }} -l RunLocalTests --ignore-conflicts
npx sf project generate manifest -p force-app -n temp-deploy-manifest
npx sf project deploy start -o is${{ steps.branchFilter.outputs.issueNumber }}uat -x temp-deploy-manifest.xml ${{ steps.check_for_destructive_changes.outputs.DESTRUCTIVE_FILES }} -w ${{ vars.DEPLOYMENT_TIMEOUT }} -l RunLocalTests --ignore-conflicts
- name: Init Release Notes
id: init-release-notes
if: vars.GENERATE_RELEASE == 'true' && steps.check_first_deploy.outputs.FIRST_DEPLOY == 'true' && steps.branchFilter.outputs.matches == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14.20.0
v20.7.0
17 changes: 9 additions & 8 deletions docs/Dev_Flow.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Dev Flow
This project requires teams that use it to follow the following development flow. This assumes you have already followed the [setup guide](./Getting%20Started.md) and have a fully-configured, working project.

1. Developer creates a new branch for an issue. This will kick off the project's first workflow, which will provision dev and UAT sandboxes for the issue.
2. Once the sandboxes have been provisioned, check out the issue branch locally and run the `scripts/sandbox_auth` script. This will prompt the developer to authenticate to both the dev and uat sandboxes and will generate a ".age" file that should be committed to the repo.
3. Solve the issue in your dev sandbox. Development may be done using the admin interface or via vscode. Once development is complete, run the `scripts/retrieve` script to retrieve your changes. The retrieve script is a thin wrapper around the `sfdx force:source:retrieve`
command, so pass whichever arguments you would normally pass to that command to the retrieve script.
E.g., `scripts/retrieve -u issue-100 -x package.xml` would retrieve from the sandbox with alias "issue-100" using your package.xml file to determine which metadata resources to retrieve.
This project requires teams that use it to follow the following development flow. This assumes you have already followed the [setup guide](./Getting%20Started.md) and have a fully-configured, working project.

1. Developer creates a new branch for an issue. This will kick off the project's first workflow, which will provision dev and UAT sandboxes for the issue.
2. Once the sandboxes have been provisioned, check out the issue branch locally and run the `scripts/sandbox_auth` script. This will prompt the developer to authenticate to both the dev and uat sandboxes and will generate a ".age" file that should be committed to the repo.
3. Solve the issue in your dev sandbox. Development may be done using the admin interface or via vscode. Once development is complete, run the `scripts/retrieve` script to retrieve your changes. The retrieve script is a thin wrapper around the `sfdx force:source:retrieve`
command, so pass whichever arguments you would normally pass to that command to the retrieve script.
E.g., `scripts/retrieve -u issue-100 -x package.xml` would retrieve from the sandbox with alias "issue-100" using your package.xml file to determine which metadata resources to retrieve.
4. Once you're satisfied with your development work and have retrieved your latest metadata, commit your new/modified metadata to the issue branch and push it to the remote repo.
5. Open a pull request against a release branch. At this point, a second workflow will fire, which will deploy your pull request to your UAT sandbox.
5. Open a pull request against a release branch. At this point, a second workflow will fire, which will deploy your pull request to your UAT sandbox.
6. Test your changes in the UAT sandbox where they were just deployed.
7. Once testing is complete, have your pull request reviewed and merge it to the release branch.
8. Once the pull requests for all of the issues in your release have been merged, merge your release branch to your main branch. This will execute the final workflow, which deploys your release branch to your production org and then to your template org. A release will also be created in your repo.
8. Once the pull requests for all of the issues in your release have been merged, merge your release branch to your main branch. This will execute the final workflow, which deploys your release branch to your production org and then to your template org. A release will also be created in your repo.
Loading