generated from actions/container-action
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pin Dockerfile apt-get dependencies (#112)
We want to pin all versions in our codebase, so that our builds are reproducible. We have to update the Dockerfile dependencies manually at the moment, so this commit also schedules an issue to be created every 6 months to prompt us to do so.
- Loading branch information
Showing
5 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.github/ISSUE_TEMPLATE/scheduled/update-dockerfile-dependencies.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Update dependencies in devcontainer Dockerfile | ||
about: Stay up to date with Dockerfile dependencies | ||
title: Update dependencies in devcontainer Dockerfile | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
||
We have [pinned the linux dependencies in the devcontainer Dockerfile](https://github.com/agilepathway/hoverfly-github-action/pull/112/files), but there is no mechanism to automatically update them, currently. It looks like [it's on Dependabot's roadmap](https://github.com/dependabot/dependabot-core/issues/2129#issuecomment-511552345), so this GitHub Issue gets automatically created every 6 months to: | ||
|
||
- [ ] update the dependencies manually: | ||
1. Temporarily unpin the versions (i.e. remove `=<version>` from each package in the Dockerfile) | ||
2. Execute the Dockerfile (e.g. if it's a remote container Dockerfile build the remote container) | ||
3. Run `apt-cache policy <package>` for each package, to see the version installed | ||
4. Pin all the versions, replacing any old versions with new ones | ||
- [ ] see if Dependabot now offer this functionality (in which case we can do it automatically, from then on) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ jobs: | |
- uses: golang/[email protected] | ||
|
||
# update the versions in the devcontainer Dockerfile manually, too | ||
- uses: golang/[email protected] | ||
- uses: uudashr/[email protected] | ||
- uses: ramya-rao-a/[email protected] | ||
- uses: acroca/[email protected] | ||
|
28 changes: 28 additions & 0 deletions
28
.github/workflows/schedule_dockerfile_dependency_updates_issue.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Create issue every 6 months to update Dockerfile dependencies | ||
on: # yamllint disable-line rule:truthy | ||
# Scheduled for 4am on 10th March and 10th Sept every year | ||
schedule: | ||
- cron: '0 4 10 3,9 *' # * is a special character in YAML so we have to quote this string | ||
|
||
jobs: | ||
create_issue: | ||
name: Create issue to update Dockerfile dependencies | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
|
||
# Repo code checkout required if `template` is used | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: issue-bot | ||
uses: imjohnbo/issue-bot@v2 | ||
with: | ||
assignees: "johnboyes" | ||
labels: "dependencies" | ||
pinned: false | ||
close-previous: false | ||
# assignees & labels in the template are overridden by the values specified in this action | ||
template: ".github/ISSUE_TEMPLATE/scheduled/update-dockerfile-dependencies.md" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |