Try to fix pipeline and cleanup further

This commit is contained in:
ICScaryThings 2022-07-17 19:48:43 -04:00
parent 476a63c9ba
commit feb79b563e
2 changed files with 16 additions and 4 deletions

View File

@ -10,11 +10,8 @@ platform:
steps:
- name: build
environment:
DRONE_BUILD_EVENT: tag
PLUGIN_BASE_URL: https://git.freecumextremist.com/
PLUGIN_API_KEY:
from_secret: release_api_key
PLUGIN_FILES: release/*
DRONE_REPO_OWNER: icscarythings
DRONE_REPO_NAME: treebird-docker
commands:
@ -23,4 +20,4 @@ steps:
- rm -v treebird-latest/treebird
- tar -czf release/treebird-static-files-latest-noarch-`date +%Y-%m-%d-T%H%M%S`-`git rev-parse --short HEAD`.tar.gz treebird-latest/ treebird.nginx
- docker save treebird:latest | gzip > release/treebird-latest-amd64-`date +%Y-%m-%d-T%H%M%S`-`git rev-parse --short HEAD`.tar.gz
- docker run --rm -e DRONE_BUILD_EVENT -e PLUGIN_BASE_URL -e PLUGIN_API_KEY -e PLUGIN_FILES -e DRONE_REPO_OWNER -e DRONE_REPO_NAME -v $(pwd):$(pwd) -w $(pwd) plugins/gitea-release
- export PLUGIN_API_KEY DRONE_REPO_OWNER DRONE_REPO_NAME; ./release_files.sh

15
release_files.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# script to call the release container since its ugly in the drone yaml
export DRONE_REPO_NAME
export DRONE_REPO_OWNER
export PLUGIN_API_KEY
docker run \
--rm \
-e DRONE_BUILD_EVENT=tag \
-e PLUGIN_BASE_URL=https://git.freecumextremist.com/ \
-e PLUGIN_FILES=release/* \
-e PLUGIN_API_KEY \
-e DRONE_REPO_OWNER \
-e DRONE_REPO_NAME \
-v $(pwd):$(pwd) -w $(pwd) plugins/gitea-release