Commit Graph

210 Commits

Author SHA1 Message Date
Jaymala 5164069708
Fail completed successfully check for failing Enos tests (#20335)
* Force required completed-successfully check to fail when builds or tests fail

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Update to fail cancelled workflows

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

---------

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-04-26 15:16:31 -04:00
Kuba Wieczorek 2445637829
Run DataDog-related steps every time test-go CI workflow runs (#20364) 2023-04-26 16:28:39 +01:00
Nick Cabatoff ad18fc6398
Docker testing: handle licensing, different images per node (#20347) 2023-04-25 17:11:46 -04:00
Nick Cabatoff 1e433add83
Add ent-specific test binary build rules (#20334)
This fixes the binary building on ent, except because I ran into problems with the binary-based tests there, I've included a bunch of `github.repository != 'hashicorp/vault-enterprise'` conditions to disable the binary building.  I'll fix the test problems in a future PR and remove those repo conditions.
2023-04-25 10:49:34 -04:00
Luis (LT) Carbonell 8b4ce9c1c2
Re-run Milestone Check when Milestones are Applied (#20299)
* re-run when milestones are applied

* update milestone check conditions
2023-04-25 08:49:43 -05:00
Jaymala 2893342c60
Fix script to verify docs changes (#20317)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-04-24 13:16:01 -04:00
Nick Cabatoff b7e6090a21
Move all checkout@v2 users to v3. (#20315) 2023-04-24 15:25:58 +00:00
Nick Cabatoff 313957b911
Add tests based on vault binary (#20224)
First steps towards docker-based tests: tests using vault binary in -dev or -dev-three-node modes.
2023-04-24 09:57:37 -04:00
Jaymala e3a39f4adc
[QT-517] Skip builds for docs PRs (#20036)
* [QT-517] Skip builds for docs changes

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* [QT-545] Enable Enos tests to also run on forked PRs

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Add comments and fix CI errors

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

---------

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-04-21 10:58:47 -04:00
claire bontempo f4928cf7cb
Run UI tests on PRs with "ui" label (#20209)
* add conditional for label

* VAULT-14643 link jira
2023-04-18 12:03:35 -07:00
Ryan Cragun a19f7dbda5
[QT-525] enos: use spot instances for Vault targets (#20037)
The previous strategy for provisioning infrastructure targets was to use
the cheapest instances that could reliably perform as Vault cluster
nodes. With this change we introduce a new model for target node
infrastructure. We've replaced on-demand instances for a spot
fleet. While the spot price fluctuates based on dynamic pricing, 
capacity, region, instance type, and platform, cost savings for our
most common combinations range between 20-70%.

This change only includes spot fleet targets for Vault clusters.
We'll be updating our Consul backend bidding in another PR.

* Create a new `vault_cluster` module that handles installation,
  configuration, initializing, and unsealing Vault clusters.
* Create a `target_ec2_instances` module that can provision a group of
  instances on-demand.
* Create a `target_ec2_spot_fleet` module that can bid on a fleet of
  spot instances.
* Extend every Enos scenario to utilize the spot fleet target acquisition
  strategy and the `vault_cluster` module.
* Update our Enos CI modules to handle both the `aws-nuke` permissions
  and also the privileges to provision spot fleets.
* Only use us-east-1 and us-west-2 in our scenario matrices as costs are
  lower than us-west-1.

Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-04-13 15:44:43 -04:00
Kuba Wieczorek deb215a8e1
Stop running UI tests on every PR into a release branch in CI (#20149) 2023-04-13 18:10:17 +00:00
Bryce Kalow 9f9bceda88
remove check-legacy-links-format workflow (#20115) 2023-04-12 21:52:54 -04:00
Kuba Wieczorek 7e48d06e20
Add smaller runner groups for CI jobs (#20081) 2023-04-11 14:05:15 -04:00
Jaymala d414a703e4
Use absolute path for debug datadir (#20069)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-04-11 13:06:51 -04:00
Kuba Wieczorek af0adf85fa
Fix issues tripping the actionlint linter again (#20026) 2023-04-06 17:04:09 +00:00
Jaymala d0ac3d8fe2
[QT-488] Get artifact summary info along with product metadata (#19977)
* [QT-488] Get artifact summary info along with product metadata

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Fix GH Lint warnings

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

---------

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-04-05 13:49:46 -06:00
Marc Boudreau 209671c25e
add workflow_dispatch trigger to ci.yml workflow (#19979) 2023-04-05 10:03:08 -04:00
Kuba Wieczorek f7aacbe74a
Fix an issue tripping the actionlint linter in test-run-enos-scenario-matrix.yml (#19986) 2023-04-05 13:14:44 +00:00
Jordan Reimer 7fe9a2b328
Node Version CI Update (#19978)
* 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
2023-04-04 15:39:17 -06:00
Peter Wilson 4fc4516b49
Moved 'WaitForNodesExcludingSelectedStandbys' to shared testhelpers file (#19976) 2023-04-04 15:32:01 +01:00
Jordan Reimer 3f0620ce2c
Address Critical Vulnerabilities from Dependencies (#19901)
* cleans up dependencies with critical warnigns

* adds changelog entry

* updates dockerfiles and ci github workflow to use node 16

* removes ui gh workflow not being used
2023-04-03 15:24:38 -06:00
Kuba Wieczorek b86a09fb2a
Ensure tests-completed job fails if required jobs either fail or are cancelled (#19948)
Otherwise, the tests-completed job should succeed, including when the test-ui
job is skipped.
2023-04-03 15:16:42 -04:00
Marc Boudreau 1bcaa0c0d9
Add dependabot Configuration (#19792)
* add dependabot configuration

* Add missing newline at end of file

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>

---------

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-04-03 12:29:11 -04:00
Marc Boudreau 6e2f1cdcaf
fix inconsistencies in test-go.yml between OSS and ENT repositories (#19943) 2023-04-03 10:26:55 -04:00
Mike Baum 38101792cb
Download Application log files and upload as an artifact when enos scenarios fail (#19860) 2023-03-31 14:31:35 -04:00
Kuba Wieczorek 77105a27bd
Add DataDog test visibility to the test-go job in CI (#19890) 2023-03-31 18:15:57 +01:00
Jaymala 6a62e99fdd
[QT-488] Fix Enos testing workflow name (#19905)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-03-31 13:15:19 -04:00
Marc Boudreau 4528689486
use correct commit hash from latest branch of browser-actions/setup-chrome (#19876) 2023-03-31 12:17:16 -04:00
Jaymala 337adbb4c9
Add workflow summary to Enos tests (#19858)
* Add workflow summary to Enos tests

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Fix GHA lint errors for setup outputs

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

---------

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-03-31 09:21:08 -04:00
Kuba Wieczorek bbeb8b8a47
Update the if conditions for test-go jobs in CI (#19809)
* Update the if conditions for test-go jobs in CI

* Fix errors in comments

* Update the if condition for the UI tests
2023-03-30 16:27:42 -04:00
Kuba Wieczorek 818d89645b
Make the suffix for CI Go test matrix jobs optional (#19752) 2023-03-30 15:09:57 -04:00
Kuba Wieczorek 312b6d3c82
Update tests-completed job in CI to appear as success when one of the… (#19806)
* Update tests-completed job in CI to appear as success when one of the required checks is skipped (but not cancelled)

* Fix typo in tests-completed

---------

Co-authored-by: Marc Boudreau <marc.boudreau@hashicorp.com>
2023-03-30 14:24:05 -04:00
Kuba Wieczorek 71c54c909d
Add larger runners for CI (#19857) 2023-03-30 17:58:32 +01:00
Kuba Wieczorek 61254d9af8
Add a new category of runners to the CI workflow… (#19807)
* Add a new category of runners to the CI workflow; use new, dedicated runners on OSS; adjust runner sizes for jobs

Co-authored-by: Marc Boudreau <marc.boudreau@hashicorp.com>
2023-03-30 16:41:40 +01:00
Alexander Scheel 733e851c51
Remove acme from CI test_packages (#19841)
Of course, forgetting to add it, I forgot to remove it...

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-03-30 07:20:58 -04:00
claire labry 2531f721c7
fix github ref (#19805)
* fix github ref

* udpate comment
2023-03-28 15:59:27 -05:00
Alexander Scheel 27f670abd5
Tighten JWS algorithm lists (#19797)
* Add new PKI ACME subpackage to test_packages list

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

* Restrict JWS keys to specified algorithms

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-03-28 20:49:07 +00:00
akshya96 c3b1c3188c
Github Action to check deprecations in PR (#19666)
* deprecation check

* adding script

* add execute permission to script

* revert changes

* adding the script back

* added working script for local and GHA

* give execute permissions

* updating revgrep

* adding changes to script, tools

* run go mod tidy

* removing default ref

* make bootstrap

* adding to makefile
2023-03-27 22:50:58 -07:00
Marc Boudreau 27103f9908
Remove CircleCI Configuration (#19751)
* modify pre-commit hook to not look for circleci

* remove circleci configuration
2023-03-24 14:24:06 -04:00
Marc Boudreau c1a548d225
Marcboudreau/vault 13760/add test UI to completed (#19747)
* remove check of circleci configuration from pre-commit hook

* add dependency on test-ui for tests-completed job
2023-03-24 13:20:49 -04:00
Kuba Wieczorek 49fca89b1d
Add the FIPS testing job to GitHub Actions CI workflow (#19742) 2023-03-24 17:17:21 +00:00
Marc Boudreau 4749ef9e16
Create Job to Track All Required Test Jobs (#19743)
* add tests-completed job to track all matrix jobs completed successfully

* add dependency on setup job for tests-completed job
2023-03-24 10:39:17 -04:00
Ryan Cragun 62ed710318
ci: unpin terraform in CICD (#19665)
A prior planning bug was resolved in Terraform 1.4.2
2023-03-23 11:59:11 -06:00
Marc Boudreau 4ad111b3dd
Migrating CircleCI Jobs to GHA Workflow (#19662)
* address lint reports

* add diff-oss-ci and test-ui jobs to ci GHA workflow

* Add actions linter workflow

* Fix actions linter errors

* pin 3rd party components with SHA hash and limit actionlint workflow to pull requests touching paths under .github directory

* Fix actionlint runner

* pin SHA hash of 3rd party components
use .go-version file to provide go version to setup-go action
remove unncessary ref parameter in checkout action

---------

Co-authored-by: Brian Shore <bshore@hashicorp.com>
2023-03-22 15:02:06 -04:00
Raymond Ho 96e966e9ef
VAULT-13614 Support SCRAM-SHA-256 encrypted passwords for PostgreSQL (#19616) 2023-03-21 12:12:53 -07:00
Kuba Wieczorek 641f42f767
Add a GHA job running Go tests with race detection enabled to the CI … (#19561)
* Add a GHA job running Go tests with race detection enabled to the CI workflow

* Incorporate logic from test-go-race into the test-go testing matrix

* Make test-go testing matrix job names more meaningful

* Fix some a bug in script's logic

* Experiment: bump wait time in the failing TestLoginMFASinglePhase test to see if that makes a difference

* Lower the wait time in TestLoginMFASinglePhase

* Change the wait time in TestLoginMFASinglePhase to 15

* Add more detail to test-go testing matrix job names

* Test whether we already have access to larger runners

* Run Go tests with enabled data race detection from a separate job than the standard suite of tests

* Tweak runner sizes for OSS

* Try rebalancing test buckets

* Change instance type for larger ENT runners

* Undo rebalancing of test buckets as it changed nothing

* Change instance type for larger OSS runners

* Change the way we generate names for matrix jobs

* Consolidate the Go build tags variables, update them to use comma as a separator and fix the if statement in test-go

* Fix a typo
2023-03-21 14:13:40 -04:00
Marc Boudreau 00219b3917
comment out HCP_SCADA_ADDRESS environment variable (#19583) 2023-03-16 13:04:23 -04:00
Ryan Cragun cebde2f880
ci: pin terraform until planning bug is resolved (#19560)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-03-15 17:54:18 +00:00
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00
Marc Boudreau f286ee5b3c
Fix failing TestHCPLinkConnected Test (#19474)
* replace use of os.Unsetenv in test with t.Setenv and remove t.Parallel from test that rely on env being modified.

* experiment with using fromJSON function

* revert previous experiment

* including double quotes in the output value for the string ubuntu-latest

* use go run to launch gofumpt
2023-03-09 13:46:54 -05:00
Ashlee M Boyer b5eab9d3a0
Delete test-link-rewrites.yml (#19467) 2023-03-07 15:16:14 -08:00
Marc Boudreau 84238dee52
Introduce GitHub Actions CI Workflow (#19449)
* Migrate subset of CircleCI ci workflow to GitHub Actions

Runs test-go and test-go-remote-docker with a static splitting of test packages

* [skip actions] add comment to explain the purpose of test-generate-test-package-lists.sh and what to do if it fails

* change trigger to push

---------

Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-03-06 16:57:55 -05:00
Michael Anthony 074312dde2
Move env var declaration to called workflow (#19085) 2023-02-09 09:17:33 -07:00
miagilepner c49d180bc8
VAULT-13169 Require go docs for all new test functions (#18971)
* example for checking go doc tests

* add analyzer test and action

* get metadata step

* install revgrep

* fix for ci

* add revgrep to go.mod

* clarify how analysistest works
2023-02-07 10:41:04 +01:00
Mike Baum 225fbb78d2
[QT-304] Ensure Chrome is only installed for vault-enterprise UI Test workflows (#19003) 2023-02-06 16:29:33 -05:00
Mike Baum 3131c48501
[QT-304] Add enos ui scenario (#18518)
* Add enos ui scenario
* Add github action for running the UI scenario
2023-02-03 09:55:06 -05:00
Ryan Cragun 119e2274fc
[QT-470] Normalize and simplify container build workflows (#18900)
* [QT-470] Normalize and simplify container build workflows

Signed-off-by: Ryan Cragun <me@ryan.ec>
2023-01-30 15:01:51 -07:00
Ashlee M Boyer f3df55ad58
docs: Migrate link formats (#18696)
* Adding check-legacy-links-format workflow

* Adding test-link-rewrites workflow

* Updating docs-content-check-legacy-links-format hash

* Migrating links to new format

Co-authored-by: Kendall Strautman <kendallstrautman@gmail.com>
2023-01-25 16:12:15 -08:00
Michael Anthony 3762cfaf0a
Add workflow for running Docker-only acc tests (#18672)
* Add workflow for running Docker-only acc tests

* Convert to caller/called workflow

* Add comments for posterity and change run trigger

* Standardize workflow names and adjust artifact retention time

* Consolidate metadata job into test job

* Shorten artifact retention time

* Standardize filenames

* Correct workflow reference

* Remove erroneous dependency reference
2023-01-20 12:57:56 -07:00
Jaymala 9501b56ffa
Rename reusable enos-run workflow file (#18757)
* Rename reusable enos-run workflow file

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Update Enos README file

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2023-01-18 16:37:38 -07:00
Mike Baum da2849217c
[QT-441] Switch over to using new vault_ci AWS account for enos CI workflows (#18398) 2023-01-18 16:09:19 -05:00
Josh Brand c2ae1f1654
Add automated CI account cleanup & monitoring (#18659)
This uses aws-nuke and awslimitchecker to monitor the new vault CI account to clean up and prevent resource quota exhaustion.  AWS-nuke will scan all regions of the accounts for lingering resources enos/terraform didn't clean up, and if they don't match exclusion criteria, delete them every night.  By default, we exclude corp-sec created resources, our own CI resources, and when possible, anything created within the past 72 hours. Because this account is dedicated to CI, users should not expect resources to persist beyond this without additional configuration.
2023-01-11 17:24:08 -05:00
Jaymala 929391b09b
Save release testing metadata only when tests are run (#18540)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-12-23 14:06:42 -05:00
Jaymala e740844789
Persist metadata post release tests (#18531)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-12-22 22:20:05 +00:00
Luis (LT) Carbonell c1a4a1150f
Add GitHub action to check for a milestone (#18406)
* Add GitHub action to check for a milestone

* Update comment

* Cleanup

* Add config

* move config to own directory
2022-12-19 12:38:41 -06:00
Jaymala 360eaeb865
Fix the checkout sha for enos-run workflow (#18445)
- enos-run workflow will checkout the `main` branch by default, which would pass incorrect metadata to the workflow
so we use the `revision` passed by the calling workflow to checkout the sha and get the relavant metadata`

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-12-16 15:19:10 -05:00
Ryan Cragun ebbbcf7e5e
test: normalize job and steps between build and release test workflows (#18425)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2022-12-15 16:10:49 -07:00
Ryan Cragun 3051100e0a
test: pass build artifact name to release testing workflow (#18411)
Signed-off-by: Ryan Cragun <me@ryan.ec>
2022-12-15 11:47:14 -07:00
Sarah Thompson 8940880efd
Revert "Create test-reusable.yml" (#18371)
This reverts commit 131bf240293b0de1c22394b555b3e9878720738f.
2022-12-15 16:01:15 +00:00
Sarah Thompson 55b21f2012
Create test-reusable.yml 2022-12-14 15:27:56 +00:00
Ryan Cragun 0a884689a0
test: add build artifacts to release testing workflow (#18336)
Add build artifacts to release testing workflow

Signed-off-by: Ryan Cragun <me@ryan.ec>
2022-12-13 12:00:58 -07:00
Mike Baum 5b07829941
Fix role name in CI bootstrap workflow (#18330)
Fixed role name in ci bootstrap workflow
2022-12-13 09:20:49 -05:00
Ryan Cragun 0899c4153a
test: fix release testing workflows (#18322)
* Use the correct runner
* Fix indentation

Signed-off-by: Ryan Cragun <me@ryan.ec>
2022-12-12 16:07:16 -07:00
Ryan Cragun bd5d738ad7
[QT-436] Pseudo random artifact test scenarios (#18056)
Introducing a new approach to testing Vault artifacts before merge
and after merge/notorization/signing. Rather than run a few static
scenarios across the artifacts, we now have the ability to run a
pseudo random sample of scenarios across many different build artifacts.

We've added 20 possible scenarios for the AMD64 and ARM64 binary
bundles, which we've broken into five test groups. On any given push to
a pull request branch, we will now choose a random test group and
execute its corresponding scenarios against the resulting build
artifacts. This gives us greater test coverage but lets us split the
verification across many different pull requests.

The post-merge release testing pipeline behaves in a similar fashion,
however, the artifacts that we use for testing have been notarized and
signed prior to testing. We've also reduce the number of groups so that
we run more scenarios after merge to a release branch.

We intend to take what we've learned building this in Github Actions and
roll it into an easier to use feature that is native to Enos. Until then,
we'll have to manually add scenarios to each matrix file and manually
number the test group. It's important to note that Github requires every
matrix to include at least one vector, so every artifact that is being
tested must include a single scenario in order for all workflows to pass
and thus satisfy branch merge requirements.

* Add support for different artifact types to enos-run
* Add support for different runner type to enos-run
* Add arm64 scenarios to build matrix
* Expand build matrices to include different variants
* Update Consul versions in Enos scenarios and matrices
* Refactor enos-run environment
* Add minimum version filtering support to enos-run. This allows us to
  automatically exclude scenarios that require a more recent version of
  Vault
* Add maximum version filtering support to enos-run. This allows us to
  automatically exclude scenarios that require an older version of
  Vault
* Fix Node 12 deprecation warnings
* Rename enos-verify-stable to enos-release-testing-oss
* Convert artifactory matrix into enos-release-testing-oss matrices
* Add all Vault editions to Enos scenario matrices
* Fix verify version with complex Vault edition metadata
* Rename the crt-builder to ci-helper
* Add more version helpers to ci-helper and Makefile
* Update CODEOWNERS for quality team
* Add support for filtering matrices by group and version constraints
* Add support for pseudo random test scenario execution

Signed-off-by: Ryan Cragun <me@ryan.ec>
2022-12-12 13:46:04 -07:00
mcollao-hc 4245c6e51f
Update security-scan.yml 2022-12-06 10:13:57 -06:00
mcollao-hc 009af4458d
Update security-scan.yml 2022-12-06 09:34:06 -06:00
mcollao-hc cbc2ef31f8
Update security-scan.yml 2022-12-05 17:13:52 -06:00
mcollao-hc 571a61af01
Update security-scan.yml 2022-12-05 16:23:37 -06:00
mcollao-hc c660bbc03d
Update security-scan.yml 2022-12-05 16:00:36 -06:00
mcollao-hc a672ebb751
Delete codeql-analysis.yml 2022-12-05 14:28:07 -06:00
Mike Baum cdb6303c4d
[QT-318] Add workflow dispatch trigger for bootstrap workflow, update ssh key name (#18174)
* Added a workflow dispatch trigger for bootstrap workflow, updated ssh key name
* Ensure the bootstrap workflow is only run for PRs that change the bootstrapping code
2022-12-02 14:29:20 -05:00
mcollao-hc 495c503b11
Update security-scan.yml (#18180) 2022-12-01 13:05:21 -06:00
Mike Baum b03da5157e
[QT-318] Add Vault CI bootstrap scenarios (#17907) 2022-11-30 12:44:02 -05:00
mcollao-hc 4129f8a5d0
update semgrep exludes (#18090) 2022-11-22 16:19:35 -05:00
Ryan Cragun 275479cdd9
[QT-353] Use a different approach to branch restrictions (#17998)
Create a new workflow job that is only triggered when all build and
integration workflows have completed. This will allow us to require
branch restrictions on a single workflow.

Of note, we tried to allow docs branches to bypass testing using the
method suggested by Github[0], however, the `branches-ignore`
functionality did not work for the `pull_request` event type. Therefore,
bypassing build and integration workflows for docs branches is no longer
supported.

[0] https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

Signed-off-by: Ryan Cragun <me@ryan.ec>
2022-11-18 14:43:55 -07:00
mcollao-hc 35adc70f92
pin security-scanner workflow (#18048)
* pin security-scanner workflow

* updated to post-squash commit
2022-11-18 14:04:23 -06:00
mcollao-hc 5ec0d57313
PSP-256 - Add security-scanner tool (#17988)
Add security-scanner tool and github workflow
2022-11-17 17:12:03 -06:00
Rebecca Willett 46c0c6b1bb
Migrate package_manager smoke test to Enos scenario (#17653)
Integrate package testing to Enos scenarios as a matrix variant instead of a standalone scenario
2022-11-16 14:23:58 -05:00
Hamid Ghaf 13de7e9844
removing setup-go in build.yml as it is unnecessary (#17968) 2022-11-16 13:41:12 -05:00
Ryan Cragun 4c4798417f
[QT-358] Unify CRT and local builder workflows (#17766)
Here we make the following major changes:

* Centralize CRT builder logic into a script utility so that we can share the
  logic for building artifacts in CI or locally.
* Simplify the build workflow by calling a reusable workflow many times
  instead of repeating the contents.
* Create a workflow that validates whether or not the build workflow and all
  child workflows have succeeded to allow for merge protection.

Motivation

* We need branch requirements for the build workflow and all subsequent
  integration tests (QT-353)
* We need to ensure that the Enos local builder works (QT-558)
* Debugging build failures can be difficult because one has to hand craft the
  steps to recreate the build
* Merge conflicts between Vault OSS and Vault ENT build workflows are quite
  painful. As the build workflow must be the same file and name we'll reduce
  what is contained in each that is unique. Implementations of building
  will be unique per edition so we don't have to worry about conflict
  resolution.
* Since we're going to be touching the build workflow to do the first two
  items we might as well try and improve those other issues at the same time
  to reduce the overhead of backports and conflicts.

Considerations

* Build logic for Vault OSS and Vault ENT differs
* The Enos local builder was duplicating a lot of what we did in the CRT build
  workflow
* Version and other artifact metadata has been an issue before. Debugging it
  has been tedious and error prone.
* The build workflow is full of brittle copy and paste that is hard to
  understand, especially for all of the release editions in Vault Enterprise
* Branch check requirements for workflows are incredibly painful to use for
  workflows that are dynamic or change often. The required workflows have to be
  configured in Github settings by administrators. They would also prevent us
  from having simple docs PRs since required integration workflows always have
  to run to satisfy branch requirements.
* Doormat credentials requirements that are coming will require us to modify
  which event types trigger workflows. This changes those ahead of time since
  we're doing so much to build workflow. The only noticeable impact will be
  that the build workflow no longer runs on pushes to non-main or release
  branches. In order to test other branches it requires a workflow_dispatch
  from the Actions tab or a pull request.

Solutions

* Centralize the logic that determines build metadata and creates releasable
  Vault artifacts. Instead of cargo-culting logic multiple times in the build
  workflow and the Enos local modules, we now have a crt-builder script which
  determines build metadata and also handles building the UI, Vault, and the
  package bundle. There are make targets for all of the available sub-commands.
  Now what we use in the pipeline is the same thing as the local builder, and
  it can be executed locally by developers. The crt-builder script works in OSS
  and Enterprise so we will never have to deal with them being divergent or with
  special casing things in the build workflow.
* Refactor the bulk of the Vault building into a reusable workflow that we can
  call multiple times. This allows us to define Vault builds in a much simpler
  manner and makes resolving merge conflicts much easier.
* Rather than trying to maintain a list and manually configure the branch check
  requirements for build, we'll trigger a single workflow that uses the github
  event system to determine if the build workflow (all of the sub-workflows
  included) have passed. We'll then create branch restrictions on that single
  workflow down the line.

Signed-off-by: Ryan Cragun me@ryan.ec
2022-11-11 13:14:43 -07:00
Nick Cabatoff f1c92200b2
Reduce number of places where go version is set (#17762)
Reduce go version references to two: .go_version and @executors.yml.
2022-11-01 15:37:13 -04:00
Mike Baum a7020b3c19
[QT-182] Fix broken k8s workflow for vault-enterprise (#17629) 2022-10-20 16:58:09 -04:00
Jaymala cd5a93fc28
Enos verify stable needs Artifactory variables (#17618)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-10-20 13:35:11 -04:00
Michele Degges a9440d052c
[CI-only] Update RedHat registry tag (#17610)
* [CI-only] Update RedHat registry tag

There are a few changes being made to RedHat's registry on October 20, 2022 that affect the way images need to be tagged prior to being pushed to the registry. This PR changes the tag to conform to the new standard. 

We have other work queued up in crt-workflows-common and actions-docker-build to support the other required changes. 

This PR should be merged to `main` and all release branches on or after October 20, 2022, and MUST be merged before your next production release. Otherwise, the automation to push to the RedHat registry will not work.

----

A detailed list of changes shared from RedHat (as an FYI):

The following changes will occur for container certification projects that leverage the Red Hat hosted registry [[registry.connect.redhat.com](http://registry.connect.redhat.com/)] for image distribution:

- All currently published images are migrating to a NEW, Red Hat hosted quay registry. Partners do not have to do anything for this migration, and this will not impact customers. The registry will still utilize [registry.connect.redhat.com](http://registry.connect.redhat.com/) as the registry URL.

- The registry URL currently used to push, tag, and certify images, as well as the registry login key, will change. You can see these changes under the “Images” tab of the container certification project. You will now see a [quay.io](http://quay.io/) address and will no longer see [scan.connect.redhat.com](http://scan.connect.redhat.com/).

- Partners will have the opportunity to auto-publish images by selecting “Auto-publish” in the Settings tab of your certification project. This will automatically publish images that pass all certification tests.

- For new container image projects, partners will have the option to host within their own chosen image registry while using [registry.connect.redhat.com](http://registry.connect.redhat.com/) as a proxy address. This means the end user can authenticate to the Red Hat registry to pull a partner image without having to provide additional authentication to the partner’s registry.

* docker: update redhat_tag

Co-authored-by: Sam Salisbury <samsalisbury@gmail.com>
2022-10-20 10:32:06 -07:00
Heather Simon e658babb3c
Create remove-labels.yml (#17611) 2022-10-19 12:46:38 -07:00
Mike Baum b4da17a01c
Add an enos scenario to test vault docker images using k8s/kind/helm (#17515)
* Added a scenario to test docker artifacts using the vault helm chart and a kind cluster
* Addedt enos-k8s github workflow
2022-10-19 14:26:31 -04:00
Jaymala 0285dccfd1
Download Enos test artifact only for CRT runs (#17603)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-10-19 12:01:38 -04:00
Jaymala f7fcf0fa7f
Enos verify updates (#17586)
* Enos verify updates

- Update repo dispatch types
- Run Enos verify only on release branches

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Update as per review

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-10-18 15:14:18 -04:00
Jaymala 787e315004
Add Artifactory build to the matrix (#17353)
* Add Artifactory build to the matrix

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Update test scenarios

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Fix Terraform format

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Updates with verification

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Integrate variables from CRT inputs

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Latest update to add Artifactory support

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Address review feedback

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Enable Enos run in CRT workflow

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Remove unused variables

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Update Artifactory module

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Address review feedback

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-10-17 19:47:37 -04:00