Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test jit plugin install with matrix #1164

Merged
merged 55 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
68c47d9
chore: jit-plugin matrix
iowillhoit Sep 22, 2023
a28887e
chore: try quotes
iowillhoit Sep 22, 2023
e4fd914
chore: trying without fromJson
iowillhoit Sep 22, 2023
1af1e35
chore: try removing newlines
iowillhoit Sep 22, 2023
f7ab839
chore: add needs
iowillhoit Sep 22, 2023
bc32246
chore: add echo
iowillhoit Sep 22, 2023
5428fec
chore: testing hardcoded values
iowillhoit Sep 22, 2023
a7498e4
chore: echo fromJSON output
iowillhoit Sep 22, 2023
755cfee
chore: compact jq
iowillhoit Sep 22, 2023
f78d481
chore: tojson
iowillhoit Sep 22, 2023
16f122b
chore: single quotes
iowillhoit Sep 22, 2023
3647c4c
chore: more quotes
iowillhoit Sep 22, 2023
58ac5e0
chore: remove fromjson
iowillhoit Sep 22, 2023
d91c012
chore: manual input
iowillhoit Sep 22, 2023
a0a4754
chore: double
iowillhoit Sep 22, 2023
d859cd6
chore: why
iowillhoit Sep 22, 2023
c020bf4
chore: as object
iowillhoit Sep 22, 2023
037a4f0
chore: single quotes
iowillhoit Sep 22, 2023
a160443
chore: tojson frist
iowillhoit Sep 22, 2023
45edef6
chore: tojson
iowillhoit Sep 22, 2023
b19d9dd
chore: seperate steps
iowillhoit Sep 22, 2023
375795b
chore: more logging
iowillhoit Sep 22, 2023
a5dd08a
chore: outputs
iowillhoit Sep 22, 2023
b2b1ae3
chore: remove job echo
iowillhoit Sep 22, 2023
2dde5cf
chore: toJson in needs
iowillhoit Sep 22, 2023
d59adad
chore: single quotes
iowillhoit Sep 22, 2023
1855fa1
chore: fromjson
iowillhoit Sep 22, 2023
520d586
chore: fromJSON
iowillhoit Sep 22, 2023
6527b1a
chore: to and from json
iowillhoit Sep 22, 2023
a645059
chore: no json
iowillhoit Sep 22, 2023
366464d
chore: json job
iowillhoit Sep 22, 2023
d271d70
chore: needs not step
iowillhoit Sep 22, 2023
ec26bca
chore: swap
iowillhoit Sep 22, 2023
8784fb3
chore: tostring
iowillhoit Sep 22, 2023
bbc0398
chore: fromJSON
iowillhoit Sep 22, 2023
a1c85ac
chore: tojson in outputs
iowillhoit Sep 25, 2023
7493a8d
chore: forgot needs
iowillhoit Sep 25, 2023
33157d6
chore: order
iowillhoit Sep 25, 2023
e52896c
chore: quotes
iowillhoit Sep 25, 2023
67d9d82
chore: singlequotes
iowillhoit Sep 25, 2023
a7ec573
chore: wildcard
iowillhoit Sep 25, 2023
7f2295a
chore: oh my it worked, now to tweak it
iowillhoit Sep 25, 2023
a585964
chore: non-compact
iowillhoit Sep 25, 2023
603949b
chore: eof
iowillhoit Sep 25, 2023
62e3f9a
chore: hmmm
iowillhoit Sep 25, 2023
137d67d
chore: different format
iowillhoit Sep 25, 2023
ba7dfe7
chore: remove tojson
iowillhoit Sep 25, 2023
c36a26a
chore: move jit tests to own workflow
iowillhoit Sep 25, 2023
ce2da08
Merge branch 'main' into ew/jit-matrix
iowillhoit Sep 25, 2023
93dfb9a
chore: testing removing yarn cache
iowillhoit Sep 25, 2023
f14f6cb
Merge branch 'ew/jit-matrix' of github.com:salesforcecli/cli into ew/…
iowillhoit Sep 25, 2023
45d3249
chore: add install retries
iowillhoit Sep 25, 2023
f1b2a91
chore: upload/download v3
iowillhoit Sep 25, 2023
52d1d47
chore: bump rel-man
iowillhoit Sep 26, 2023
3929327
Merge branch 'main' into ew/jit-matrix
iowillhoit Sep 26, 2023
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
68 changes: 68 additions & 0 deletions .github/workflows/jit-install-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: jit-install-smoke

on:
workflow_dispatch:
workflow_call:

jobs:
manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
- run: yarn install
- run: yarn build
- run: yarn oclif manifest
- uses: actions/upload-artifact@v3
with:
name: manifest
path: oclif.manifest.json

get-jit-plugins:
runs-on: ubuntu-latest
outputs:
jit: ${{ steps.plugins.outputs.jit }}
steps:
- uses: actions/checkout@v3
- name: Get JIT plugins
id: plugins
# This was a pain to get working, be weary of changing it...
# For the dynamic matrix to work, you have to have a VERY specific format:
# Output must be multiline (no jq -c), quotes matter, cannot use toJSON on output, etc...
# The dynamic matrix needs to use fromJSON when reading the needs output
# Multiline format: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-a-multiline-string
run: |
{
echo 'jit<<EOF'
jq '.oclif.jitPlugins | keys' package.json
echo EOF
} >> "$GITHUB_OUTPUT"

jit-install:
needs: [manifest, get-jit-plugins]
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
jitPlugins: ${{ fromJSON(needs.get-jit-plugins.outputs.jit) }}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
with:
ignore-scripts: true
- run: yarn build
- uses: actions/download-artifact@v3
with:
name: manifest
- name: Install JIT plugin
uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
with:
max_attempts: 3
retry_wait_seconds: 60
command: yarn sf-release cli:install:jit:test --jit-plugin ${{matrix.jitPlugins}}
timeout_minutes: 60
35 changes: 3 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,9 @@ jobs:
uses: salesforcecli/github-workflows/.github/workflows/tarballs.yml@main
secrets: inherit

manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
- run: yarn install
- run: yarn build
- run: yarn oclif manifest
- uses: actions/upload-artifact@v2
with:
name: manifest
path: oclif.manifest.json

jit-install:
needs: [manifest]
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
- run: yarn install
- run: yarn build
- uses: actions/download-artifact@v2
with:
name: manifest
- run: yarn sf-release cli:install:jit:test
jit-install-smoke:
uses: ./.github/workflows/jit-install-smoke.yml
secrets: inherit

artifacts:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"@oclif/plugin-command-snapshot": "^3.3.0",
"@salesforce/dev-config": "^4.0.1",
"@salesforce/dev-scripts": "^3.1.1",
"@salesforce/plugin-release-management": "^4.2.2",
"@salesforce/plugin-release-management": "^4.3.1-dev.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once plugin-release-management gets released, update here

"@salesforce/prettier-config": "^0.0.3",
"@salesforce/ts-sinon": "^1.4.15",
"@types/debug": "^4.1.8",
Expand All @@ -256,7 +256,7 @@
"husky": "^7.0.4",
"mocha": "^9.2.2",
"nyc": "^15.1.0",
"oclif": "^3.16.0",
"oclif": "^3.17.1",
"prettier": "^2.8.8",
"pretty-quick": "^3.1.3",
"sinon": "^11.1.2",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1797,10 +1797,10 @@
open "^8.4.2"
tslib "^2"

"@salesforce/plugin-release-management@^4.2.2":
version "4.2.2"
resolved "https://registry.yarnpkg.com/@salesforce/plugin-release-management/-/plugin-release-management-4.2.2.tgz#6187b91dc5b0d527ac31c68810eb2439e6808a39"
integrity sha512-vMw9O1z89MTnS4lRJ1ktGMrthYRIcMS8K7ceDVAsKydYryuaCxD4Ak+OA59/K+ihJ9fjjzkzqsWNt+NENDMwRQ==
"@salesforce/plugin-release-management@^4.3.1-dev.0":
version "4.3.1-dev.0"
resolved "https://registry.yarnpkg.com/@salesforce/plugin-release-management/-/plugin-release-management-4.3.1-dev.0.tgz#5d893c0823479108856fb9db8c33561c92e12397"
integrity sha512-0GWkRqum5ar3/SSumuD8k4J+nr4wGFfbHyHtgYn6cSZTSs6ll+VaUNxs4rk/0tCJw6EYC/iPgCTt5A6IzwYoFw==
dependencies:
"@oclif/core" "^2.15.0"
"@octokit/core" "^4.2.4"
Expand Down Expand Up @@ -8219,10 +8219,10 @@ object.values@^1.1.5, object.values@^1.1.6:
define-properties "^1.1.4"
es-abstract "^1.20.4"

oclif@^3.16.0:
version "3.16.0"
resolved "https://registry.yarnpkg.com/oclif/-/oclif-3.16.0.tgz#b1983f310cbb25944d7da02125aa0c095aa7669d"
integrity sha512-qbPJ9SifBDPeMnuYIyJc0+kGyXmLubJs/lOD1wjrvAiKqTWQ1xy/EFlNMgBGETCf7RQf1iSJmvf+s22ZkLc7Ow==
oclif@^3.17.1:
version "3.17.1"
resolved "https://registry.yarnpkg.com/oclif/-/oclif-3.17.1.tgz#be210c063d4e78995b8dab594c3a220c4cf17710"
integrity sha512-qwop0W9s5nJJ9tTdLsYXxxvGSNc9xKjXccEAGCXM+x8NmGtZ4P89FwqDY4PIG7IeV9VNpYhZKQArpZNwPGn0CQ==
dependencies:
"@oclif/core" "^2.11.4"
"@oclif/plugin-help" "^5.2.14"
Expand Down