Compare commits

...

2 commits

Author SHA1 Message Date
540257787a setup docker build
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
2023-08-21 21:28:02 -07:00
c24de015d7 disable mattermost notifications 2023-03-02 05:59:40 -08:00
3 changed files with 42 additions and 29 deletions

20
.woodpecker.yml Normal file
View file

@ -0,0 +1,20 @@
pipeline:
build:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: git.dreamfall.space/${CI_REPO_OWNER}/pnut-bridge
registry: git.dreamfall.space
tag: latest
username: ${CI_REPO_OWNER}
password:
from_secret: git_token
notify:
image: deblan/woodpecker-email
settings:
from: woodpecker@clacks.network
host: smtp.migadu.com
username:
from_secret: smtp_user
password:
from_secret: smtp_pass

22
Dockerfile Normal file
View file

@ -0,0 +1,22 @@
FROM alpine AS builder
RUN apk --no-cache add go git
COPY . /go/src/pnut-bridge
WORKDIR /go/src/pnut-bridge
RUN GO_ENABLED=0 go build -o /bin/pnut-bridge
FROM alpine
RUN apk --no-cache add ca-certificates
COPY --from=builder /bin/pnut-bridge /bin/pnut-bridge
VOLUME /data
WORKDIR /data
ENTRYPOINT ["/bin/pnut-bridge", "-c", "/data/config.ini"]

29
Jenkinsfile vendored
View file

@ -1,29 +0,0 @@
pipeline {
agent {
docker {
image 'golang:latest'
label 'docker-build'
}
}
environment {
XDG_CACHE_HOME = '/tmp/.cache'
CGO_ENABLED = 0
}
stages {
stage('build') {
steps {
mattermostSend "Build started - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
sh 'go build'
}
post {
success {
mattermostSend color: "good", message: "Build success - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
archiveArtifacts artifacts: 'pnut-bridge'
}
failure {
mattermostSend color: "danger", message: "Build failure - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)"
}
}
}
}
}