aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/check_dockerfiles.sh (follow)
Commit message (Collapse)AuthorAgeLines
* Migrate build pipeline to Github ActionsGravatar Sebastiaan Zeeff2020-11-18-127/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've migrated the build pipeline to GitHub Actions and changed the container registry to GitHub Container Registry. In the process, I've made some changes to our docker setup and caching: - We are now using a single multi-stage Dockerfile Instead of three separate dockerfiles, we are now using a single multi-stage Dockerfile that can be used to build the three images we want using build targets. In part, this is because we're now using the docker buildx build action currently recommended by docker. This new engine runs in a sandboxed mode, meaning that while it can export built images to `docker` running in the host, it cannot import local images from it to base builds on. - Docker builds are now cached within GitHub Actions The builds are now cached using the GitHub Actions cache of the build cache directory. The cache keys try to match a cache generated by a build that matches the current build as closely as possible. In case of a cache miss, we fall back to caching from the latest image pushed to the container repository. - The `base` and `venv` images now have an inline cache manifest In order to fall back intelligently to caching from the repository, the final build and push action for the `base` and `venv` images includes an "inline" cache manifest. This means that the build process can inspect, without pulling, if it makes sense to pull layers to speed up the build. The other options, pushing a cache manifest separately (not inline), is currently not supported by GHCR. The custom caching script has been removed. - Linting errors are now added as GitHub Actions annotations Just like for some of our other pipelines, linting now generates annotations if linting errors are observed. - Coverage is pushed to coveralls.io A coverage summary is now pushed to coveralls.io. Each CI run will get a unique job that's linked in the CI output. If the run is attached to a PR, coveralls.io will automatically add a check link with the coverage result to the PR as well. - The README.md, Pipfile, docker-compose, and scripts have been updated As we now need to pull from and link to the GHCR, I've updated the other files to reflect these changes, including Pipfile run commands. I've also changed the CI badge and added a coveralls.io badge.
* CI: fix can_pull causing script to exit with code 1Gravatar MarkKoz2020-02-23-2/+2
| | | | | | | | Error handling is performed inside can_pull so the callers of the function don't always check its exit code. Because set -e present, if can_pull returns 1, bash would consider that function a failed call and thus exit the entire script with code 1. That, in turn, would cause the CI job to fail.
* CI: log when the build cache is usedGravatar MarkKoz2020-02-22-0/+1
|
* CI: fix unbound variable error when checking cacheGravatar MarkKoz2020-02-22-1/+1
| | | | The array shouldn't be expanded when testing with -v.
* CI: cache the response from Azure APIGravatar MarkKoz2020-02-22-0/+11
| | | | | | The script may need to use the master commit several times. The easiest way to implement the cache was to just cache the response rather than the commit hash.
* CI: check if venv image can be pulledGravatar MarkKoz2020-02-21-0/+6
|
* CI: create a function to check if an image can be pulledGravatar MarkKoz2020-02-21-13/+26
|
* CI: don't use output variablesGravatar MarkKoz2020-02-21-3/+3
| | | | | | It was initially used to enable access to variables across jobs, but the jobs will eventually be consolidated into one so output variables will no longer be needed.
* CI: diff base against master only if venv changedGravatar MarkKoz2020-02-21-16/+14
|
* CI: update agent to Ubuntu 18.04Gravatar MarkKoz2020-02-21-2/+1
| | | | * Use inherit_errexit in check_dockerfiles.sh
* CI: add more logging in check_dockerfiles.shGravatar MarkKoz2020-02-21-0/+9
|
* CI: always check if the base image can be pulled from Docker HubGravatar MarkKoz2020-02-21-2/+6
|
* CI: ensure count of builds returned by the API is > 0Gravatar MarkKoz2019-06-30-1/+2
|
* CI: refactor script & pull base when possibleGravatar MarkKoz2019-06-30-22/+76
| | | | | | | | * Move script's execution to the test job * Use output variables * Use jq instead of regex for parsing JSON responses from API * Wrap to 80 columns * Make more robust by checking for command success
* CI: move check shell script to a separate fileGravatar MarkKoz2019-06-30-0/+31