Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drone: run apk fix when using alpine/git on ARM #1011

Merged
merged 2 commits into from
Oct 6, 2021

Conversation

yvrhdn
Copy link
Member

@yvrhdn yvrhdn commented Oct 6, 2021

What this PR does:
Drone CI has been failing during the docker-arm image-tag step. Log from the Drone runner:

latest: Pulling from alpine/git
Digest: sha256:f73275dbb1a12e4322778e8d1cc7bda1656a849fb4b0e6b7fb935e8cf06c5cee
Status: Downloaded newer image for alpine/git:latest
+ apk --update --no-cache add bash
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/aarch64/APKINDEX.tar.gz
(1/2) Installing readline (8.1.0-r0)
(2/2) Installing bash (5.1.4-r0)
Executing bash-5.1.4-r0.post-install
Executing busybox-1.33.1-r3.trigger
1 error; 27 MiB in 34 packages

You can reproduce this by running alpine/git locally on a ARM machine:

$ docker run -it --entrypoint=/bin/sh alpine/git
/git # apk --update --no-cache add bash
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/aarch64/APKINDEX.tar.gz
(1/2) Installing readline (8.1.0-r0)
(2/2) Installing bash (5.1.4-r0)
Executing bash-5.1.4-r0.post-install
Executing busybox-1.33.1-r3.trigger
1 error; 27 MiB in 34 packages
/git # echo $?
1

By running apk fix before apk add we fix any broken installed packages:

$ docker run -it --entrypoint=/bin/sh alpine/git
/git # apk fix
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/aarch64/APKINDEX.tar.gz
(1/1) Reinstalling ca-certificates (20191127-r5)
Executing busybox-1.33.1-r3.trigger
Executing ca-certificates-20191127-r5.trigger
OK: 25 MiB in 32 packages
/git # apk --update --no-cache add bash
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/aarch64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/aarch64/APKINDEX.tar.gz
(1/2) Installing readline (8.1.0-r0)
(2/2) Installing bash (5.1.4-r0)
Executing bash-5.1.4-r0.post-install
Executing busybox-1.33.1-r3.trigger
OK: 27 MiB in 34 packages

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@yvrhdn
Copy link
Member Author

yvrhdn commented Oct 6, 2021

Filed an issue upstream: alpine-docker/git#35

@yvrhdn yvrhdn merged commit 323b280 into grafana:main Oct 6, 2021
@yvrhdn yvrhdn deleted the drone-apk-fix branch October 6, 2021 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants