Skip to content

Commit 5425674

Browse files
committed
Finalizes implementation of all planned setup functionality
1 parent 98e6cd1 commit 5425674

21 files changed

Lines changed: 15170 additions & 7016 deletions

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- dist/**
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- run: npm i -g @vercel/ncc
14+
- run: npm install
15+
- run: ncc build index.ts --license licenses.txt
16+
- name: Commit & push
17+
run: |
18+
git config --global user.name 'Build Workflow'
19+
git config --global user.email 'defaultcommitter@orgflow.io'
20+
git add --force dist/index.js
21+
git add --force dist/licenses.txt
22+
git commit -m "Updates distributables"
23+
git push

.github/workflows/main.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
paths:
6+
- dist/**
7+
8+
jobs:
9+
10+
setup_job:
11+
runs-on: ubuntu-latest
12+
container: orgflow/cli:1.3.x
13+
name: Setup
14+
outputs:
15+
stack-name: ${{ steps.create_stack.outputs.stack-name }}
16+
steps:
17+
- id: create_stack
18+
name: Create temporary stack
19+
run: |
20+
mkdir /tmp/$STACKNAME
21+
git init --bare -b main /tmp/$STACKNAME
22+
orgflow stack:create --name=$STACKNAME --gitRepoUrl=/tmp/$STACKNAME --username=${{ secrets.SALESFORCE_USERNAME }} --password=${{ secrets.SALESFORCE_PASSWORD }} --licenseKey=${{ secrets.ORGFLOW_LICENSEKEY }} --acceptEula
23+
echo "::set-output name=stack-name::$STACKNAME"
24+
env:
25+
STACKNAME: TestStack_${{ github.run_id }}_${{ github.run_number }}
26+
27+
test_job:
28+
runs-on: ${{ matrix.image }}
29+
name: Test action
30+
needs: setup_job
31+
strategy:
32+
matrix:
33+
image: [ubuntu-latest, macos-latest, windows-latest]
34+
fail-fast: false
35+
steps:
36+
- name: Checkout source
37+
uses: actions/checkout@v2
38+
- name: Set up OrgFlow
39+
uses: ./
40+
id: setup
41+
with:
42+
version: "1.3"
43+
license-key: ${{ secrets.ORGFLOW_LICENSEKEY }}
44+
salesforce-username: ${{ secrets.SALESFORCE_USERNAME }}
45+
salesforce-password: ${{ secrets.SALESFORCE_PASSWORD }}
46+
git-username: DimitriusWoodward # Bogus
47+
git-password: tMfxyRCtnulUxXZl # Bogus
48+
stack-name: ${{ needs.setup_job.outputs.stack-name }}
49+
env:
50+
ORGFLOW_ACCEPTEULA: "true"
51+
- name: Print outputs
52+
run: |
53+
echo "Version: ${{ steps.setup.outputs.version }}"
54+
echo "Encryption key: ${{ steps.setup.outputs.encryption-key }}"
55+
- name: Test persisted config
56+
run: |
57+
orgflow env:list
58+
59+
teardown_job:
60+
runs-on: ubuntu-latest
61+
container: orgflow/cli:1.3.x
62+
name: Teardown
63+
needs: [setup_job, test_job]
64+
if: ${{ always() }}
65+
steps:
66+
- name: Delete temporary stack
67+
run: |
68+
orgflow stack:delete --name=$STACKNAME --licenseKey=${{ secrets.ORGFLOW_LICENSEKEY }} --acceptEula --noConfirm
69+
env:
70+
STACKNAME: ${{ needs.setup_job.outputs.stack-name }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
node_modules
1+
/node_modules
2+
# Dist files should not be committed by developers, will be built and committed by a workflow:
3+
/dist
4+
**/*.map

README.md

Lines changed: 234 additions & 1 deletion
Large diffs are not rendered by default.

action.yml

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,68 @@
11
name: "OrgFlow: Salesforce DevOps for GitHub"
22
author: OrgFlow GmbH
33
description: Use OrgFlow CLI from GitHub Actions to build your Salesforce DevOps pipeline and manage your deployments from GitHub
4+
branding:
5+
icon: cloud
6+
color: red
47
inputs:
58
version:
6-
description: Version of OrgFlow to install. Can be specified as major '1', minor '1.1' or patch '1.1.1'; latest matching version will be installed. Omit to install latest available version.
9+
description: Version of OrgFlow to install. Can be specified as major '1', minor '1.1' or patch '1.1.1'; latest matching version will be installed (omit to install latest available version).
710
required: false
8-
includePrerelease:
9-
description: Include prerelease versions when determining latest available version.
11+
include-prerelease:
12+
description: Set to 'true' to include prerelease versions when determining latest available version.
1013
required: false
1114
default: "false"
15+
skip-install:
16+
description: Don't download and install OrgFlow (i.e. assume OrgFlow is already installed).
17+
required: false
18+
default: "false"
19+
license-key:
20+
description: Your OrgFlow license key (you can get one at https://www.orgflow.io/trial if you do not already have one).
21+
required: true
22+
salesforce-username:
23+
description: Save username for connecting to production Salesforce org (stored on runner in encrypted form).
24+
required: false
25+
salesforce-password:
26+
description: Save password for connecting to production Salesforce org (stored on runner in encrypted form).
27+
required: false
28+
git-username:
29+
description: Save username for connecting to remote Git repository (not needed if connecting to a GitHub repository).
30+
required: false
31+
git-password:
32+
description: Save access token or password for connecting to remote Git repository (use 'secrets.GITHUB_TOKEN' if connecting to the current repository).
33+
required: false
34+
git-committer-name:
35+
description: Set name to use in committer signature when committing changes to Git repository.
36+
required: false
37+
default: OrgFlow Default Committer
38+
git-committer-email:
39+
description: Set email address to use in committer signature when committing changes to Git repository.
40+
required: false
41+
default: defaultcommitter@orgflow.io
42+
stack-name:
43+
description: Name of OrgFlow stack to save credentials for (required when saving Salesforce or Git credentials).
44+
required: false
45+
encryption-key:
46+
description: Encryption key to use when encrypting and decrypting Salesforce and/or Git credentials (omit to generate a new encryption key).
47+
required: false
48+
log-file-name:
49+
description: Name (optionally tokenized) of OrgFlow diagnostic log files.
50+
required: false
51+
default: "{C}-{T:yyyyMMdd-HHmmss-FFF}.log"
52+
log-level:
53+
description: Verbosity level for OrgFlow diagnostic log files (verbose, debug, information, warning, error or fatal).
54+
required: false
55+
default: verbose
56+
upload-artifact:
57+
description: Set to 'false' to disable uploading of all OrgFlow diagnostic log files and bundles during post-job processing.
58+
required: false
59+
default: "true"
1260
outputs:
1361
version:
14-
description: Exact version of OrgFlow that was installed and configured.
62+
description: Exact version of OrgFlow that was installed and/or configured.
63+
encryption-key:
64+
description: Encryption key that was saved.
1565
runs:
1666
using: node16
1767
main: dist/index.js
68+
post: dist/index.js

0 commit comments

Comments
 (0)