Add jenkinsfile and makefiles to test it
This commit is contained in:
parent
09a6d92c08
commit
e0c6960b6b
|
@ -0,0 +1,23 @@
|
|||
pipeline {
|
||||
agent docker
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh("make build")
|
||||
echo 'Building..'
|
||||
sh("make clean")
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
echo 'Testing..'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
echo 'Deploying....'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
22
Makefile
22
Makefile
|
@ -1,24 +1,8 @@
|
|||
THIS_DIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
cd $(THIS_DIR)/bootstrap && cargo fmt -- --check
|
||||
include $(THIS_DIR)/bootstrap/Makefile
|
||||
|
||||
.PHONY: test-bootstrap
|
||||
test-bootstrap:
|
||||
cd $(THIS_DIR)/bootstrap && cargo test
|
||||
.PHONY: compile
|
||||
compile: compile-bootstrap
|
||||
|
||||
.PHONY: test
|
||||
test: test-bootstrap
|
||||
|
||||
|
||||
.PHONY: clean-bootstrap
|
||||
clean-bootstrap:
|
||||
cd $(THIS_DIR)/bootstrap && cargo clean
|
||||
|
||||
.PHONY: bootstrap-repl
|
||||
bootstrap-repl:
|
||||
cd $(THIS_DIR)/bootstrap && cargo run repl
|
||||
|
||||
.PHONY: clean
|
||||
clean: clean-bootstrap
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
FROM golang:1-alpine
|
||||
LABEL maintainer="Sameer Rahmani <lxsameer@gnu.org>"
|
||||
|
||||
RUN mkdir -p /usr/src/serene
|
||||
WORKDIR /usr/src/serene
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
# Build the Go app
|
||||
RUN go build -v ./serene.go
|
||||
|
||||
CMD ["./serene"]
|
|
@ -0,0 +1,7 @@
|
|||
BOOTSTRAP_TAG ?= latest
|
||||
|
||||
compile-bootstrap:
|
||||
docker build -t serene-lang/serene-bootstrap:$(BOOTSTRAP_TAG) .
|
||||
|
||||
clean-bootstrap:
|
||||
docker rmi serene-lang/serene-bootstrap:$(BOOTSTRAP_TAG)
|
Loading…
Reference in New Issue