Skip to content

Commit

Permalink
Node Version CI Update (hashicorp#19978)
Browse files Browse the repository at this point in the history
* updates github workflows to read node version from .nvmrc file

* updates to double quotes for shell expression

* removes set-output workflow command

* updates to use node-version-file option for gh workflows

* pins node version to 16
  • Loading branch information
zofskeez committed Apr 4, 2023
1 parent 3fdb09a commit 7f3aab7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-vault-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Set up node and yarn
uses: actions/setup-node@v3
with:
node-version: 16
node-version-file: './ui/package.json'
cache: yarn
cache-dependency-path: ui/yarn.lock
- name: Build UI
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@ jobs:
# Setup node.js without caching to allow running npm install -g yarn (next step)
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: 16
node-version-file: './ui/package.json'
- id: install-yarn
run: |
npm install -g yarn
# Setup node.js with caching using the yarn.lock file
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: 16
node-version-file: './ui/package.json'
cache: yarn
cache-dependency-path: ui/yarn.lock
- id: install-browser-libraries
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/test-enos-scenario-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:
name: Get metadata
runs-on: ubuntu-latest
outputs:
go-version: ${{ steps.get-metadata.outputs.go-version }}
node-version: ${{ steps.get-metadata.outputs.node-version }}
runs-on: ${{ steps.get-metadata.outputs.runs-on }}
vault_edition: ${{ steps.get-metadata.outputs.vault_edition }}
steps:
Expand All @@ -42,8 +40,6 @@ jobs:
env:
IS_ENT: ${{ startsWith(github.event.repository.name, 'vault-enterprise' ) }}
run: |
echo "go-version=$(cat ./.go-version)" >> "$GITHUB_OUTPUT"
echo "node-version=$(cat ./ui/.nvmrc)" >> "$GITHUB_OUTPUT"
if [ "$IS_ENT" == true ]; then
echo "detected vault_edition=ent"
echo "runs-on=['self-hosted', 'ondemand', 'os=linux', 'type=m5d.4xlarge']" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -75,7 +71,7 @@ jobs:
- name: Set Up Go
uses: actions/setup-go@v3
with:
go-version: ${{ needs.get-metadata.outputs.go-version }}
go-version-file: ./.go-version
- uses: hashicorp/action-setup-enos@v1
with:
github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
Expand All @@ -84,7 +80,7 @@ jobs:
- name: Set Up Node
uses: actions/setup-node@v3
with:
node-version: ${{ needs.get-metadata.outputs.node-version }}
node-version-file: './ui/package.json'
- name: Set Up Terraform
uses: hashicorp/setup-terraform@v2
with:
Expand Down
1 change: 0 additions & 1 deletion ui/.nvmrc

This file was deleted.

2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"@hashicorp/ember-flight-icons": "2.0.3"
},
"engines": {
"node": ">= 16"
"node": "16"
},
"ember": {
"edition": "octane"
Expand Down

0 comments on commit 7f3aab7

Please sign in to comment.