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

fix(deps): update all dependencies to v16 and jest snaps j:cdx-227 #1390

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
91faf9a
chore: add missing envvar (#1339)
louis-bompart Oct 26, 2023
ba423de
[skip ci]: lock master
developer-experience-bot[bot] Oct 26, 2023
de00e7e
fix: invoke is cli (#1340)
louis-bompart Oct 26, 2023
b983896
chore: removelock (#1341)
louis-bompart Oct 26, 2023
5cf7cfd
[skip ci]: lock master
developer-experience-bot[bot] Oct 26, 2023
af90f95
chore: ensure shebang, clean stuff (#1342)
louis-bompart Oct 26, 2023
09af280
[skip ci]: lock master
developer-experience-bot[bot] Oct 26, 2023
728f066
chore: use good commit for dl artifacts (#1348)
louis-bompart Oct 26, 2023
8759f3b
[skip ci]: lock master
developer-experience-bot[bot] Oct 26, 2023
c4c7d70
chore: wait for e2e before publishing on git (#1352)
louis-bompart Oct 26, 2023
1dd3949
[skip ci]: lock master
developer-experience-bot[bot] Oct 26, 2023
9ae1440
chore: rm lock+ fix bad git diff+ simplify (#1357)
louis-bompart Oct 26, 2023
b66b664
[skip ci]: lock master
developer-experience-bot[bot] Oct 26, 2023
489f134
chore: ignore when no snaps changed (#1358)
louis-bompart Oct 26, 2023
080e150
chore: use the npm registry for e2e during release (#1367)
louis-bompart Oct 27, 2023
f5e0151
chore: uniform `cliversion/cliVersion`-> `CLI_VERSION`+ run on ut (#1…
louis-bompart Oct 27, 2023
6817b3c
chore: missing v in binaries output (#1373)
louis-bompart Oct 27, 2023
86f0f1a
chore: add task to update snap in all unit tests + tweak workflow (#1…
louis-bompart Oct 27, 2023
fb59b63
chore: use github output proper (#1379)
louis-bompart Oct 27, 2023
6aa6a86
chore: hoist fn declaration in git publish all (#1383)
louis-bompart Oct 27, 2023
dc83724
chore: set git user when authoring release commit (#1385)
louis-bompart Oct 27, 2023
9b57a20
[version bump] chore(release): release release-19 [skip ci]
developer-experience-bot[bot] Oct 27, 2023
b4c1cc2
chore: fix release dl/up path (#1387)
louis-bompart Oct 27, 2023
f69971c
[skip ci]: lock master
developer-experience-bot[bot] Oct 27, 2023
a11d187
chore: ignore the snap dep pipeline kthx (#1388)
louis-bompart Oct 27, 2023
6a5804d
fix(deps): update all dependencies to v16 j:cdx-227
renovate[bot] Oct 27, 2023
9054189
chore:refresh jest snap j:cdx-227
invalid-email-address Oct 27, 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
Empty file added .git-lock
Empty file.
98 changes: 73 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
default: false
required: false
env:
E2E_USE_NPM_REGISTRY: true
# Platform environment to log into for the e2e tests.
PLATFORM_ENV: 'stg'
# Username used to log into the organization whose ID is stored in the ORG_ID variable
Expand Down Expand Up @@ -74,6 +75,7 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ inputs.version }}
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
DEBUG: ${{ inputs.debug && '*' || '' }}
- name: Prepare artifacts
run: |
Expand Down Expand Up @@ -126,7 +128,7 @@ jobs:
cache: 'npm'
node-version-file: '.nvmrc'
- name: Download artifacts
uses: actions/download-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
with:
name: npm-release
- name: Apply & delete the patch
Expand All @@ -147,15 +149,17 @@ jobs:
- name: Find modified Snapshots
id: snapshots-path
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "snapshotsPath<<$EOF" >> "$GITHUB_ENV"
git diff --name-only *.yml >> "$GITHUB_ENV"
echo "$EOF" >> "$GITHUB_ENV"
{
echo 'snapshotsPath<<EOF'
git diff --name-only **/*.snap
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Upload Jest Snapshots
if: ${{ steps.snapshots-path.outputs.snapshotsPath != ''}}
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: release-e2e-snaps
path: ${{ env.snapshotsPath }}
path: ${{ steps.snapshots-path.outputs.snapshotsPath }}
e2e-teardown:
name: End-to-end teardown
if: ${{ always() }}
Expand All @@ -177,8 +181,49 @@ jobs:
- uses: ./.github/actions/e2e-clean
with:
cliConfigJson: ${{ env.CLI_CONFIG_JSON }}
release-git:
unit-tests:
name: Unit Tests
runs-on: 'ubuntu-20.04'
needs: [release-npm]
steps:
- name: Setup runner
# Ensure we can use as many file watcher as we want. see https://github.com/facebook/create-react-app/blob/master/docusaurus/docs/troubleshooting.md#npm-start-fail-due-to-watch-error
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
with:
cache: 'npm'
node-version-file: '.nvmrc'
- name: Download artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
with:
name: npm-release
- name: Apply & delete the patch
run: |
git apply release.patch
rm release.patch
- name: Setup repo
run: npm ci
- name: Build
run: npm run build
- name: Tests
run: npm run test:ci:snap
- name: Find modified Snapshots
id: snapshots-path
run: |
{
echo 'snapshotsPath<<EOF'
git diff --name-only **/*.snap
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Upload Jest Snapshots
if: ${{ steps.snapshots-path.outputs.snapshotsPath != ''}}
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: release-e2e-snaps
path: ${{ steps.snapshots-path.outputs.snapshotsPath }}
release-git:
needs: [e2e, release-npm, unit-tests]
environment: 'Release'
runs-on: ubuntu-20.04
env:
Expand All @@ -194,15 +239,15 @@ jobs:
cache: 'npm'
node-version-file: '.nvmrc'
- name: Download NPM artifacts
uses: actions/download-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
with:
name: npm-release
- name: Apply & delete the patch
run: |
git apply release.patch
rm release.patch
- name: Download E2E artifacts
uses: actions/download-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
with:
name: release-e2e-snaps
- name: Install dependencies
Expand Down Expand Up @@ -263,7 +308,7 @@ jobs:
cache: 'npm'
node-version-file: '.nvmrc'
- name: Download artifacts
uses: actions/download-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
with:
name: npm-release
- name: Apply & delete the patch
Expand All @@ -274,8 +319,10 @@ jobs:
run: npm ci
- name: Get CLI version
run: |
echo "cliVersion=" >> "$GITHUB_ENV"
cat packages/cli/core/package.json | jq '.version' >> "$GITHUB_ENV"
{
printf "CLI_VERSION="
cat packages/cli/core/package.json | jq -r '.version'
} >> "$GITHUB_ENV"
- name: Build
run: npm run build
- name: Setup Temporary Keychain
Expand Down Expand Up @@ -311,19 +358,19 @@ jobs:
New-Item -Force -ItemType directory -Path tmp
echo "${{ secrets.COVEO_PFX }}" > ./tmp/cert.txt
certutil -decode ./tmp/cert.txt ./tmp/cert.pfx
Start-Process -FilePath "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" -ArgumentList "sign /f ./tmp/cert.pfx /p ${{ secrets.COVEO_PFX_PWD }} /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 ./dist/win32/coveo-${{env.cliversion}}-${{env.commitSHA1}}-x64.exe" -PassThru | Wait-Process
Start-Process -FilePath "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" -ArgumentList "sign /f ./tmp/cert.pfx /p ${{ secrets.COVEO_PFX_PWD }} /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 ./dist/win32/coveo-${{env.cliversion}}-${{env.commitSHA1}}-x86.exe" -PassThru | Wait-Process
Start-Process -FilePath "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" -ArgumentList "sign /f ./tmp/cert.pfx /p ${{ secrets.COVEO_PFX_PWD }} /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 ./dist/win32/coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-x64.exe" -PassThru | Wait-Process
Start-Process -FilePath "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" -ArgumentList "sign /f ./tmp/cert.pfx /p ${{ secrets.COVEO_PFX_PWD }} /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 ./dist/win32/coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-x86.exe" -PassThru | Wait-Process
- name: Sign Executable (macOS)
working-directory: ./packages/cli/core/dist/macos
if: ${{matrix.os == 'macos-latest'}}
run: |
echo "Signing for ARM64 architecture"
security unlock-keychain -p "$MACOS_KEYCHAIN_PWD" build.keychain
productsign --sign $MACOS_WWDR_TEAM_ID coveo-${{env.cliversion}}-${{env.commitSHA1}}-arm64.pkg coveo-${{env.cliversion}}-${{env.commitSHA1}}-arm64-signed.pkg --keychain build.keychain
productsign --sign $MACOS_WWDR_TEAM_ID coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-arm64.pkg coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-arm64-signed.pkg --keychain build.keychain

echo "Signing for X64 architecture"
security unlock-keychain -p "$MACOS_KEYCHAIN_PWD" build.keychain
productsign --sign $MACOS_WWDR_TEAM_ID coveo-${{env.cliversion}}-${{env.commitSHA1}}-x64.pkg coveo-${{env.cliversion}}-${{env.commitSHA1}}-x64-signed.pkg --keychain build.keychain
productsign --sign $MACOS_WWDR_TEAM_ID coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-x64.pkg coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-x64-signed.pkg --keychain build.keychain
- name: Notarize Executable (macOS)
working-directory: ./packages/cli/core/dist/macos
if: ${{matrix.os == 'macos-latest'}}
Expand All @@ -335,20 +382,20 @@ jobs:
xcrun notarytool store-credentials "notarytool-profile" --apple-id "${{ secrets.MACOS_APP_USERNAME }}" --team-id "${{ secrets.MACOS_WWDR_TEAM_ID }}" --password "${{ secrets.MACOS_APP_SPECIFIC_PWD }}"

echo "Creating temp notarization archive"
ditto -c -k --keepParent "coveo-${{env.cliversion}}-${{env.commitSHA1}}-arm64-signed.pkg" "notarization-arm64.zip"
ditto -c -k --keepParent "coveo-${{env.cliversion}}-${{env.commitSHA1}}-x64-signed.pkg" "notarization-x64.zip"
ditto -c -k --keepParent "coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-arm64-signed.pkg" "notarization-arm64.zip"
ditto -c -k --keepParent "coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-x64-signed.pkg" "notarization-x64.zip"

echo "Notarizing app"
xcrun notarytool submit "notarization-arm64.zip" --keychain-profile "notarytool-profile" --wait
xcrun notarytool submit "notarization-x64.zip" --keychain-profile "notarytool-profile" --wait

echo "Attaching staple"
xcrun stapler staple "coveo-${{env.cliversion}}-${{env.commitSHA1}}-arm64-signed.pkg"
xcrun stapler staple "coveo-${{env.cliversion}}-${{env.commitSHA1}}-x64-signed.pkg"
xcrun stapler staple "coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-arm64-signed.pkg"
xcrun stapler staple "coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-x64-signed.pkg"

echo "Deleting unsigned packages"
mv "coveo-${{env.cliversion}}-${{env.commitSHA1}}-x64-signed.pkg" "coveo-${{env.cliversion}}-${{env.commitSHA1}}-x64.pkg"
mv "coveo-${{env.cliversion}}-${{env.commitSHA1}}-arm64-signed.pkg" "coveo-${{env.cliversion}}-${{env.commitSHA1}}-arm64.pkg"
mv "coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-x64-signed.pkg" "coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-x64.pkg"
mv "coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-arm64-signed.pkg" "coveo-v${{env.CLI_VERSION}}-${{env.commitSHA1}}-arm64.pkg"
rm notarization-arm64.zip notarization-x64.zip
- name: Upload binaries
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
Expand All @@ -373,13 +420,14 @@ jobs:
cache: 'npm'
node-version-file: '.nvmrc'
- name: Download NPM artifacts
uses: actions/download-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
with:
name: npm-release
- name: Download binaries artifacts
uses: actions/download-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
with:
name: release-binaries
path: release-binaries
- name: Apply & delete the patch
run: |
git apply release.patch
Expand All @@ -401,6 +449,6 @@ jobs:
uses: svenstaro/upload-release-action@7319e4733ec7a184d739a6f412c40ffc339b69c7 # 2.5.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./packages/cli/core/dist/**/*
file: ./release-binaries/**/*
file_glob: true
tag: ${{ env.tag }}
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# release-19 (2023-10-27)

### Bug Fixes

- invoke is cli ([#1340](https://github.com/coveo/cli/issues/1340)) ([de00e7e](https://github.com/coveo/cli/commits/de00e7e6258afe717dbc295b734252484372042f))
- only diff json files ([#1323](https://github.com/coveo/cli/issues/1323)) ([ae1361a](https://github.com/coveo/cli/commits/ae1361a4ca0f553103349ca436a309c61aa56732))

### Features

- add organization to event props ([#1325](https://github.com/coveo/cli/issues/1325)) ([3afcd0f](https://github.com/coveo/cli/commits/3afcd0f78112de9eae8f91218be3df01757f8d3e))
- **cli:** change node support to 18.18.1 ([#1332](https://github.com/coveo/cli/issues/1332)) ([54c6937](https://github.com/coveo/cli/commits/54c6937829685e1af20949f082b2de484fa1f6c6))
- **cli:** change node support to only 18-20 ([#1335](https://github.com/coveo/cli/issues/1335)) ([3e65207](https://github.com/coveo/cli/commits/3e6520737650901d2b176fadc8e2e56441a8d4da))
- **cli:** deprecate config:set region and environment ([#1331](https://github.com/coveo/cli/issues/1331)) ([341d5a7](https://github.com/coveo/cli/commits/341d5a70ab92c492ff653242dabf50f154192710))
- **cli:** node 20.9.0 lts ([#1337](https://github.com/coveo/cli/issues/1337)) ([af1c3ac](https://github.com/coveo/cli/commits/af1c3ac1796bdfd534b5d037f3a42e23aa3ab225))
- **cli:** use hidden prompt or stdin for auth:token command ([#1334](https://github.com/coveo/cli/issues/1334)) ([012b6a4](https://github.com/coveo/cli/commits/012b6a45adc474f1d10a8adf5a881eb9faf5e6e8))
- support imports from `/headless` ([#1326](https://github.com/coveo/cli/issues/1326)) ([d24bec4](https://github.com/coveo/cli/commits/d24bec48e5050ffdbba406fe130a7f7a83ca9b95))

### BREAKING CHANGES

- **cli:** those flags are no longer supported by the cli and the
alternative is to re-execute a login flow with auth:login

This change is part of the effort for the next major release of the CLI
(v3)

# release-18 (2023-08-24)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ $ npm install -g @coveo/cli
$ coveo COMMAND
running command...
$ coveo (--version)
@coveo/cli/2.2.0 linux-x64 node-v18.12.1
@coveo/cli/3.0.14 linux-x64 node-v20.9.0
$ coveo --help [COMMAND]
USAGE
$ coveo COMMAND
Expand Down
Loading
Loading