The poor man's CD pipeline.
Bearpush supplies you with a web server, bring your own scripts and auth (optional)
Binaries for x86-64 Linux are available from the GitHub Actions.
go build ./cmd/bearpush/
To use Bearpush, you need to configure at least one product - a type of entity Bearpush can process. You can scaffold the configuration with bearpush product new [product name]
.
The newly created configuration file will include a randomly generated token static-value
. Feel free to change it. This token has to be provided in your request in order for it to be processed.
To do something with the uploaded file, you have to create a process-script
. By default nothing is associated with your product.
The simplest shell script could look like this:
#!/bin/bash
mkdir -p /app/foo
cp "${ARTIFACT_PATH}" /app/foo/my-file.txt
Note that Bearpush provides you with the ARTIFACT_PATH
environment variable.
Update your config file to include the absolute path to the script: process-script: '/home/foo/bar.sh'
.
Run bearpush
to start the server.
The simplest way to upload your artifact is to use curl:
curl -X POST http://localhost:44344/v1/upload/your-product-name \
-H "Content-Type: multipart/form-data" \
-H "Authorization: Bearer your-token-here" \
-F "artifact=@your-file.tar"