Skip to content

Commit

Permalink
Update build configuration
Browse files Browse the repository at this point in the history
Move builds to scaleway object storage
  • Loading branch information
arwassa committed Dec 29, 2020
1 parent 5b63718 commit 62f3c22
Showing 1 changed file with 48 additions and 36 deletions.
84 changes: 48 additions & 36 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
workspace:
base: /bzmoon
path: repo/${DRONE_REPO_SLUG}
path: /bzmoon

pipeline:
bundler:
image: docker.dock1.spaceway.network/bzone/bztools:latest
when:
event:
- tag
commands:
- mkdir -p /tmp/bzmoon
- mkdir -p /tmp/bzmoon2
- moonc /bzmoon/repo/src
- cp /bzmoon/repo/extra/* /tmp/bzmoon
- find /bzmoon/repo/src -type f -name "*.lua" -exec cp {} /tmp/bzmoon \;
- cp /bzmoon/repo/.squish /tmp/bzmoon
- cp -r /tmp/bzmoon/. /tmp/bzmoon2/
- python3 /bztools/luaSquish.py /tmp/bzmoon2 -r
- mv /tmp/bzmoon2/* /tmp/bzmoon
- rm /tmp/bzmoon/bzpre_1.5.dll
- rm /tmp/bzmoon/bzpre_bzr.dll
- cp /bzmoon/repo/extra/bzpre_1.5.dll /tmp/bzmoon/bzpre.dll
- zip -j -r /bzmoon/bzmoon_1.5.zip /tmp/bzmoon
- cp /bzmoon/repo/extra/bzpre_bzr.dll /tmp/bzmoon/bzpre.dll
- zip -j -r /bzmoon/bzmoon_bzr.zip /tmp/bzmoon
kind: pipeline
name: default

steps:
- name: bundle
image: thejanne/bztools:latest
commands:
when:
branch:
- master
event:
- tag
commands:
- mkdir -p /tmp/bzmoon
- mkdir -p /tmp/bzmoon2
- mkdir -p /bzmoon/build
- moonc /bzmoon/src
- cp /bzmoon/extra/* /tmp/bzmoon
- find /bzmoon/src -type f -name "*.lua" -exec cp {} /tmp/bzmoon \;
- cp /bzmoon/.squish /tmp/bzmoon
- cp -r /tmp/bzmoon/. /tmp/bzmoon2/
- python3 /bztools/luaSquish.py /tmp/bzmoon2 -r
- mv /tmp/bzmoon2/* /tmp/bzmoon
- rm /tmp/bzmoon/bzpre_1.5.dll
- rm /tmp/bzmoon/bzpre_bzr.dll
- cp /bzmoon/extra/bzpre_1.5.dll /tmp/bzmoon/bzpre.dll
- zip -j -r /bzmoon/build/bzmoon_1.5_${DRONE_TAG}.zip /tmp/bzmoon
- cp /bzmoon/extra/bzpre_bzr.dll /tmp/bzmoon/bzpre.dll
- zip -j -r /bzmoon/build/bzmoon_bzr_${DRONE_TAG}.zip /tmp/bzmoon
- cp /bzmoon/build/bzmoon_bzr_${DRONE_TAG}.zip /bzmoon/build/bzmoon_bzr_latest.zip
- cp /bzmoon/build/bzmoon_1.5_${DRONE_TAG}.zip /bzmoon/build/bzmoon_1.5_latest.zip

upload:
image: docker.dock1.spaceway.network/bzone/bztools:latest
when:
event:
- tag
volumes:
- /srv/data/caddy/media/public/bzmoon:/builds
commands:
- cp -f /bzmoon/bzmoon_1.5.zip /builds/bzmoon_1.5_${DRONE_TAG}.zip
- ln -f /builds/bzmoon_1.5_${DRONE_TAG}.zip /builds/bzmoon_1.5_latest.zip
- cp -f /bzmoon/bzmoon_bzr.zip /builds/bzmoon_bzr_${DRONE_TAG}.zip
- ln -f /builds/bzmoon_bzr_${DRONE_TAG}.zip /builds/bzmoon_bzr_latest.zip
- name: upload
image: plugins/s3
settings:
bucket: buildstorage
access_key:
from_secret: access_key
secret_key:
from_secret: secret_key
source: /bzmoon/build/*.zip
target: /battlezone/
acl: public-read
endpoint: https://s3.nl-ams.scw.cloud
region: nl-ams

when:
event:
- tag

0 comments on commit 62f3c22

Please sign in to comment.