Commit Graph

26 Commits

Author SHA1 Message Date
Aaron Prindle d2c8b26247
fix: remove log line from listpullreqs.go and additional release.sh fixes (#2790) 2023-10-17 19:28:15 -07:00
Aaron Prindle c8c839a527
feat: add automated way of cutting releases w/ generation of CHANGELOG.md & Makefile changes (#2786) 2023-10-10 07:47:31 -07:00
Aaron Prindle 8c09efff4c
fix: make it so release.sh script doesn't output duplicate change PRs (#2735) 2023-09-20 10:56:00 -07:00
Andreas Fleig 7cd39d14e3
hack/boilerplate.sh: fix error handling and use python3 (#2587)
* hack/boilerplate.sh: fix successful return code when call to python fails

* hack/boilerplate.sh: update to python3

python2 is no longer included in most distros and will be removed from
Github Actions Ubuntu images:
https://github.com/actions/runner-images/issues/7402
2023-06-20 10:46:30 -07:00
Andreas Fleig cb242ae89c
hack/install_golint.sh: allow installation on linux/arm64 (#2585) 2023-06-20 10:43:13 -07:00
Mark Moretto 0f40a810d1
Light editing to scripts in hack/gofmt (#2236)
* Update gofmt.sh

Removed duplicate shebang interpreter directive: `#!/bin/bash`

* Update boilerplate.sh

Removed duplicate shebang interpreter directive.
2023-05-19 16:58:02 -07:00
Joël Pepper 14ea7c4071
Fix Integration tests (#2425)
* fix(ci): Bump golangci-lint to 1.51.1

* chore(lint): fix gofmt and goimport issues

* chore(lint): fix linter issues

- Adapted error comparison according to linter recommendation
- Disabled noctx linting for http request where canceling makes no sense
- Disabled nilerror linting where nil error is returned on purpose
- Disabled makezero linter where slice is explicitly deepcopied

* chore(ci): Update go version in tests workflows

* fix(ci): Allow boilerplate years from 2000-2099

Previously the regex only allowed the copyright notice to contain the
years 2018,2019,2020,2021, or 2022. This commit widens to regex to
20\d\d allowing any year in the range [2000-2099]

* feat(ci): Replace minikube with k3s for intregration tests

The existing setup for minikube is very complicated, replicating most of
the setup steps for a full kubernetes cluster in an only partially
supported minikube configuration (driver=none). Furthermore the existing
setup has been broken for sometime, likely, at least in part due to the
changes to CNI and CRI in recent kubernetes versions.

Since what we actually need is only a running Kubernetes cluster on the
node and access to a registry on localhost:5000, we can switch the
extremely complicated minikube setup for a lightweight cluster using
k3s. Minikube came with a default addon for running a registry on every
node, but the same is not the case for k3s, instead we make use of the
package helm controller and its HelmChart CR to deploy twuni/docker-registry.helm
and expose it on localhost using the integrated LoadBalancer controller.

* fix(test-684): pin base container version

The dockerfile for the regression test connected to issue 684 used a
rolling tag as base image, making it flaky and fail since it was
introduced.

This commit pins the base image to the digest of bionic-20200219, which,
based on the date of the commit that introduced to the dockerfile would
be the most newest ubuntu build and likely what the "rolling" tag
resolved to back then. Since this also an image from the pre-oci days of
ubuntu, this circumvents a bug in container-diff as well
(https://github.com/GoogleContainerTools/container-diff/issues/389)
2023-03-21 12:30:54 -04:00
Gabriel Nützi 323e616a67
fix: Refactor `LayersMap` to correct old strange code behavior (#2066)
* fix: Correct flatten function in layers

- Added a test.
- Cache current image, track deletes in `whiteouts` as well as normal adds in `layers`.
- Fix ugly delete behavior of `layerHashCache`.
  Delete it when crerating a new snapshot.
- Slight cleanup in `snapshot.go`.
- Format ugly `WalkFS` function.

* fix: Add symbolic link changes  to Hasher and CacheHasher

* fix: Better log messages

* fix(ci): Integration tests

* fix(ci): Add `--no-cache` to docker builds

* fix(ci): Pass credentials for error integration test

* np: Missing .gitignore in `hack`

* np: Capitalize every log message

- Correct some linting.

* fix: Key function

- Merge only last layer onto `currentImage`.

* fix: Remove old obsolete `cacheHasher`
2022-05-17 20:30:58 -04:00
Jason Hall a7425d1fd0
Remove k8schain, statically link helpers (#1891) 2022-01-21 12:42:12 -08:00
wwade 82fc94d930
git: accept explicit commit hash for git context (#1765)
* git: accept explicit commit hash for git context

When checking out code from non-github repositories, the typical
assumptions may not be valid, e.g. that the only interesting
non-branch commits have ref names starting with refs/pull. A specific
example is fetching an un-merged commit from a gerrit repository by
commit hash.

This change just looks at the second part of the git context path and
checks if it's a SHA commit hash, and if so, will fetch and check out
this commit after cloning the repository.

Sample context argument:

    https://github.repo/project#e1772f228e06d15facdf175e5385e265b57068c0

* ci: fix test script to recognize any non-zero exit as an error

hack/linter.sh didn't properly install golangci-lint in hack/bin as I
already have another version of golangci-lint on my PATH, but then it
failed to execute because it was looking for it specifically in
hack/bin.

When the executable is not found, the exit code is 127 instead of 1,
and so test.sh ignored the error.

Two fixes:

1. `test.sh`:
  - Use `if (script) ...` instead of assigning / checking a result
    variable to determine if each validation script passed or failed.

2. `hack/linter.sh`:
  - Instead of checking for golangci-lint on the path, just
    specifically check for an executable file (`test -x`) in the
    expected location.

Co-authored-by: Wade Carpenter <wwade@users.noreply.github.com>
2021-10-19 19:27:15 -07:00
Tejal Desai cf4822c31c
Run docker_credentials_gcr in warmer (#1780)
* run docker_credentials_gcr in warmer

* fix tests

* fix dockerfiles

* fix boilerplate

* mend

* fix

* another lint
2021-10-19 12:25:42 -07:00
Tejal Desai badd66506d
Add s390x support to docker images (#1769)
1. add s390x support to docker images `executor`, `executor(slim)`,
   `executor(debug)` and `warmer`. Fixes #1462 and #1665.

2. Address the building issue of dependency `docker-credential-gcr`
   in Dockerfiles. This issue was introduced when recent commits
   in `docker-credential-gcr` removed the Makefile.

Signed-off-by: Kun-Lu <kun.lu@ibm.com>

Co-authored-by: Kun-Lu <kun.lu@ibm.com>
2021-10-19 00:01:47 -07:00
Tejal Desai 1da17b6e9b
chore: add workflows for pr tests (#1766)
* chore: add workflows for pr tests

* fix unit tests

* fix formatting

* chore: fix gobuild

* change minikube script

* chore: fix lint install script

* chore: ignore and fix tests

* fix lint and run gofmt

* lint fixes

* k8s executor image only

* fix Makefile

* fix travis env variables

* more info on k8s tests

* fix travis run

* fix

* fix

* fix

* fix log

* some more changes

* increase timeout

* delete travis.yml and fix multiple copy tests

* fix registry mirror

* fix lint

* add concurency

* last attemot to fix k8 integrations

* diff id for diff workflows
2021-10-18 23:22:44 -07:00
bahetiamit 6cffb679aa
Adding multiarch image support (#1474) 2020-12-21 10:11:13 -08:00
Ben Einaudi 8b8be5c418 Migrate to golang 1.14
* Upgrade go.mod file

* Upgrade travis file

* Run rm -rf vendor && go mod tidy && go mod vendor to upgrade vendor/modules.txt according to golang 1.14

* Upgrade golangci-lint version
2020-03-15 10:20:43 +01:00
Cole Wippern 72cc1f0bfa fix #948 update license years 2020-01-03 13:02:05 -08:00
Cole Wippern 8ef2efec7d update golangci-linter to v1.21.0 2019-12-21 12:18:09 -08:00
Tejal Desai 5a2cfeabba remove dep.sh 2019-12-21 12:18:09 -08:00
Cole Wippern 6734a9714d add golangci.yaml file matching current config 2019-11-28 10:08:48 -08:00
Priya Wadhwa ae81657484 Release v0.4.0
Copied over the release script from skaffold to get all new PRs that
have been merged for the CHANGELOG.

Ran dep ensure.
2018-10-01 14:52:16 -07:00
Priya Wadhwa 99ab68e7f4 Replace gometalinter with GolangCI-Lint
gometalinter is broken @ HEAD, and I looked into why that was. During
that process, I remembered that we took the linting scripts from
skaffold, and found that in skaffold gometalinter was replaced with
GolangCI-Lint:

https://github.com/GoogleContainerTools/skaffold/pull/619

The change made linting in skaffold faster, so I figured instead of
fixing gometalinter it made more sense to remove it and replace it with
GolangCI-Lint for kaniko as well.
2018-09-11 13:30:42 -07:00
Nick Kubala e59f05e32f
fix deps 2018-08-01 13:02:54 -07:00
Matt Rickard cff201dee6 org rename from GoogleCloudPlatform to GoogleContainerTools 2018-04-17 11:45:39 -07:00
Priya Wadhwa ec510a161b
change imports from k8s-container-builder to kaniko 2018-04-12 15:35:54 -07:00
Matt Rickard a5b826d8f0 hack: check dep against correct upstream 2018-03-06 16:21:10 -08:00
priyawadhwa d3e526761f Initial skeleton for executor (#22)
* Moving over kbuild executable code and adding unit tests

* Moved most file over into this repo

* delete non go files from vendor

WIP

WIP

* Removed unnecessary vendor files

* Added makefile, travis yaml, boilerplate stuff

Added .gitignore

Update vendor

Fixed linting errors

Reorganized pkg

Fixed travis

* Moved image source into separate package

* Removed vendor and logic

* Initial skeleton
2018-02-20 19:05:54 -08:00