Skip to content

Commit b41a7f1

Browse files
committed
Merge branch 'main' into key-value-migration
2 parents b8da803 + 719bab7 commit b41a7f1

File tree

341 files changed

+5446
-3085
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+5446
-3085
lines changed

.github/workflows/a11y-tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
with:
1818
install-dependencies: true
1919
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
20+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
2121
with:
2222
run_install: false
23-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
23+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2424
with:
2525
node-version: 20
2626
cache: 'pnpm'
@@ -41,7 +41,7 @@ jobs:
4141
- name: Output ember a11y test report summary (desktop)
4242
run: 'cat ember-a11y-reports/desktop.json | jq "map({moduleName,testName,routes,urls,violations: .violations | map({id, nodes: .nodes | map({failureSummary, targets: .[].[]?.relatedNodes?.[]?.target? })}) })"'
4343
- name: Upload ember a11y reports
44-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
44+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
4545
with:
4646
name: ember-a11y-reports
4747
path: ./ember-a11y-reports

.github/workflows/build-admin-ui.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ${{ fromJSON(vars.RUNNER) }}
1313
steps:
1414
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
15-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
15+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
1616
with:
1717
run_install: false
18-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
18+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
1919
with:
2020
node-version: 20
2121
cache: 'pnpm'
@@ -27,24 +27,24 @@ jobs:
2727
runs-on: ${{ fromJSON(vars.RUNNER) }}
2828
steps:
2929
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
30-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
30+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
3131
with:
3232
run_install: false
3333
- name: Build
34-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
34+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
3535
with:
3636
node-version: 20
3737
cache: 'pnpm'
3838
cache-dependency-path: '**/pnpm-lock.yaml'
3939
- run: pnpm install --offline
4040
- run: pnpm run build:ui:admin:oss
4141
- name: Upload artifact admin-ui
42-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
42+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
4343
with:
4444
name: admin-ui
4545
path: ./ui/admin/dist/
4646
- name: Upload artifact OSS admin UI
47-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
47+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
4848
with:
4949
name: admin-ui-oss
5050
path: ./ui/admin/dist/
@@ -54,19 +54,19 @@ jobs:
5454
runs-on: ${{ fromJSON(vars.RUNNER) }}
5555
steps:
5656
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
57-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
57+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
5858
with:
5959
run_install: false
6060
- name: Build
61-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
61+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
6262
with:
6363
node-version: 20
6464
cache: 'pnpm'
6565
cache-dependency-path: '**/pnpm-lock.yaml'
6666
- run: pnpm install --offline
6767
- run: pnpm run build:ui:admin:enterprise
6868
- name: Upload artifact enterprise admin UI
69-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
69+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
7070
with:
7171
name: admin-ui-ent
7272
path: ./ui/admin/dist/
@@ -76,19 +76,19 @@ jobs:
7676
runs-on: ${{ fromJSON(vars.RUNNER) }}
7777
steps:
7878
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
79-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
79+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
8080
with:
8181
run_install: false
8282
- name: Build
83-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
83+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
8484
with:
8585
node-version: 20
8686
cache: 'pnpm'
8787
cache-dependency-path: '**/pnpm-lock.yaml'
8888
- run: pnpm install --offline
8989
- run: pnpm run build:ui:admin:hcp
9090
- name: Upload artifact HCP admin UI
91-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
91+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
9292
with:
9393
name: admin-ui-hcp
9494
path: ./ui/admin/dist/

.github/workflows/copyright-validate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
- uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3
1515
- name: Add missing Copyright Headers
1616
run: copywrite headers
17-
- uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
17+
- uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
1818
with:
1919
commit_message: Add missing copyright headers

.github/workflows/monorepo-validate.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
runs-on: ${{ fromJSON(vars.RUNNER) }}
88
steps:
99
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
10-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
10+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
1111
with:
1212
run_install: false
13-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
13+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
1414
with:
1515
node-version: 20
1616
cache: 'pnpm'
@@ -23,10 +23,10 @@ jobs:
2323
runs-on: ${{ fromJSON(vars.RUNNER) }}
2424
steps:
2525
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
26+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
2727
with:
2828
run_install: false
29-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
29+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
3030
with:
3131
node-version: 20
3232
cache: 'pnpm'
@@ -41,10 +41,10 @@ jobs:
4141
timeout-minutes: 5
4242
steps:
4343
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
44-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
44+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
4545
with:
4646
run_install: false
47-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
47+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
4848
with:
4949
node-version: 20
5050
cache: 'pnpm'
@@ -62,10 +62,10 @@ jobs:
6262
with:
6363
install-dependencies: true
6464
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
65-
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
65+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
6666
with:
6767
run_install: false
68-
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
68+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
6969
with:
7070
node-version: 20
7171
cache: 'pnpm'
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
name: Test E2E Admin UI
2+
3+
on:
4+
pull_request:
5+
types: [labeled, opened, synchronize, reopened]
6+
paths:
7+
- 'ui/admin/**'
8+
- 'e2e-tests/*'
9+
- 'e2e-tests/api-client/**'
10+
- 'e2e-tests/helpers/**'
11+
- 'e2e-tests/admin/**'
12+
- '.github/workflows/test-e2e-admin-ui.yaml'
13+
workflow_dispatch:
14+
inputs:
15+
boundary-enterprise-branch:
16+
description: 'Branch of boundary-enterprise to test against (default to main)'
17+
required: true
18+
default: 'main'
19+
type: string
20+
boundary-branch:
21+
description: 'Branch of boundary to test against (default to main)'
22+
required: true
23+
default: 'main'
24+
type: string
25+
26+
jobs:
27+
test:
28+
name: test
29+
runs-on: ${{ fromJSON(vars.RUNNER_UBUNTU_22) }}
30+
strategy:
31+
matrix:
32+
include:
33+
- boundary_edition: community
34+
github_repo: hashicorp/boundary
35+
folder_name: boundary
36+
boundary_edition_short: oss
37+
enos_scenario: e2e_ui_docker
38+
test_command: admin:ce:docker
39+
boundary_branch: ${{ github.event.inputs.boundary-branch || 'main' }}
40+
- boundary_edition: enterprise
41+
github_repo: hashicorp/boundary-enterprise
42+
folder_name: boundary-enterprise
43+
boundary_edition_short: ent
44+
enos_scenario: e2e_ui_docker_ent
45+
test_command: admin:ent:docker
46+
boundary_branch: ${{ github.event.inputs.boundary-enterprise-branch || 'main' }}
47+
fail-fast: false
48+
env:
49+
ENOS_VAR_e2e_debug_no_run: true
50+
steps:
51+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
52+
with:
53+
fetch-depth: 0
54+
55+
- name: Set up pnpm
56+
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 #v4.2.0
57+
with:
58+
run_install: false
59+
60+
- name: Set up Node
61+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
62+
with:
63+
node-version: 20
64+
cache: "pnpm"
65+
cache-dependency-path: |
66+
pnpm-lock.yaml
67+
ui/desktop/electron-app/pnpm-lock.yaml
68+
69+
- name: Set up Terraform
70+
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
71+
72+
- name: Set up Enos
73+
uses: hashicorp/action-setup-enos@39a8f388434bea5eeba6649b99aa9949a55a1150
74+
with:
75+
github-token: ${{ secrets.GITHUB_TOKEN }}
76+
77+
- name: Install Vault CLI
78+
run: |
79+
wget https://releases.hashicorp.com/vault/1.12.2/vault_1.12.2_linux_amd64.zip -O /tmp/vault.zip
80+
unzip /tmp/vault.zip -d /usr/local/bin
81+
82+
- name: GPG setup
83+
run: |
84+
# Create a GPG key
85+
export KEY_PW=boundary
86+
gpg --generate-key --batch <<eoGpgConf
87+
%echo Started!
88+
Key-Type: RSA
89+
Key-Length: default
90+
Subkey-Type: RSA
91+
Name-Real: boundary
92+
Name-Comment: default
93+
Name-Email: default
94+
Expire-Date: 0
95+
Passphrase: $KEY_PW
96+
%commit
97+
%echo Done.
98+
eoGpgConf
99+
100+
# Enable gpg-preset-passphrase so that key passwords can be saved
101+
echo "allow-preset-passphrase" >> ~/.gnupg/gpg-agent.conf
102+
gpg-connect-agent reloadagent /bye &>/dev/null
103+
104+
# Get information about the created keys
105+
export lines=$(gpg --list-secret-keys --with-colons --with-keygrip)
106+
export KEY_ID=""
107+
while read -r line
108+
do
109+
# Save the first key id to be used later
110+
if [[ $line =~ "fpr"* ]]; then
111+
if [[ $KEY_ID == "" ]]; then
112+
KEY_ID="$(echo "$line" | sed -r 's/fpr|://g')"
113+
fi
114+
fi
115+
116+
# Cache the passphrases for the keys so passwords do not need to be entered
117+
if [[ $line =~ "grp"* ]]; then
118+
export KEYGRIP_ID="$(echo "$line" | sed -r 's/grp|://g')"
119+
/usr/lib/gnupg/gpg-preset-passphrase --preset -P $KEY_PW $KEYGRIP_ID
120+
fi
121+
done <<< $lines
122+
123+
# Trust the key
124+
touch /tmp/test.txt
125+
gpg -a --encrypt -r $KEY_ID --trust-model always --batch --yes /tmp/test.txt
126+
echo "trusted-key $KEY_ID" >> ~/.gnupg/gpg.conf
127+
128+
# Initialize the password store
129+
pass init $KEY_ID &>/dev/null
130+
131+
- name: Checkout ${{ matrix.folder_name }} repo
132+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
133+
with:
134+
repository: ${{ matrix.github_repo }}
135+
path: support/src/${{ matrix.folder_name }}
136+
token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
137+
ref: ${{ matrix.boundary_branch }}
138+
139+
- name: GH fix for localhost resolution
140+
run: |
141+
cat /etc/hosts && echo "-----------"
142+
sudo sed -i 's/::1 *localhost ip6-localhost ip6-loopback/::1 ip6 -localhost ip6-loopback/g' /etc/hosts
143+
cat /etc/hosts
144+
ssh -V
145+
146+
echo "127.0.0.1 localhost boundary" | sudo tee -a /etc/hosts
147+
echo "127.0.0.1 localhost worker" | sudo tee -a /etc/hosts
148+
echo "127.0.0.1 localhost vault" | sudo tee -a /etc/hosts
149+
150+
- name: Set git config
151+
run: |
152+
git config --global url."https://oauth2:${{ secrets.ELEVATED_GITHUB_TOKEN }}@github.com".insteadOf "https://github.com"
153+
154+
- name: Install node dependencies
155+
run: |
156+
pnpm install --frozen-lockfile
157+
cd e2e-tests
158+
pnpm playwright install --with-deps
159+
160+
- name: Set up test infra
161+
id: infra
162+
run: |
163+
ssh-keygen -N '' -t ed25519 -f ~/.ssh/github_enos
164+
mkdir -p ./enos/terraform-plugin-cache
165+
echo ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} > ./support/src/${{matrix.folder_name}}/internal/ui/VERSION
166+
export ENOS_VAR_ui_build_override="oss" && \
167+
export ENOS_VAR_boundary_edition=${{ matrix.boundary_edition_short }} && \
168+
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
169+
export ENOS_VAR_aws_ssh_private_key_path=~/.ssh/github_enos && \
170+
export ENOS_VAR_boundary_license="${{ secrets.BOUNDARY_ENT_LICENSE }}" && \
171+
enos scenario launch --timeout 60m0s --chdir ./support/src/${{matrix.folder_name}}/enos ${{matrix.enos_scenario}} builder:local
172+
173+
- name: Move boundary binary
174+
run: |
175+
mv ./support/src/${{matrix.folder_name}}/bin/boundary /usr/local/bin/
176+
boundary version
177+
178+
- name: Run Tests
179+
run: |
180+
source <(bash ./support/src/${{matrix.folder_name}}/enos/scripts/test_e2e_env.sh)
181+
cd e2e-tests
182+
pnpm run ${{ matrix.test_command }} --reporter=html
183+
184+
- name: Upload Playwright report
185+
if: ${{ failure() }}
186+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
187+
with:
188+
name: playwright-report-${{ matrix.boundary_edition }}
189+
path: e2e-tests/playwright-report
190+
191+
- name: Clean up test infra
192+
if: ${{ always() }}
193+
run: |
194+
export ENOS_VAR_boundary_edition=${{ matrix.boundary_edition_short }} && \
195+
export ENOS_VAR_enos_user=$GITHUB_ACTOR && \
196+
export ENOS_VAR_aws_ssh_private_key_path=~/.ssh/github_enos && \
197+
enos scenario destroy --timeout 60m0s --chdir ./support/src/${{matrix.folder_name}}/enos ${{matrix.enos_scenario}} builder:local
198+
199+
- name: Send Slack message on failure
200+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
201+
if: ${{ failure() && github.repository == 'hashicorp/boundary-ui' }}
202+
with:
203+
method: chat.postMessage
204+
token: ${{ secrets.SLACK_BOT_TOKEN }}
205+
payload: |
206+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
207+
text: ":x: admin ui e2e tests failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Branch:* ${{ github.repository }}:${{ github.head_ref }}"

0 commit comments

Comments
 (0)