Skip to content

Commit

Permalink
ci: put app folder instead of zip file into docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Sep 12, 2024
1 parent 9e9ab58 commit 04b0028
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
15 changes: 8 additions & 7 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def publishSteps(ctx):
"from_secret": "github_token",
},
"files": [
"%s-%s.zip" % (app, version),
"apps/%s-%s.zip" % (app, version),
],
"checksum": [
"md5",
Expand All @@ -235,7 +235,7 @@ def dockerImageSteps(ctx):
return [{
"name": "docker",
"image": PLUGINS_DOCKER,
"depends_on": ["package-%s" % app],
"depends_on": ["build-%s" % app],
"settings": {
"username": {
"from_secret": "docker_username",
Expand All @@ -250,7 +250,8 @@ def dockerImageSteps(ctx):
"%s-latest" % app,
],
"build_args": [
"app_path=%s-%s.zip" % (app, version),
"app_path=./apps/%s" % app,
"app_name=%s" % app,
],
},
"when": {
Expand All @@ -276,8 +277,8 @@ def appBuilds(ctx):
"commands": [
"cd 'packages/web-app-%s'" % app,
"pnpm build",
"mkdir -p ../../assets/extensions",
"mv dist ../../assets/extensions/%s" % app,
"mkdir ../../apps",
"mv dist ../../apps/%s" % app,
],
})

Expand All @@ -287,8 +288,8 @@ def appBuilds(ctx):
"depends_on": ["build-%s" % app],
"commands": [
"apk add zip",
"cd assets/extensions",
"zip -r ../../%s-%s.zip %s/" % (app, release_version, app),
"cd apps",
"zip -r %s-%s.zip %s/" % (app, release_version, app),
],
"when": {
"ref": [
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.opencontainers.image.source="https://github.com/owncloud/web-extensions"

ARG app_path
ARG app_name

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

ADD $app_path /var/lib/nginx/html
ADD $app_path /var/lib/nginx/html/$app_name
RUN find /var/lib/nginx/html

EXPOSE 8080
Expand Down

0 comments on commit 04b0028

Please sign in to comment.