Compare commits
2 commits
5a16489558
...
540257787a
Author | SHA1 | Date | |
---|---|---|---|
540257787a | |||
c24de015d7 |
3 changed files with 42 additions and 29 deletions
20
.woodpecker.yml
Normal file
20
.woodpecker.yml
Normal 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
22
Dockerfile
Normal 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
29
Jenkinsfile
vendored
|
@ -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>)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue