Compare commits
10 Commits
bf87ebdb3e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 914078cd22 | |||
| b2876b8bf6 | |||
| ec25ef0aeb | |||
| cb929d7a28 | |||
| 035101fe03 | |||
| 0e90d47310 | |||
| bb14cfa66a | |||
| fcd7d1e2ce | |||
|
|
ceaa1d7f73 | ||
|
|
465475c7a5 |
13
Dockerfile
13
Dockerfile
@@ -1,15 +1,16 @@
|
|||||||
FROM golang:1.18.3-buster as builder
|
#FROM golang:1.18.3-buster as builder
|
||||||
|
FROM golang:alpine
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN apt-get install -y git
|
#RUN apt-get install -y git
|
||||||
|
RUN apk add git make g++
|
||||||
RUN go mod tidy -e
|
RUN go mod tidy -e
|
||||||
RUN go mod vendor
|
RUN go mod vendor
|
||||||
|
RUN mkdir -p /usr/local/include
|
||||||
WORKDIR /usr/src/app/vendor/rpi-rgb-led-matrix/
|
WORKDIR /usr/src/app/vendor/rpi-rgb-led-matrix/
|
||||||
RUN git submodule update --init
|
RUN git submodule update --init
|
||||||
RUN make
|
RUN make
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
RUN go install -v ./...
|
RUN go install -v ./...
|
||||||
|
RUN cp /usr/src/app/vendor/rpi-rgb-led-matrix/include/* /usr/local/include
|
||||||
FROM golang:1.18.3-buster
|
RUN cp /usr/src/app/vendor/rpi-rgb-led-matrix/lib/* /usr/local/lib
|
||||||
COPY --from=builder /usr/src/app/vendor/rpi-rgb-led-matrix/lib/. /lib
|
|
||||||
|
|||||||
25
Jenkinsfile
vendored
Normal file
25
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
/*stage('GitCheckOut') {
|
||||||
|
steps{
|
||||||
|
checkout([$class: 'GitSCM', branches: [[name: "${env.CHECKOUT}"]], extensions: [], userRemoteConfigs: [[credentialsId: 'gitea', url: "$GIT_URL"]]])
|
||||||
|
}
|
||||||
|
|
||||||
|
}*/
|
||||||
|
stage('buildPush') {
|
||||||
|
steps{
|
||||||
|
sh 'docker buildx rm jenkins-agent || echo "none there"'
|
||||||
|
sh '''#!/bin/bash
|
||||||
|
docker buildx create --bootstrap --name=jenkins-agent --driver=kubernetes --driver-opt=namespace=jenkinsagent --driver-opt=qemu.install=true --driver-opt=\\"nodeselector=kubernetes.io/arch=amd64\\" --driver-opt=\\"image=registry.local/buildkit-wagnerca:stable-3-rootless\\" --use
|
||||||
|
'''
|
||||||
|
sh 'docker buildx build . -t registry.local/rgbarm64lib:v0.0.$BUILD_NUMBER --push --platform=linux/arm64,linux/amd64'
|
||||||
|
sh 'docker buildx build . -t registry.local/rgbarm64lib:latest --push --platform=linux/arm64,linux/amd64'
|
||||||
|
sh 'docker buildx rm jenkins-agent'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
12
README.md
12
README.md
@@ -1,3 +1,15 @@
|
|||||||
|
|
||||||
|
# Nathan readme
|
||||||
|
sudo docker build . -t registry.local/rgbarm64lib:latest
|
||||||
|
running this will get the build environment created
|
||||||
|
|
||||||
|
go app has to be built in /usr/src/app/subdir directory for now
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# go-rpi-rgb-led-matrix [](https://godoc.org/github.com/mcuadros/go-rpi-rgb-led-matrix) [](https://travis-ci.org/mcuadros/go-rpi-rgb-led-matrix)
|
# go-rpi-rgb-led-matrix [](https://godoc.org/github.com/mcuadros/go-rpi-rgb-led-matrix) [](https://travis-ci.org/mcuadros/go-rpi-rgb-led-matrix)
|
||||||
<img width="250" src="https://cloud.githubusercontent.com/assets/1573114/20248154/c17c1f2e-a9dd-11e6-805b-bf7d8ee73121.gif" align="right" />
|
<img width="250" src="https://cloud.githubusercontent.com/assets/1573114/20248154/c17c1f2e-a9dd-11e6-805b-bf7d8ee73121.gif" align="right" />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user