Commit Graph

13 Commits

Author SHA1 Message Date
Alejandro Pedraza 59eca5bb82
Use full-length actions SHAs in CI (#5668)
Github now requires that actions pined to a SHA use the full-length SHA,
otherwise CI throws a warning like:
```
actions/checkout@722adc6 looks like the shortened version of a commit
SHA. Referencing actions by the short SHA will be disabled soon. Please
see
https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions.
```
2021-02-04 16:51:53 -05:00
Oliver Gould 440a201997
actions: Limit job runtime to <= 30 minutes (#5216)
The default job timeout is 6 hours! This allows runaway builds to
consume our actions resources unnecessarily.

This change limits integration test jobs to 30 minutes. Static checks
are limited to 10 minutes.
2020-11-12 08:30:02 -08:00
Tarun Pothulapati c4f8ba270d
Generate Identity certs with alternate domain names (#4920)
Updating only the go 1.15 version, makes the upgrades fail from older versions,
as the identity certs do not have that setting and go 1.15 expects them. 
This PR upgrades the cert generation code to have that field, 
allowing us to move to go 1.15 in later versions of Linkerd.
2020-09-03 22:33:10 +05:30
Tharun Rajendran 8a2cb12656
Fix js unit test dependency on ci (#4896)
unit tests in ci are runned using yarn install.
So, there will be some update to the dependencies.
This is fixed by passing --frozen-lockfile in ci workflow
Fixes #3838

Signed-off-by: Tharun <rajendrantharun@live.com>
2020-08-24 14:21:41 -07:00
Alejandro Pedraza ac2bfb387b
Remove no longer needed GITCOOKIE_SH in CI (#4881)
Removed usage of `GITCOOKIE_SH`, which was a script stored in a secret
to authenticate requests against googlesource.com, to avoid hitting
rate limits when pulling go dependencies from that source. Now that we
use go modules, deps are pulled from http://proxy.golang.org/ and this
is no longer needed.
2020-08-17 12:36:07 -07:00
Alejandro Pedraza d842a97cb2
Update CI and docs to reference `main` branch (#4662)
Files changed:

```
.github/PULL_REQUEST_TEMPLATE.md
.github/workflows/cloud_integration.yml
.github/workflows/kind_integration.yml
.github/workflows/release.yml
.github/workflows/static_checks.yml
.github/workflows/unit_tests.yml
BUILD.md
CONTRIBUTING.md
bin/test-scale
bin/win/linkerd.nuspec
```
2020-06-24 12:39:22 -07:00
Alejandro Pedraza a35ad28e14
Use gotestsum in CI unit test workflow (#4342)
Use [gotestsum](https://github.com/gotestyourself/gotestsum) for running
unit tests in CI, so we get a summary result at the end, instead of having to
scroll up to find failures.

Doesn't apply for integration tests, as only failures are shown there,
and they're easily visible.
2020-05-07 08:56:58 -05:00
Alejandro Pedraza 66ec92aa09
Additional Jest reporter for GH Annotations (#4294)
Second part of #4176

Added extra Jest reporter when running js tests from CI, which will send
to stdout a GH annotation for each test failure, something like:

```
::error file=/home/alpeb/src/forks/linkerd2/web/app/js/components/Navigation.test.jsx::Navigation › checks state when versions do not match
```

See the [health
metrics RFC](https://github.com/linkerd/rfc/blob/master/design/0002-ci-health-metrics.md) for more context.
2020-04-28 13:10:27 -05:00
Thomas Rampelberg 426d558f43
Fix security issues by bumping all dependencies (#4284)
* Fix security issues by bumping all dependencies.

* Bump node version to latest
2020-04-23 10:31:55 -07:00
Alejandro Pedraza a65f76ed22
Use SHAs instead of tags when referring to GH Actions libs (#4114)
When adding an action we can quickly vet it and fix it to a sha. Whereas
if we use a tag, the 3rd party can change the code and retag it without us noticing
2020-03-02 15:03:24 -05:00
Alejandro Pedraza 2ad141d27a
Exclude changes on markup files to trigger CI runs in master (#4084)
Fixes #4082

This tested fine in a fork, under various scenarios combining:
- Modify markup file in root dir
- Modify markup file in subdir
- Modify non-markup file
- In master
- In a PR
2020-02-24 13:50:35 -05:00
Kevin Leimkuhler ab4a13ab52
Add minimal release workflow (#4090)
## Motivation

A release workflow will be the only triggered workflow on `push.tags` events.

As a first step in automating the release process, it should assert that
integration tests pass once the docker images have been tagged.

Both KinD and cloud integration tests should run since they have different
sets of integration tests that they are responsible for running.

It then needs to run the `chart_deploy` job.

## Testing

This has been fully tested with a release tag push on my fork. The run can be
found [here](https://github.com/kleimkuhler/linkerd2/actions/runs/42664128)

It properly failed on `chart_deploy` because I did not want to push a test tag
helm chart.

## Solution

This workflow will:

- Build the docker images on the Packet Host
- Tag the docker images with the release tag
- Run KinD integration tests
- Run cloud integration tests
- Run `chart_deploy`

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2020-02-22 17:13:48 -08:00
Kevin Leimkuhler c31284e6db
Separate single Actions workflow into multiple workflows (#4039)
Depends on #4033

## Motivation

If any job fails in the current GH Actions workflow, a re-run on the same
commit SHA requires re-running *all* jobs--regardless if the job already
passed in the previous run.

This can be problematic when dealing with flakiness in the integration tests.

If a test fails due to flakiness in `cloud_integration_tests`, all the unit
tests, static checks, and `kind_integration_tests` are re-run which leads to
lots of waiting and dealing with the possibility of flakiness in earlier jobs.

With this change, individual workflows can now be re-run without triggering
all other jobs to complete again first.

## Solution

`workflow.yml` is now split into:
- `static_checks.yml`
- `unit_tests.yml`
- `kind_integration.yml`
- `cloud_integration.yml`

### Workflows

`statc_checks.yml` performs checks related to dependencies, linting, and
formatting.

`unit_tests.yml` performs the Go and JS unit tests.

`kind_integration.yml` builds the images (on Packet or the GH Action VM) and
runs the integration tests on a KinD cluster. This workflow continues to run
for **all** PRs and pushes to `master` and tags.

`cloud_integration.yml` builds the images only on Packet. This is because
forked repositories do not need to trigger this workflow. It then creates a
unique GKE cluster and runs the integration tests on the cluster.

### The actual flow of work..

A forked repository or non-forked repository opening a PR triggers:
- `static_checks`
- `unit_tests`
- `kind_integration_tests`

These workflows all run in parallel and are invidivually re-runnable.

A push to `master` or tags triggers:
- `static_checks`
- `unit_tests`
- `kind_integration_tests`
- `cloud_integration_tests`

These workflows also all run in parallel, including the `docker_build` step of
both integration test workflows. This has not conflicted in testing as it
takes place on the same Packet host and just utilizes docker layer caching
well.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2020-02-13 09:11:30 -08:00