Compare commits
8 Commits
ceaa1d7f73
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 914078cd22 | |||
| b2876b8bf6 | |||
| ec25ef0aeb | |||
| cb929d7a28 | |||
| 035101fe03 | |||
| 0e90d47310 | |||
| bb14cfa66a | |||
| fcd7d1e2ce |
11
Dockerfile
11
Dockerfile
@@ -1,13 +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
|
||||||
|
RUN cp /usr/src/app/vendor/rpi-rgb-led-matrix/lib/* /usr/local/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'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user