Added CI Builder dockerfile
This commit is contained in:
parent
b931be07f6
commit
d3814ee83e
22
Dockerfile
22
Dockerfile
@ -0,0 +1,22 @@
|
|||||||
|
FROM ubuntu:19.10
|
||||||
|
|
||||||
|
RUN apt-get update -y && \
|
||||||
|
apt-get install -y software-properties-common && \
|
||||||
|
add-apt-repository ppa:longsleep/golang-backports && \
|
||||||
|
apt-get update -y
|
||||||
|
|
||||||
|
RUN apt-get install -y \
|
||||||
|
curl \
|
||||||
|
build-essential \
|
||||||
|
git \
|
||||||
|
golang-go
|
||||||
|
|
||||||
|
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
|
||||||
|
RUN curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash
|
||||||
|
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.24.0
|
||||||
|
RUN go get -u golang.org/x/lint/golint
|
||||||
|
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl \
|
||||||
|
&& chmod +x ./kubectl \
|
||||||
|
&& mv ./kubectl /usr/local/bin/kubectl
|
||||||
|
|
||||||
|
ENTRYPOINT [ "make" ]
|
20
Makefile
20
Makefile
@ -8,42 +8,26 @@ test: lint check-format run-tests
|
|||||||
.PHONY: lint # Perform lint checks against code
|
.PHONY: lint # Perform lint checks against code
|
||||||
lint:
|
lint:
|
||||||
@echo "⚠️ 'lint' unimplemented"
|
@echo "⚠️ 'lint' unimplemented"
|
||||||
# GO Projects
|
|
||||||
# @go vet && golint -set_exit_status ./...
|
|
||||||
|
|
||||||
.PHONY: check-format # Checks code formatting and returns a non-zero exit code if formatting errors found
|
.PHONY: check-format # Checks code formatting and returns a non-zero exit code if formatting errors found
|
||||||
check-format:
|
check-format:
|
||||||
@echo "⚠️ 'check-format' unimplemented"
|
@echo "⚠️ 'check-format' unimplemented"
|
||||||
# GO Projects
|
|
||||||
# @gofmt -e -l .
|
|
||||||
|
|
||||||
.PHONY: format # Performs automatic format fixes on all code
|
.PHONY: format # Performs automatic format fixes on all code
|
||||||
format:
|
format:
|
||||||
@echo "⚠️ 'format' unimplemented"
|
@echo "⚠️ 'format' unimplemented"
|
||||||
# GO Projects
|
|
||||||
# @gofmt -s -w .
|
|
||||||
|
|
||||||
.PHONY: run-tests # Runs all tests
|
.PHONY: run-tests # Runs all tests
|
||||||
run-tests:
|
run-tests:
|
||||||
@echo "⚠️ 'run-tests' unimplemented"
|
@echo "⚠️ 'run-tests' unimplemented"
|
||||||
# GO Projects
|
|
||||||
# @go test
|
|
||||||
# Node Projects
|
|
||||||
# @npm test
|
|
||||||
|
|
||||||
.PHONY: fetch-deps # Fetch all project dependencies
|
.PHONY: fetch-deps # Fetch all project dependencies
|
||||||
fetch-deps:
|
fetch-deps:
|
||||||
@echo "⚠️ 'fetch-deps' unimplemented"
|
@echo "⚠️ 'fetch-deps' unimplemented"
|
||||||
# GO Projects
|
|
||||||
# @go mod tidy
|
|
||||||
# Node Projects
|
|
||||||
# @npm install
|
|
||||||
|
|
||||||
.PHONY: build # Build the project
|
.PHONY: build # Build the project
|
||||||
build: lint check-format fetch-deps
|
build: lint check-format fetch-deps
|
||||||
@echo "⚠️ 'build' unimplemented"
|
@echo "⚠️ 'build' unimplemented"
|
||||||
# GO Projects
|
|
||||||
# @go build -o PROJECT_NAME main.go
|
|
||||||
|
|
||||||
.PHONY: docker-build # Build the docker image
|
.PHONY: docker-build # Build the docker image
|
||||||
docker-build:
|
docker-build:
|
||||||
@ -56,10 +40,6 @@ docker-publish:
|
|||||||
.PHONY: run # Run the application
|
.PHONY: run # Run the application
|
||||||
run:
|
run:
|
||||||
@echo "⚠️ 'run' unimplemented"
|
@echo "⚠️ 'run' unimplemented"
|
||||||
# GO Projects
|
|
||||||
# @go run main.go
|
|
||||||
# Node Projects
|
|
||||||
# @npm start
|
|
||||||
|
|
||||||
.PHONY: ci # Perform CI specific tasks to perform on a pull request
|
.PHONY: ci # Perform CI specific tasks to perform on a pull request
|
||||||
ci:
|
ci:
|
||||||
|
16
README.md
16
README.md
@ -4,28 +4,12 @@ Docker image designed for generic CI tasks
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
## Install
|
|
||||||
|
|
||||||
```sh
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building from source
|
## Building from source
|
||||||
|
|
||||||
With Docker:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make docker-build
|
make docker-build
|
||||||
```
|
```
|
||||||
|
|
||||||
Standalone:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
make build
|
|
||||||
```
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
If you find a bug or have an idea for a new feature please [raise an issue](/AverageMarcus/ci-builder/issues/new) to discuss it.
|
If you find a bug or have an idea for a new feature please [raise an issue](/AverageMarcus/ci-builder/issues/new) to discuss it.
|
||||||
|
Loading…
Reference in New Issue
Block a user