This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4634 from hashicorp/backport/convert-hashicorp-wa…
…ypoint-to-actions-20230412-195606/strongly-true-gibbon Backport of Convert hashicorp/waypoint to GitHub Actions into release/0.11.x
- Loading branch information
Showing
24 changed files
with
760 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: npm | ||
directory: /ui | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 1 | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
runner_count="${runner_count:-4}" | ||
|
||
all_packages=$(go list -json="ImportPath" ./...) | ||
|
||
filtered_packages=$(jq --compact-output \ | ||
--slurp \ | ||
'map( | ||
.ImportPath | | ||
select( | ||
(contains("test-e2e") | not) | ||
) | ||
)'\ | ||
<<< "${all_packages}") | ||
|
||
# _nwise is an undocumented jq function that splits an array | ||
# into arrays of size N where N is the input. We calculate N based | ||
# off of the number of packages divided by the number of GHA runners | ||
# we wish to use. We also track the array index to pass into the matrix | ||
# so that we can uniquely identify the test results. | ||
matrix=$(jq --argjson count $runner_count \ | ||
--compact-output \ | ||
-r \ | ||
'[_nwise(length / $count | ceil)] | to_entries | map({id: .key, packages: .value})' \ | ||
<<< "${filtered_packages}" | ||
) | ||
|
||
# [keys as $k | {group: $k, packages: .[$k]}]' \ | ||
echo "matrix=${matrix}" | tee -a $GITHUB_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: "3.9" | ||
services: | ||
localstack: | ||
image: docker.mirror.hashicorp.services/localstack/localstack:1.3 | ||
ports: | ||
- 4510-4559:4510-4559 | ||
- 4566:4566 | ||
- 5678:5678 | ||
pebble: | ||
image: docker.mirror.hashicorp.services/letsencrypt/pebble | ||
command: pebble | ||
environment: | ||
PEBBLE_VA_NOSLEEP: 1 | ||
PEBBLE_VA_ALWAYS_VALID: 1 | ||
postgres: | ||
image: docker.mirror.hashicorp.services/circleci/postgres:11-alpine | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_DB: waypoint_test | ||
ports: | ||
- "5432:5432" | ||
vault: | ||
image: docker.mirror.hashicorp.services/vault | ||
command: server -dev -dev-root-token-id=hznroot | ||
ports: | ||
- "8200:8200" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# If the repository is public, be sure to change to GitHub hosted runners | ||
name: Lint GitHub Actions Workflows | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/* | ||
|
||
permissions: | ||
contents: read | ||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
- name: "Check workflow files" | ||
uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.