adjust for go auth plugin
This commit is contained in:
@ -5,7 +5,7 @@ stages:
|
|||||||
variables:
|
variables:
|
||||||
IMAGE_NAME: registry.gitlab.com/wolutator/mosquitto-with-auth
|
IMAGE_NAME: registry.gitlab.com/wolutator/mosquitto-with-auth
|
||||||
HUB_IMAGE_NAME: wollud1969/mosquitto-with-auth
|
HUB_IMAGE_NAME: wollud1969/mosquitto-with-auth
|
||||||
|
GO_BINARIES: go1.12.6.linux-amd64.tar.gz
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
image: registry.gitlab.com/wolutator/base-build-env:latest
|
image: registry.gitlab.com/wolutator/base-build-env:latest
|
||||||
@ -25,6 +25,11 @@ build:
|
|||||||
script:
|
script:
|
||||||
- apt update
|
- apt update
|
||||||
- apt install -y gcc g++ libssl-dev uuid-dev xsltproc docbook docbook-xsl libmariadbclient-dev libwebsockets-dev
|
- apt install -y gcc g++ libssl-dev uuid-dev xsltproc docbook docbook-xsl libmariadbclient-dev libwebsockets-dev
|
||||||
|
- wget https://dl.google.com/go/$GO_BINARIES
|
||||||
|
- tar -xzf $GO_BINARIES
|
||||||
|
- mv go /usr/local
|
||||||
|
- GOROOT=/usr/local/go
|
||||||
|
- PATH=$PATH:$GOROOT/bin
|
||||||
- MOSQ_SRC=`pwd`/parts/mosquitto
|
- MOSQ_SRC=`pwd`/parts/mosquitto
|
||||||
- BUILD_DIR=`pwd`
|
- BUILD_DIR=`pwd`
|
||||||
- pushd parts/mosquitto
|
- pushd parts/mosquitto
|
||||||
@ -33,12 +38,12 @@ build:
|
|||||||
- env DESTDIR=$BUILD_DIR make
|
- env DESTDIR=$BUILD_DIR make
|
||||||
- env DESTDIR=$BUILD_DIR make install
|
- env DESTDIR=$BUILD_DIR make install
|
||||||
- popd
|
- popd
|
||||||
- pushd parts/mosquitto-auth-plug
|
- pushd parts/mosquitto-go-auth
|
||||||
- cat config.mk.in | sed 's,^MOSQUITTO_SRC =,MOSQUITTO_SRC = '"$BUILD_DIR"'/opt,' > config.mk
|
- CGO_CFLAGS="-I$BUILD_DIR/opt -fPIC"
|
||||||
- sed -i 's,CFLAGS += -I$(MOSQUITTO_SRC)/src/,CFLAGS += -I$(MOSQUITTO_SRC)/include/,' Makefile
|
- CGO_LDFLAGS="-shared"
|
||||||
- make
|
- make
|
||||||
- cp auth-plug.so $BUILD_DIR/opt/lib
|
- cp go-auth.so $BUILD_DIR/opt/lib
|
||||||
- cp np $BUILD_DIR/opt/bin
|
- cp pw $BUILD_DIR/opt/bin
|
||||||
- popd
|
- popd
|
||||||
- VERSION=`cat VERSION`
|
- VERSION=`cat VERSION`
|
||||||
- REFCNT=`git rev-list --all --count`
|
- REFCNT=`git rev-list --all --count`
|
||||||
|
Reference in New Issue
Block a user