Commit Graph

61 Commits

Author SHA1 Message Date
Jarek Kowalski
8a4ac4dec3 Upgraded linter to 1.43.0 (#1505)
* fixed new gocritic violations
* fixed new 'contextcheck' violations
* fixed 'gosec' warnings
* suppressed ireturn and varnamelen linters
* fixed tenv violations, enabled building robustness tests on arm64
* fixed remaining linux failures
* makefile: fixed 'lint-all' target when running on arm64
* linter: increase deadline
* disable nilnil linter - to be enabled in separate PR
2021-11-11 17:03:11 -08:00
Jarek Kowalski
ca4bf81b2f ci: dependency upgrades (#1504)
* ci: upgraded Node to 16.13.0 LTS

* ci: upgraded Hugo to 0.89.2
2021-11-09 05:50:48 -08:00
Jarek Kowalski
191a51b278 ui: fixed snapshotting UNC roots (#1401)
This was caused by additional resolution of path names only done in UI,
which caused \\hostname\share to be treated as relative and resolved
against the home directory.

Fixes #1385
Fixes #1362
2021-10-17 13:25:12 -07:00
Jarek Kowalski
928150fe6b linter: upgrade to 1.42.1 (#1292) 2021-09-14 19:11:39 -07:00
Jarek Kowalski
8b2b91f9f9 content: fixed repo upgrade version (#1286)
* content: fixed repo upgrade version

Previously upgrade would enable epoch manager and index v2 but would
not set the version of the format itself. Everything worked fine
but it would not protect from old kopia opening the repository.

* ci: added compatibility test that uses real 0.8 and current binaries
2021-09-10 22:51:51 -07:00
Jarek Kowalski
7e68d8e4c1 Consolidated format version flags (#1284) 2021-09-08 18:44:03 -07:00
Jarek Kowalski
59b5a44ca6 Makefile: refactored build tools installation (#1274)
Instead of using hardcore Makefile scripts and external tools, created a
specialized Go tool that combines curl, sha256sum, gunzip, tar, unzip
and automatically figures out the correct URL to download based on
the current GOOS/GOARCH combination.
2021-09-01 20:50:14 -07:00
Jarek Kowalski
9e182f131a linter: upgraded to 1.42.0 (#1246) 2021-08-20 18:26:45 -07:00
Jarek Kowalski
42e5661bf4 ci: added license check using github.com/frapposelli/wwhrd (#1200)
* ci: added license check using github.com/frapposelli/wwhrd

* ci: also check NPM licenses

* readme: removed FOSSA badge

* Makefile: install NPM dependencies before license check
2021-07-17 09:58:25 -07:00
Jarek Kowalski
f702e65a31 deps: removed dependency on github.com/minio/minio/pkg, replaced with command line tool (#1185) 2021-07-10 10:15:31 -07:00
Jarek Kowalski
61af6399c8 cli: fixed profiling flags (#1181) 2021-07-09 21:35:00 -07:00
Jarek Kowalski
9e059a1277 upgraded linter to 1.41.0 (#1144) 2021-06-16 19:44:55 -07:00
Jarek Kowalski
30ca3e2e6c Upgraded linter to 1.40.1 (#1072)
* tools: upgraded linter to 1.40.1

* lint: fixed nolintlint vionlations

* lint: disabled tagliatele linter

* lint: fixed remaining warnings
2021-05-15 12:12:34 -07:00
Denis Fondras
3f29141c33 User must install npm manually on OpenBSD (#995)
* user must install npm manually with OpenBSD

* simplify and add freebsd rules
2021-04-20 19:51:29 -07:00
Jarek Kowalski
922bc7cbc8 ci: refactored credentials handling (#987)
This strengthens credential handling after our signing keys may have
been leaked in the [codecov.io breach](https://about.codecov.io/security-update/)

* pass only minimal credentials to each build step to avoid
  exposing sensitive tokens to tools that don't need them
  (like code coverage)
* removed encrypted credential files and replaced with environment-based
* allow full ci/cd including publishing artifacts from forks
* regenerated all passwords, tokens and service accounts
* do not install Google Cloud SDK on GHA - it's already there
* moved RPM signing to 'Stage And Publish Artifacts' phase
* generated new GPG signing key

See https://kopia.discourse.group/t/important-impact-of-codecov-io-security-issue-on-kopia-build-pipeline/377
2021-04-16 08:17:13 -07:00
Jarek Kowalski
76ce309589 site: upgraded hugo to 0.82.0 (#938) 2021-04-03 23:11:56 -07:00
Jarek Kowalski
16282b5b61 Makefile refactoring + publish scoop package (#907)
* Makefile: refactoring

- added signing of windows exe in a zip package
- removed Windows build from goreleaser
- removed homebrew from goreleaser
- enabled incremental builds

* ci: publish scoop package
2021-03-22 22:39:24 -07:00
Jarek Kowalski
335ff79e78 CI refactoring (#903)
* ci: publish additional binaries as artifacts

* ci: install {htmlui,app}/node_modules as part of ci-setup

* ci: added retry to improve robustness of builds

* ci: continue-on-error for non-pull-requests

* ci: moved publish-packages to Stage And Publish Artifacts phase
2021-03-21 15:17:39 -07:00
Jarek Kowalski
342919892e ci: install signing tools just before building the binary with UI 2021-03-20 12:09:57 -07:00
Jarek Kowalski
36c65855ee ci: prevent locking macos keychain if the build takes more than 5 minutes 2021-03-14 13:42:59 -07:00
Jarek Kowalski
b421af9b46 one more attempt at fixing macOS signing hangs 2021-03-10 23:45:12 -08:00
Jarek Kowalski
3c696c4f03 one more attempt at fixing macOS signing hangs 2021-03-10 23:25:01 -08:00
Jarek Kowalski
01ee5980db Makefile: set default-keychain when signing macOS binaries 2021-03-10 20:34:28 -08:00
Jarek Kowalski
5928df3498 Makefile: build fat macOS binary (amd64 and arm64) (#866)
This will be embedded in KopiaUI which is built on macOS runner.
2021-03-04 19:35:26 -08:00
Jarek Kowalski
01cd9ba134 Makefile: run goreleaser only on linux/amd64 in non-PR mode (#861) 2021-03-02 08:29:37 -08:00
Jarek Kowalski
8d43715acf ci: upgrade goreleaser to 0.158.0 2021-03-01 18:03:34 -08:00
Jarek Kowalski
ff158ea763 goreleaser: updated to 0.157.0 to produce darwin/arm64 build (#855) 2021-02-27 12:10:20 -08:00
Julio López
7bafe51dcc Replace go-bindata with //go:embed (#844)
* Replace htmlui_fallback.go with go:embed
* Replace go-bindata generated UI with go:embed
* Update site Go version to 1.16
* Update BUILD.md to reflect workflow with go:embed
2021-02-23 01:09:40 -08:00
Jarek Kowalski
e2b9a81ac3 Major CI/CD refactoring and re-added support for ARM/ARM64 runners (#849)
* ci: refactored CI/CD logic & Makefile

- removed all travis CI emulation environment variables and replaced with:

CI_TAG=<empty>|tag
IS_PULL_REQUEST=false|true

- refactored all OS and architecture-specific decisions to use around standard GOOS/GOARCH values instead of uname/OS
- re-added self-hosted runner for ARMHF (3 replicas)
- added brand new self-hosted runner for ARM64 (3 replicas)
- disabled attempts to publish and sign on forks
- improved integration test log output to better see timings and sub-tests
- print longest tests (unit tests and integration) after each run
- verified that all configurations build successfully on a clone (jkowalski/kopia)
- run make setup in parallel

* testing: fixed tests on ARM and ARM64

- fixed ARM-specific alignment issue
- cleaned up test logging
- fixed huge params warning threshold because it was tripping on ARM.
- reduced test complexity to make them fit in 15 minutes
2021-02-23 00:52:54 -08:00
Jarek Kowalski
d9b58fb6e2 linter: upgraded to 1.37.1 (#846) 2021-02-20 11:34:14 -08:00
Jarek Kowalski
4bf42e337d fix long filenames on Windows (#822)
* windows: fixed handling of long filenames
2021-02-12 09:09:42 -08:00
Jarek Kowalski
2a58166c43 lint: upgraded to 1.36 which fixes flakes (#801)
* lint: upgraded to 1.36 which fixes flakes

* ci: removed separate lint action - normal lint is fast enough and less flaky

* ci: also deleted linter_version_test.go
2021-01-26 19:24:30 -08:00
Jarek Kowalski
c3e6aebfb6 rclone: provider improvements (#795)
switched local passwd hash to APR1 to support older rclones
install well-known version of rclone for testing
2021-01-25 14:53:55 -08:00
Jarek Kowalski
6a63c207a4 Upgraded Node and all NPM dependencies to latest versions (#793)
* htmlui: upgraded all NPM dependencies to latest versions

* app: upgraded all NPM dependencies to latest versions

* tools: upgraded node to 14.15.4 LTS

* app: fixed deprecated methods
2021-01-23 18:40:50 -08:00
Jarek Kowalski
1f3b8d4da4 upgrade linter to 1.35 (#786)
* lint: added test that enforces Makefile and GH action linter versions are in sync
* workaround for linter gomnd problem - https://github.com/golangci/golangci-lint/issues/1653
2021-01-16 18:21:16 -08:00
Jarek Kowalski
2541f0013c ci: GitHub actions support (#739)
This mimics Travis behavior and also allows making full local release
from a GH owner other than 'kopia' as long as required secrets are
provided.

Supports:

- basic testing on PRs
- publishing kopia RPM, DEB and TAR.GZ release to <owner>/kopia
  (on tags)
- publishing KopiaUI release to <owner>/kopia (on tags)
  or <owner>/kopia-ui-release (on master)
- publishing RPM and APT packages from official kopia/kopia and
  master branch only

Verified on jkowalski/kopia clone:

Tags:
https://github.com/jkowalski/kopia/actions/runs/439735808
https://github.com/jkowalski/kopia/releases/tag/v0.8.0-testing4

Post-submit:
https://github.com/jkowalski/kopia/actions/runs/439720039
https://github.com/jkowalski/kopia-ui-release/releases/tag/v20201222.0.225118

* ci: remove .travis.yml
* testing: skip tests if environment values are empty
* ci: run heavyweight tests on amd64 only
* ci: remove .appveyor.yml
* makefile: removed appveyor travis emulation
2020-12-24 01:11:57 -08:00
Jarek Kowalski
e03971fc59 Upgraded linter to v1.33.0 (#734)
* linter: upgraded to 1.33, disabled some linters

* lint: fixed 'errorlint' errors

This ensures that all error comparisons use errors.Is() or errors.As().
We will be wrapping more errors going forward so it's important that
error checks are not strict everywhere.

Verified that there are no exceptions for errorlint linter which
guarantees that.

* lint: fixed or suppressed wrapcheck errors

* lint: nolintlint and misc cleanups

Co-authored-by: Julio López <julio+gh@kasten.io>
2020-12-21 22:39:22 -08:00
Jarek Kowalski
213a557435 ci: run make on GitHub actions (#736) 2020-12-21 17:15:46 -08:00
Jarek Kowalski
a01bfde39a Makefile: plug in gotestsum for better test output (#652) 2020-09-29 21:14:20 -07:00
Jarek Kowalski
6915e032b3 goreleaser: tweaks to support APT repositories
* build 32-bit arm DEB and RPM with armhf suffix
* change output files to use kopia version instead of TAG-next for snapshots
2020-08-14 14:08:10 -07:00
Jarek Kowalski
9a6dea898b Linter upgrade to v1.30.0 (#526)
* fixed godot linter errors
* reformatted source with gofumpt
* disabled some linters
* fixed nolintlint warnings
* fixed gci warnings
* lint: fixed 'nestif' warnings
* lint: fixed 'exhaustive' warnings
* lint: fixed 'gocritic' warnings
* lint: fixed 'noctx' warnings
* lint: fixed 'wsl' warnings
* lint: fixed 'goerr113' warnings
* lint: fixed 'gosec' warnings
* lint: upgraded linter to 1.30.0
* lint: more 'exhaustive' warnings

Co-authored-by: Nick <nick@kasten.io>
2020-08-12 19:28:53 -07:00
Jarek Kowalski
04254b68db Upgrade build-time dependencies (#510)
* goreleaser: upgraded to v1.140.1
* site: upgrade to latest Hugo, fixed deprecation warnings
* app: upgraded NPM dependencies to latest version to address some low-severity vulnerabilities
2020-08-04 15:54:05 -07:00
Jarek Kowalski
40acf238f3 Fixed arm and arm64 build. (#506)
* fixed a number of cases where misaligned data was causing panics on armv7 (but not armv8)
* travis: enable arm64
* test: reduce compressed data sizes when running on arm
* arm: wait longer for snapshots
2020-07-30 17:31:28 -07:00
Jarek Kowalski
cfa30f2e45 switched back to using v-prefixed tag names.
KOPIA_VERSION will now always be v-prefixed and we will strip the
prefix before embedding it in KopiaUI manifest.

Also upgraded Node and app NPM dependencies to latest versions.
2020-07-25 17:22:35 -07:00
Jarek Kowalski
993c3bfb3e linter: fixed how linter is installed on Darwin and Linux since it was getting wrong version 2020-05-11 23:58:41 -07:00
Jarek Kowalski
2055fe3cca Makefile: support Windows Appveyor environment (#407)
* Makefile: support Windows Appveyor environment

* appveyor: added .appveyor.yml

* travis: disable windows environment

* Makefile: do not run vet-time-inject on Windows

* Makefile: removed the use of backtick invocation of subshell which does not work on windows

* Makefile: make integration-tests work on Windows outside of Travis
2020-04-03 23:03:42 -07:00
Jarek Kowalski
16275a15b7 Makefile: changed how build number is calculated
Instead of taking timestamp + TRAVIS_BUILD_NUMBER at build time,
we take the time of the commit, to be deterministic. This requires
a little bit of makefile magic to strip leading zeroes to make the
version number that's semver compliant.

This will allow coordinating the build between different CI tools,
so that Windows can be built on AppVeyor and macOS/Linux on Travis CI.
2020-04-02 22:05:37 -07:00
Jarek Kowalski
6ad927384b travis: setup tools to support signing Windows binaries 2020-03-31 19:41:55 -07:00
badrelmers
e86e8970a1 fix makefile for windows (#377)
solve https://github.com/kopia/kopia/issues/375
2020-03-21 18:59:50 -07:00
Jarek Kowalski
272b657508 upgrade all dependencies to latest versions 2020-03-15 23:40:58 -07:00