From e772abaf9618dc2da9d1da1e420ffb4ca5af227e Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 25 Aug 2021 12:55:21 +1000 Subject: [PATCH] gitea: use assets bundle This uses the opendev assets bundle image created with I3166679bde6d771276289b9d32e7e4407957b2f8. The mount options require using BuildKit, hence the Dockerfile update. Otherwise conceptually it's fairly simple; copy in the files from the opendevorg/assets image rather than the file-system. Change-Id: I36bdc76471eec5380a676ebcdd885a88d3985976 --- docker/gitea/Dockerfile | 2 + docker/gitea/custom/public/img/favicon.ico | Bin 15086 -> 0 bytes docker/gitea/custom/public/img/logo.svg | 49 ------------------ docker/gitea/custom/public/img/opendev-sm.png | Bin 7509 -> 0 bytes zuul.d/docker-images/gitea.yaml | 3 ++ zuul.d/project.yaml | 12 ++++- 6 files changed, 15 insertions(+), 51 deletions(-) delete mode 100644 docker/gitea/custom/public/img/favicon.ico delete mode 100644 docker/gitea/custom/public/img/logo.svg delete mode 100644 docker/gitea/custom/public/img/opendev-sm.png diff --git a/docker/gitea/Dockerfile b/docker/gitea/Dockerfile index f6442efae9..9833b72b32 100644 --- a/docker/gitea/Dockerfile +++ b/docker/gitea/Dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1.3 # Copyright (c) 2018 Red Hat, Inc. # Copyright (c) 2016 The Gitea Authors # Copyright (c) 2015 The Gogs Authors @@ -82,6 +83,7 @@ RUN ln -s /app/gitea/gitea /usr/local/bin/gitea # Copy our custom templates COPY custom/ /custom/ +RUN --mount=type=bind,from=opendevorg/assets,target=/tmp/assets cp /tmp/assets/* /custom/public/img/ ENV GITEA_CUSTOM /custom diff --git a/docker/gitea/custom/public/img/favicon.ico b/docker/gitea/custom/public/img/favicon.ico deleted file mode 100644 index 8a92dda1e934170c0a28ea1a969683db9a78e422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15086 zcmdU$X>eS{5rCh|RFPDE;HvydQmMi}uxvt1oQvFn+;KvZ%HbqcVEF(H#(<5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o9W6Brj&iy_oSi=5?w0jxUF+HNxs+VLrYzqu|P_3>mgFzcaV=A^`A z!MnAAxOL680=pIs!Mt||?tU7o@PRdIFwYgIjXx3_4S2daP9ChRIcq8JHm`o^bcstv za&&QPLyU4B5G z1U-_ccZZ_xew$N&n6i0`4L28z!!J9ATpzLM_PhNY z6#ZA6-fiI$2h-eUls6|!%;d4#{Cf)SZ{UOnfn7@z6MXaeqPcc~p9>)_e94h%LmZiV z4UFX*@n&Mr7f9TVIi2)ve@^6;mdwk9cSp!Ykaux$MxN85O%>R{Bo0X*^55i%$(z9c z-a^@~3BNHPzLW3PJPhl?8JW8&+^wOK!zCUW!5Mv5dv0?~#B=FSE(I9MQ{<0(JBp8U zx8^UQwOjJw$bpONiM0ire>_^`o^^`NwFP?#vYz^^qib$PRETc6F(h4>|3r?_cXU(k>Lt}FWS zb7zPW@P+=|Pa>bEcV3=Z-_L*Y ziolNEXHop*0Fjle<8yrY>KSqm?ROQ7<^fgy&|TIVy08h*!d)Na4_!pw`G)*K19pH| z6P3J#${)G=xO@?~1K**NF9I`8|F8+<|IkVDr^t-*w3hx=#qaZf6LWAYy2#xu_m0=1 z=Crke53KCZ$&<4re~ApnIeex670c4kWZ&b&CPy8R7#2SHz zybzUjo%p!?5A@I}YE__5){FQ`w#ft{Wl6{xbH50Y%sZ-Tqd}464`$P9$YkB zTyf*L8_4|xl}B2|FLST(KfvE;|BF3K?@?(RDA}SKuaf=xveI9iBRU5D0A9P^^c&)DxcQ)XB zhMlHzreXi~=^!rI*>v>eWDY+V{}+E0pOHTJMfjP2m3y)Hqg3*&7yi-uRPe$#1k z#^Meqzk`Q+iQKK7FXx!Gm*s4pko&5Yb4<3#dmDZ)X8`hY_-DYl;jFB=e_7t%dC -image/svg+xml \ No newline at end of file diff --git a/docker/gitea/custom/public/img/opendev-sm.png b/docker/gitea/custom/public/img/opendev-sm.png deleted file mode 100644 index 789b7c90736b4af9a5807704617bb9de58976a49..0000000000000000000000000000000000000000 GIT binary patch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7 100644 --- a/zuul.d/docker-images/gitea.yaml +++ b/zuul.d/docker-images/gitea.yaml @@ -34,8 +34,10 @@ name: system-config-build-image-gitea description: Build a gitea image. parent: system-config-build-image + requires: assets-container-image provides: gitea-container-image vars: &gitea_vars + docker_use_buildkit: true docker_images: - context: docker/gitea target: gitea @@ -51,6 +53,7 @@ name: system-config-upload-image-gitea description: Build and upload a gitea image. parent: system-config-upload-image + requires: assets-container-image provides: gitea-container-image vars: *gitea_vars files: *gitea_files diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index f55e0031fd..4c19ae6c3e 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -113,7 +113,11 @@ - name: system-config-build-image-python-base-3.8 soft: true - system-config-build-image-etherpad - - system-config-build-image-gitea + - system-config-build-image-gitea: + dependencies: + - name: opendev-buildset-registry + - name: system-config-build-image-assets + soft: true - system-config-build-image-grafana - system-config-build-image-haproxy-statsd: dependencies: @@ -257,7 +261,11 @@ - system-config-upload-image-hound - system-config-upload-image-assets - system-config-upload-image-etherpad - - system-config-upload-image-gitea + - system-config-upload-image-gitea: + dependencies: + - name: opendev-buildset-registry + - name: system-config-upload-image-assets + soft: true - system-config-upload-image-grafana - system-config-upload-image-refstack - system-config-upload-image-haproxy-statsd: