Skip to content

Commit 701d29b

Browse files
committed
docker: imp
1 parent 4cecee5 commit 701d29b

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

bamboo-specs/snapcraft.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
--build-arg "BASE_IMAGE=${bamboo_dockerSnap}"
6868
--build-arg "CACHE_BUSTER=${bamboo_cacheBuster}" \
6969
--build-arg "CHANNEL=${bamboo_channel}" \
70+
--build-arg "VERSION=${bamboo_buildNumber}" \
7071
--output '.' \
7172
--progress 'plain' \
7273
--target 'builder-exporter' \
@@ -102,6 +103,7 @@
102103
--build-arg "CACHE_BUSTER=${bamboo_cacheBuster}" \
103104
--build-arg "SNAPCRAFT_CHANNEL=${bamboo_snapcraftChannel}" \
104105
--build-arg "SNAPCRAFT_STORE_CREDENTIALS=${bamboo_snapcraftMacaroonPassword}" \
106+
--build-arg "VERSION=${bamboo_buildNumber}" \
105107
--output '.' \
106108
--progress 'plain' \
107109
--target 'publisher' \

docker/ci.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ RUN \
169169
<<-'EOF'
170170
set -e -f -u -x
171171

172-
# Import GPG key if provided
172+
# Import GPG key if provided.
173173
if [ "${GPG_SECRET_KEY:-}" != '' ]; then
174174
echo "$GPG_SECRET_KEY" | awk '{ gsub(/\\n/, "\n"); print; }' | gpg --import --batch --yes
175175
fi

docker/snapcraft.Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,29 @@ ARG BASE_IMAGE=adguard/snap-builder:2.1
3434
FROM "$BASE_IMAGE" AS builder
3535
ARG CACHE_BUSTER=0
3636
ARG CHANNEL=development
37+
ARG VERSION=""
3738
ADD snap /app/snap
3839
ADD scripts /app/scripts
3940
WORKDIR /app
4041
RUN \
4142
<<-'EOF'
4243
set -e -f -u -x
4344

45+
export VERBOSE='1'
46+
4447
env \
4548
CHANNEL="${CHANNEL}" \
46-
VERBOSE='1' \
47-
sh ./scripts/snap/download.sh
49+
sh ./scripts/snap/download.sh \
50+
;
4851

49-
env \
50-
VERBOSE='1' \
51-
sh ./scripts/snap/build.sh
52+
sh ./scripts/snap/build.sh
5253
EOF
5354

5455
# builder-exporter exports the build artifacts to the host machine so that they
5556
# could be published. This stage should only be used in a CI.
5657
FROM scratch AS builder-exporter
5758
ARG CACHE_BUSTER=0
59+
ARG VERSION=""
5860
COPY --from=builder /app/AdGuardHome_amd64.snap /AdGuardHome_amd64.snap
5961
COPY --from=builder /app/AdGuardHome_arm64.snap /AdGuardHome_arm64.snap
6062
COPY --from=builder /app/AdGuardHome_armhf.snap /AdGuardHome_armhf.snap
@@ -65,6 +67,7 @@ FROM "$BASE_IMAGE" AS publisher
6567
ARG CACHE_BUSTER=0
6668
ARG SNAPCRAFT_CHANNEL=0
6769
ARG SNAPCRAFT_STORE_CREDENTIALS=0
70+
ARG VERSION=""
6871
ADD snap /app/snap
6972
ADD scripts /app/scripts
7073
ADD AdGuardHome_amd64.snap /app/AdGuardHome_amd64.snap

0 commit comments

Comments
 (0)