From d48a732ee2a60f6af95519fc8ba28a3d2fa53990 Mon Sep 17 00:00:00 2001 From: Chris Payne <2872984+paynecrl97@users.noreply.github.com> Date: Mon, 25 Oct 2021 10:42:15 +0100 Subject: [PATCH 01/10] Update stack-create.yml --- .github/workflows/stack-create.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stack-create.yml b/.github/workflows/stack-create.yml index c22e043..cff92ea 100644 --- a/.github/workflows/stack-create.yml +++ b/.github/workflows/stack-create.yml @@ -58,7 +58,7 @@ jobs: # Run OrgFlow command: - name: stack:create run: | - orgflow stack:create -n="${{ secrets.ORGFLOW_STACKNAME }}" -r="$GITHUB_SERVER_URL/${{ github.repository }}.git" -b=main -u="${{ secrets.SALESFORCE_USERNAME }}" -p="${{ secrets.SALESFORCE_PASSWORD }}" -i=UseExisting -e=Production + orgflow stack:create -n="${{ secrets.ORGFLOW_STACKNAME }}" -r="$GITHUB_SERVER_URL/${{ github.repository }}.git" -b=main -u="${{ secrets.SALESFORCE_USERNAME }}" -p="${{ secrets.SALESFORCE_PASSWORD }}" -e=Production # Publish diagnostic bundles to artifacts (if any): - name: Publish diagnostic bundle as artifact From ad5aecbf807cfb1b4ba476f688aca991802a796e Mon Sep 17 00:00:00 2001 From: Chris Payne <2872984+paynecrl97@users.noreply.github.com> Date: Mon, 25 Oct 2021 10:43:43 +0100 Subject: [PATCH 02/10] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 01e7e2f..bbfbea2 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ This repository contains a few sample workflows to quickly get you up and runnin ## First things first This is a template repository, and you'll need to create a new repository (using this repository as a template) to be able to follow this guide. -![image](https://user-images.githubusercontent.com/2872984/133998220-1a4e6ec7-2400-43f1-9acd-4782a5ee219a.png) - Click the big, green, `Use this template` button near the top of this page, and follow the instructions. **Make sure that you create a private repository** because we'll be committing your Salesforce metadata to it. ## Getting started From c1e8f5e4b238dafa6ad0114e8d13fa2eda454af4 Mon Sep 17 00:00:00 2001 From: OrgFlow Date: Mon, 25 Oct 2021 11:40:31 +0000 Subject: [PATCH 03/10] Add .gitattributes file --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..5378fe0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* -text \ No newline at end of file From 2a68b9b87915c106c19a63c3cccccaa968a3bf56 Mon Sep 17 00:00:00 2001 From: OrgFlow Date: Mon, 25 Oct 2021 11:40:31 +0000 Subject: [PATCH 04/10] Add .orgflowinclude file --- .orgflowinclude | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .orgflowinclude diff --git a/.orgflowinclude b/.orgflowinclude new file mode 100644 index 0000000..ad45d36 --- /dev/null +++ b/.orgflowinclude @@ -0,0 +1,17 @@ +# This is an include file used by OrgFlow. Edit this file to control which metadata types and components +# are included in the flow of changes between Salesforce and the Git repository, and between the different +# environments in your stack. +# Please refer to https://docs.orgflow.io/reference/glossary/orgflow-include-file.html for details. + +# Rules added by stack initialization 10/25/2021 11:40:31: + +!unpackaged/~/ApexClass +!unpackaged/~/ApexComponent +!unpackaged/~/ApexPage +!unpackaged/~/ApexTestSuite +!unpackaged/~/ApexTrigger +!unpackaged/~/AuraDefinitionBundle +!unpackaged/~/FlexiPage +!unpackaged/~/LightningComponentBundle +!unpackaged/~/StaticResource + From 07f83392a0ad86d5524b73841e5e839f237ad2f5 Mon Sep 17 00:00:00 2001 From: Chris Payne <2872984+paynecrl97@users.noreply.github.com> Date: Tue, 26 Oct 2021 10:11:24 +0100 Subject: [PATCH 05/10] Delete .orgflowinclude --- .orgflowinclude | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .orgflowinclude diff --git a/.orgflowinclude b/.orgflowinclude deleted file mode 100644 index ad45d36..0000000 --- a/.orgflowinclude +++ /dev/null @@ -1,17 +0,0 @@ -# This is an include file used by OrgFlow. Edit this file to control which metadata types and components -# are included in the flow of changes between Salesforce and the Git repository, and between the different -# environments in your stack. -# Please refer to https://docs.orgflow.io/reference/glossary/orgflow-include-file.html for details. - -# Rules added by stack initialization 10/25/2021 11:40:31: - -!unpackaged/~/ApexClass -!unpackaged/~/ApexComponent -!unpackaged/~/ApexPage -!unpackaged/~/ApexTestSuite -!unpackaged/~/ApexTrigger -!unpackaged/~/AuraDefinitionBundle -!unpackaged/~/FlexiPage -!unpackaged/~/LightningComponentBundle -!unpackaged/~/StaticResource - From c12b685ddd775b29eeb12c9b8ce79e77cc846c6a Mon Sep 17 00:00:00 2001 From: Chris Payne <2872984+paynecrl97@users.noreply.github.com> Date: Tue, 26 Oct 2021 10:24:11 +0100 Subject: [PATCH 06/10] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bbfbea2..6a748c5 100644 --- a/README.md +++ b/README.md @@ -34,12 +34,14 @@ A stack is a link between Salesforce and a Git repository. Go to the `Actions` tab in this repo, and run the workflow called `Create the stack`. +When OrgFlow creates your stack, it will also create your first environment (called `Production`). This environment is connected to the production Salesforce org that you provided the username and password for. You will see that a git branch called 'production' has been created too, and that the metadata from your salesforce org has been committed to this branch. + ### 3. Add another environment Environments are a link between a specific Salesforce org and a branch within the Git repository. You already created an environment for your production org when you created the stack, but now we are going to create an environment for a sandbox org. Go to the `Actions` tab in this repo, and run the workflow called `Create an environment`. -Pick a unique name for this environment (your stack only contains a single environment at the moment, and it is called `Production`, so just pick anything other than `Production`). We recommend simply `A`. +Pick a unique name for this environment (your stack only contains a single environment at the moment, and it is called `Production`, so just pick anything other than `Production`). For the purposes of this demo, we recommend simply `A`. Provide sandbox and Git branch names (we recommend `OrgFlowA` and `sb/orgflowa` respectively). From c07b5757f354c8f4fea5a321f81b62b5ebae14b2 Mon Sep 17 00:00:00 2001 From: Chris Payne <2872984+paynecrl97@users.noreply.github.com> Date: Tue, 26 Oct 2021 10:24:25 +0100 Subject: [PATCH 07/10] Delete .gitattributes --- .gitattributes | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 5378fe0..0000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* -text \ No newline at end of file From 6ad6153b3fda3f315183cacb5f88fda423651b49 Mon Sep 17 00:00:00 2001 From: Chris Payne <2872984+paynecrl97@users.noreply.github.com> Date: Tue, 26 Oct 2021 10:25:07 +0100 Subject: [PATCH 08/10] Update stack-create.yml --- .github/workflows/stack-create.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stack-create.yml b/.github/workflows/stack-create.yml index cff92ea..072dc82 100644 --- a/.github/workflows/stack-create.yml +++ b/.github/workflows/stack-create.yml @@ -58,7 +58,7 @@ jobs: # Run OrgFlow command: - name: stack:create run: | - orgflow stack:create -n="${{ secrets.ORGFLOW_STACKNAME }}" -r="$GITHUB_SERVER_URL/${{ github.repository }}.git" -b=main -u="${{ secrets.SALESFORCE_USERNAME }}" -p="${{ secrets.SALESFORCE_PASSWORD }}" -e=Production + orgflow stack:create -n="${{ secrets.ORGFLOW_STACKNAME }}" -r="$GITHUB_SERVER_URL/${{ github.repository }}.git" -b=production -u="${{ secrets.SALESFORCE_USERNAME }}" -p="${{ secrets.SALESFORCE_PASSWORD }}" -e=Production # Publish diagnostic bundles to artifacts (if any): - name: Publish diagnostic bundle as artifact From d973b5cf189947c3ff6da41ed73338ae50347488 Mon Sep 17 00:00:00 2001 From: Chris Payne <2872984+paynecrl97@users.noreply.github.com> Date: Tue, 26 Oct 2021 10:26:27 +0100 Subject: [PATCH 09/10] Update env-flowout.yml --- .github/workflows/env-flowout.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/env-flowout.yml b/.github/workflows/env-flowout.yml index a0214cc..76d8bc3 100644 --- a/.github/workflows/env-flowout.yml +++ b/.github/workflows/env-flowout.yml @@ -3,7 +3,7 @@ name: Flow out an environment on: push: - branches-ignore: [ main ] # Remove this line to enable deployments to production. Note- we assume that the production environment is backed by a branch called `main`; if this is not the case, then you'll need to update this value. + branches-ignore: [ production ] # Remove this line to enable deployments to production. Note- we assume that the production environment is backed by a branch called `production`; if this is not the case, then you'll need to update this value. jobs: flow-out: From ea99f0a51bfe3410dd03e56ff77e891ce8c64000 Mon Sep 17 00:00:00 2001 From: Chris Payne <2872984+paynecrl97@users.noreply.github.com> Date: Tue, 26 Oct 2021 10:28:17 +0100 Subject: [PATCH 10/10] Update env-create.yml --- .github/workflows/env-create.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/env-create.yml b/.github/workflows/env-create.yml index 7e834fb..eee2a0a 100644 --- a/.github/workflows/env-create.yml +++ b/.github/workflows/env-create.yml @@ -25,7 +25,7 @@ on: The metadata in your sandbox will be kept in sync with the metadata in this branch. - OrgFlow will create the branch from the head of `main` (if not already created). Make sure that the branch you provide is not already being used by another environment. + OrgFlow will create the branch from the head of `production` (if not already created). Make sure that the branch you provide is not already being used by another environment. required: true # The env:create command needs to be able to push changes back to the repo.