Skip to content

Commit 04b0028

Browse files
committed
ci: put app folder instead of zip file into docker image
1 parent 9e9ab58 commit 04b0028

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.drone.star

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def publishSteps(ctx):
209209
"from_secret": "github_token",
210210
},
211211
"files": [
212-
"%s-%s.zip" % (app, version),
212+
"apps/%s-%s.zip" % (app, version),
213213
],
214214
"checksum": [
215215
"md5",
@@ -235,7 +235,7 @@ def dockerImageSteps(ctx):
235235
return [{
236236
"name": "docker",
237237
"image": PLUGINS_DOCKER,
238-
"depends_on": ["package-%s" % app],
238+
"depends_on": ["build-%s" % app],
239239
"settings": {
240240
"username": {
241241
"from_secret": "docker_username",
@@ -250,7 +250,8 @@ def dockerImageSteps(ctx):
250250
"%s-latest" % app,
251251
],
252252
"build_args": [
253-
"app_path=%s-%s.zip" % (app, version),
253+
"app_path=./apps/%s" % app,
254+
"app_name=%s" % app,
254255
],
255256
},
256257
"when": {
@@ -276,8 +277,8 @@ def appBuilds(ctx):
276277
"commands": [
277278
"cd 'packages/web-app-%s'" % app,
278279
"pnpm build",
279-
"mkdir -p ../../assets/extensions",
280-
"mv dist ../../assets/extensions/%s" % app,
280+
"mkdir ../../apps",
281+
"mv dist ../../apps/%s" % app,
281282
],
282283
})
283284

@@ -287,8 +288,8 @@ def appBuilds(ctx):
287288
"depends_on": ["build-%s" % app],
288289
"commands": [
289290
"apk add zip",
290-
"cd assets/extensions",
291-
"zip -r ../../%s-%s.zip %s/" % (app, release_version, app),
291+
"cd apps",
292+
"zip -r %s-%s.zip %s/" % (app, release_version, app),
292293
],
293294
"when": {
294295
"ref": [

docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
1111
org.opencontainers.image.source="https://github.com/owncloud/web-extensions"
1212

1313
ARG app_path
14+
ARG app_name
1415

1516
RUN rm -f /var/lib/nginx/html/*
1617

17-
ADD $app_path /var/lib/nginx/html
18+
ADD $app_path /var/lib/nginx/html/$app_name
1819
RUN find /var/lib/nginx/html
1920

2021
EXPOSE 8080

0 commit comments

Comments
 (0)