Create separate build file for the docker image
This commit is contained in:
parent
6df313558d
commit
599ba042b8
9
.woodpecker/build-docker.yml
Normal file
9
.woodpecker/build-docker.yml
Normal file
@ -0,0 +1,9 @@
|
||||
# https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
|
||||
# https://woodpecker-ci.org/docs/usage/volumes
|
||||
|
||||
pipeline:
|
||||
docker-go:
|
||||
image: docker
|
||||
commands:
|
||||
- cd .woodpecker/docker
|
||||
- docker build -f go.dockerfile -t test-image .
|
@ -51,3 +51,6 @@ pipeline:
|
||||
- ./build_dpkg.sh $version
|
||||
- scp offline-twitter-engine_$${version}_all.deb aptrepo@apt.playfulpachyderm.com:/apt-repo/test-repo
|
||||
- ssh aptrepo@apt.playfulpachyderm.com "cd ~/test-repo && ./update.sh"
|
||||
|
||||
depends_on:
|
||||
- build-docker
|
11
.woodpecker/docker/go.dockerfile
Normal file
11
.woodpecker/docker/go.dockerfile
Normal file
@ -0,0 +1,11 @@
|
||||
from ubuntu:jammy
|
||||
|
||||
run apt update && apt install -y sudo curl wget build-essential sqlite3 jq git
|
||||
|
||||
# Install go and golangci-lint
|
||||
run wget https://go.dev/dl/go1.20.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz
|
||||
env PATH="$PATH:/usr/local/go/bin"
|
||||
run curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/go/bin v1.53.1
|
||||
|
||||
# Install project dependencies (so they don't have to be reinstalled on every CI run)
|
||||
run git clone https://gitlab.com/offline-twitter/twitter_offline_engine.git && cd twitter_offline_engine && go install ./... && cd .. && rm -r twitter_offline_engine
|
Loading…
x
Reference in New Issue
Block a user