Skip to content

Commit e0a5d6b

Browse files
committed
UI cleanup (#266)
* Replaced old logJSONViewer aura cmp & logViewer lwc with a new consolidated logJSON quickaction lwc * Updated layouts & objects to remove XML nodes <excludeButtons>IsotopeSubscription</excludeButtons> and <excludedStandardButtons>OpenListInQuip</excludedStandardButtons> because dealing with standard buttons is the worst. In orgs that don't have these features enabled, the package installation fails * Optimized the LogEntry__c flexipage by moving limits fields to be within a tab, and removed some fields from the page * Added Chatter Feed component to app utility bar * Fixed an issue in README's markdown accidentally removing the install button image * Switched to using separate environment names in GitHub Actions * Renamed deploy.yml to build.yml, added the amazing pwsh function @jamessimone created for apex-rollup to auto-promote any prod package versions that are listed in README files
1 parent 7c0af6e commit e0a5d6b

29 files changed

Lines changed: 633 additions & 596 deletions
Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Pipeline for Nebula Logger
2-
name: Deployment
2+
name: Build
33

44
on:
55
push:
@@ -43,7 +43,6 @@ jobs:
4343
code-quality-tests:
4444
name: 'Run Code Quality Tests'
4545
runs-on: ubuntu-latest
46-
environment: Test
4746
steps:
4847
- name: 'Checkout source code'
4948
uses: actions/checkout@v2
@@ -88,7 +87,6 @@ jobs:
8887
name: 'Run LWC Tests'
8988
needs: [code-quality-tests]
9089
runs-on: ubuntu-latest
91-
environment: Test
9290
steps:
9391
- name: 'Checkout source code'
9492
uses: actions/checkout@v2
@@ -116,12 +114,11 @@ jobs:
116114
token: ${{ secrets.CODECOV_TOKEN }}
117115
flags: LWC
118116

119-
# TODO find a way to consolidate duplicated LOC for scratch org steps
120117
base-scratch-org-tests:
121118
name: 'Run Base Scratch Org Tests'
122119
needs: [code-quality-tests]
123120
runs-on: ubuntu-latest
124-
environment: Test
121+
environment: 'Base Scratch Org'
125122
steps:
126123
- name: 'Checkout source code'
127124
uses: actions/checkout@v2
@@ -168,7 +165,7 @@ jobs:
168165
name: 'Run Experience Cloud Scratch Org Tests'
169166
needs: [code-quality-tests]
170167
runs-on: ubuntu-latest
171-
environment: Test
168+
environment: 'Experience Cloud Scratch Org'
172169
steps:
173170
- name: 'Checkout source code'
174171
uses: actions/checkout@v2
@@ -215,7 +212,6 @@ jobs:
215212
- name: 'Run Apex Tests'
216213
run: npm run test:apex
217214

218-
# TODO revisit this part - for now, CodeCov.io upload will only run in the Experience Cloud org
219215
- name: 'Delete unsupported code coverage files'
220216
run: rm ./test-coverage/apex/test-result-707*-codecoverage.json
221217

@@ -234,7 +230,7 @@ jobs:
234230
needs: [lwc-tests, base-scratch-org-tests, experience-cloud-scratch-org-tests]
235231
if: ${{ github.ref != 'refs/heads/main' }}
236232
runs-on: ubuntu-latest
237-
environment: Test
233+
environment: 'Demo Org'
238234
steps:
239235
- name: 'Checkout source code'
240236
uses: actions/checkout@v2
@@ -288,7 +284,7 @@ jobs:
288284
needs: [lwc-tests, base-scratch-org-tests, experience-cloud-scratch-org-tests]
289285
if: ${{ github.ref != 'refs/heads/main' }}
290286
runs-on: ubuntu-latest
291-
environment: Test
287+
environment: 'Demo Org'
292288
steps:
293289
- name: 'Checkout source code'
294290
uses: actions/checkout@v2
@@ -319,3 +315,37 @@ jobs:
319315

320316
- name: 'Create Beta Managed Package Version'
321317
run: npm run package:version:create:managed
318+
319+
promote-package-versions:
320+
name: 'Promote Package Versions'
321+
needs: [lwc-tests, base-scratch-org-tests, experience-cloud-scratch-org-tests]
322+
if: ${{ github.ref == 'refs/heads/main' }}
323+
runs-on: ubuntu-latest
324+
steps:
325+
- name: 'Checkout source code'
326+
uses: actions/checkout@v2
327+
328+
- name: 'Restore node_modules cache'
329+
id: cache-npm
330+
uses: actions/cache@v2
331+
with:
332+
path: node_modules
333+
key: npm-${{ hashFiles('**/package-lock.json') }}
334+
restore-keys: |
335+
npm-${{ env.cache-name }}-
336+
npm-
337+
338+
- name: 'Install npm dependencies'
339+
if: steps.cache-npm.outputs.cache-hit != 'true'
340+
run: npm ci
341+
342+
- name: 'Authorize Packaging Org'
343+
shell: bash
344+
run: |
345+
echo ${{ env.DEVHUB_SFDX_URL }} > ./DEVHUB_SFDX_URL.txt
346+
npx sfdx auth:sfdxurl:store --sfdxurlfile ./DEVHUB_SFDX_URL.txt --setalias nebula-logger-packaging --setdefaultdevhubusername
347+
env:
348+
DEVHUB_SFDX_URL: ${{ secrets.DEVHUB_SFDX_URL }}
349+
350+
- name: 'Promote package versions'
351+
run: npx pwsh ./config/scripts/build/promote-readme-packages.ps1

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
Designed for Salesforce admins, developers & architects. A robust logger for Apex, Lightning Components, Flow, Process Builder & Integrations.
77

8-
## Unlocked Package - v4.6.15
8+
## Unlocked Package - v4.6.16
99

10-
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lKDQAY)
11-
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lKDQAY)
10+
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lLzQAI)
11+
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5Y0000015lLzQAI)
1212
[![View Documentation](./images/btn-view-documentation.png)](https://jongpie.github.io/NebulaLogger/)
1313

1414
## Managed Package - v4.6.0

config/scripts/build/create-and-install-package-version.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function Update-README-Package-Version-Id {
113113

114114
$packageVersionId = "$packageVersionId".Trim()
115115
# Since there are links for both the unlocked & managed packages, the unlocked package buttons are used to ensure the correct link is updated
116-
$sandboxUnlockedPackageReplacement = "https://test.salesforce.com/packaging/installPackage.apexp?p0=$packageVersionId"
116+
$sandboxUnlockedPackageReplacement = "btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=$packageVersionId"
117117
((Get-Content -path $targetreadme -Raw) -replace "btn-install-unlocked-package-sandbox.png\)\]\(https:\/\/test.salesforce.com\/packaging\/installPackage.apexp\?p0=.{0,18}", $sandboxUnlockedPackageReplacement) | Set-Content -Path $targetreadme -NoNewline
118118
$productionUnlockedPackageReplacement = "btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=$packageVersionId"
119119
((Get-Content -path $targetreadme -Raw) -replace "btn-install-unlocked-package-production.png\)\]\(https:\/\/login.salesforce.com\/packaging\/installPackage.apexp\?p0=.{0,18}", $productionUnlockedPackageReplacement) | Set-Content -Path $targetreadme -NoNewline
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This script finds any production install links for packages within README files & automatically promotes them
2+
3+
$DebugPreference = 'Continue'
4+
$ErrorActionPreference = 'Stop'
5+
6+
function Start-Package-Promotion {
7+
Write-Debug "Beginning promote script"
8+
9+
$allReadmes = Get-ChildItem -Exclude node_modules, .sfdx, tests | Get-ChildItem -Filter README.md -Recurse
10+
foreach ($readme in $allReadmes) {
11+
$readmePackageIdResults = (Select-String -Path $readme 'https:\/\/login.salesforce.com\/packaging\/installPackage.apexp\?p0=.{0,18}')
12+
if ($readmePackageIdResults.Matches.Length -gt 0) {
13+
$packageIdSplit = $readmePackageIdResults.Matches[0].Value.Split("=")
14+
if ($packageIdSplit.Length -eq 2) {
15+
$packageId = $packageIdSplit[1]
16+
Write-Debug "Promoting $packageId from $readme"
17+
npx sfdx force:package:version:promote --package $packageId --noprompt
18+
}
19+
}
20+
}
21+
Write-Debug "Finished package promotion!"
22+
}
23+
24+
Start-Package-Promotion

nebula-logger/core/main/log-management/aura/logJSONViewer/logJSONViewer.cmp

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

nebula-logger/core/main/log-management/aura/logJSONViewer/logJSONViewer.cmp-meta.xml

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

0 commit comments

Comments
 (0)