Skip to content

Commit a6a5873

Browse files
committed
Initial commit 🚀
Signed-off-by: Pablo Pérez Schröder <[email protected]>
0 parents  commit a6a5873

File tree

1,818 files changed

+584653
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,818 files changed

+584653
-0
lines changed

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# see doc on: https://help.github.com/articles/about-codeowners/
2+
* @rbeuque74 @nomonamo @loopfz @w3st3ry

.github/ISSUE_TEMPLATE.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
**Note: for support questions, erase this form. Otherwise use approriate areas.**.
2+
3+
* **I'm submitting a ...**
4+
- [ ] bug report
5+
- [ ] feature request
6+
7+
8+
* **Do you want to request a *feature* or report a *bug*?**
9+
10+
11+
12+
* **What is the current behavior?**
13+
14+
15+
16+
* **What is the expected behavior?**
17+
18+
19+
20+
* **Which version of uTask are you using?**
21+
22+
23+
24+
* **Please tell us about your environment**
25+
26+
27+
* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

.github/PULL_REQUEST_TEMPLATE.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
* **Please check if the PR fulfills these requirements**
2+
- [ ] The commit message follows our guidelines
3+
- [ ] Tests for the changes have been added (for bug fixes / features)
4+
- [ ] Docs have been added / updated (for bug fixes / features)
5+
6+
7+
* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
8+
9+
10+
11+
* **What is the current behavior?** (You can also link to an open issue here)
12+
13+
14+
15+
* **What is the new behavior (if this is a feature change)?**
16+
17+
18+
19+
* **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?)
20+
21+
22+
23+
* **Other information**:

.gitignore

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Related to Golang
2+
3+
# Binaries for programs and plugins
4+
*.exe
5+
*.exe~
6+
*.dll
7+
*.so
8+
*.dylib
9+
10+
# Test binary, built with `go test -c`
11+
*.test
12+
13+
# Output of the go coverage tool, specifically when used with LiteIDE
14+
*.out
15+
16+
# Random files
17+
/app/app
18+
vault.json
19+
/utask
20+
vaultfile.json
21+
22+
# Related to UI
23+
ui/dashboard/dist
24+
ui/dashboard/coverage
25+
ui/dashboard/dist.tar.gz
26+
ui/dashboard/node_modules
27+
ui/dashboard/src/environments/environment.ts
28+
ui/editor/dist
29+
ui/editor/dist.tar.gz
30+
ui/editor/node_modules
31+
32+
# Related to config
33+
config/*
34+
!config/README.md

AUTHORS

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is the official list of µTask authors for copyright purposes.
2+
# This file is distinct from the CONTRIBUTORS files
3+
# and it lists the copyright holders only.
4+
5+
# Names should be added to this file as one of
6+
# Organization's name
7+
# Individual's name <submission email address>
8+
# Individual's name <submission email address> <email2> <emailN>
9+
# See CONTRIBUTORS for the meaning of multiple email addresses.
10+
11+
# Please keep the list sorted.
12+
13+
OVH SAS

CONTRIBUTING.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing to µTask
2+
3+
This project accepts contributions. In order to contribute, you should
4+
pay attention to a few things:
5+
6+
1. your code must follow the coding style rules
7+
2. your code must be unit-tested
8+
3. your code must be documented
9+
4. your work must be signed (see below)
10+
5. you may contribute through GitHub Pull Requests
11+
12+
# Coding and documentation Style
13+
14+
- Code must be formated with `go fmt`
15+
- Code must pass `go vet`
16+
- Code must pass `golint`
17+
18+
# Submitting Modifications
19+
20+
The contributions should be submitted through Github Pull Requests
21+
and follow the DCO which is defined below.
22+
23+
# Licensing for new files
24+
25+
µTask is licensed under a (modified) BSD license. Anything
26+
contributed to µTask must be released under this license.
27+
28+
When introducing a new file into the project, please make sure it has a
29+
copyright header making clear under which license it's being released.
30+
31+
# Developer Certificate of Origin (DCO)
32+
33+
To improve tracking of contributions to this project we will use a
34+
process modeled on the modified DCO 1.1 and use a "sign-off" procedure
35+
on patches that are being emailed around or contributed in any other
36+
way.
37+
38+
The sign-off is a simple line at the end of the explanation for the
39+
patch, which certifies that you wrote it or otherwise have the right
40+
to pass it on as an open-source patch. The rules are pretty simple:
41+
if you can certify the below:
42+
43+
By making a contribution to this project, I certify that:
44+
45+
(a) The contribution was created in whole or in part by me and I have
46+
the right to submit it under the open source license indicated in
47+
the file; or
48+
49+
(b) The contribution is based upon previous work that, to the best of
50+
my knowledge, is covered under an appropriate open source License
51+
and I have the right under that license to submit that work with
52+
modifications, whether created in whole or in part by me, under
53+
the same open source license (unless I am permitted to submit
54+
under a different license), as indicated in the file; or
55+
56+
(c) The contribution was provided directly to me by some other person
57+
who certified (a), (b) or (c) and I have not modified it.
58+
59+
(d) The contribution is made free of any other party's intellectual
60+
property claims or rights.
61+
62+
(e) I understand and agree that this project and the contribution are
63+
public and that a record of the contribution (including all
64+
personal information I submit with it, including my sign-off) is
65+
maintained indefinitely and may be redistributed consistent with
66+
this project or the open source license(s) involved.
67+
68+
69+
then you just add a line saying
70+
71+
Signed-off-by: Random J Developer <[email protected]>
72+
73+
using your real name (sorry, no pseudonyms or anonymous contributions.)

CONTRIBUTORS

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This is the official list of people who can contribute
2+
# (and typically have contributed) code to the µTask repository.
3+
#
4+
# Names should be added to this file only after verifying that
5+
# the individual or the individual's organization has agreed to
6+
# the appropriate CONTRIBUTING.md file.
7+
#
8+
# Names should be added to this file like so:
9+
# Individual's name <submission email address>
10+
# Individual's name <submission email address>
11+
#
12+
# Please keep the list sorted.
13+
#
14+
15+
Romain Beuque <[email protected]>
16+
Simon Martinez <[email protected]>
17+
Pablo Pérez Schröder <[email protected]>
18+
Maxime Petit <[email protected]>
19+
Valentin Pichard <[email protected]>
20+
Thomas Schaffer <[email protected]>

Dockerfile

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM node:latest AS js-builder
2+
3+
RUN npm install -g @angular/cli
4+
COPY ./ui /home/node/ui
5+
6+
# dashboard
7+
WORKDIR /home/node/ui/dashboard
8+
RUN BASEHREF=/ui/dashboard/ PREFIX_API_BASE_URL=/ make build-prod
9+
10+
# editor
11+
WORKDIR /home/node/ui/editor
12+
RUN BASEHREF=/ui/editor/ make build-prod
13+
14+
FROM golang:1.12.7
15+
16+
COPY . /go/src/github.com/ovh/utask
17+
WORKDIR /go/src/github.com/ovh/utask
18+
RUN make re
19+
RUN mv Makefile-child Makefile
20+
21+
RUN mkdir -p /app/plugins /app/templates /app/config /app/init /app/static/dashboard /app/static/editor
22+
WORKDIR /app
23+
24+
COPY --from=js-builder /home/node/ui/dashboard/dist/utask-ui/* /app/static/dashboard/
25+
COPY --from=js-builder /home/node/ui/editor/dist/utask-editor/* /app/static/editor/
26+
27+
RUN cp /go/src/github.com/ovh/utask/utask /app/utask
28+
RUN chmod +x /app/utask
29+
30+
EXPOSE 8081
31+
32+
CMD ["/app/utask"]

Dockerfile-child

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ovhcom/utask:1.0.0 AS builder
2+
3+
COPY . /go/src/github.com/ovh/utask
4+
WORKDIR /go/src/github.com/ovh/utask
5+
RUN make
6+
7+
FROM ovhcom/utask:1.0.0 # TODO switch to lighter base image, discard source code
8+
9+
COPY templates /app/templates
10+
COPY --from=builder /go/src/github.com/ovh/utask/plugins /app/plugins
11+
COPY --from=builder /go/src/github.com/ovh/utask/init /app/init
12+
COPY --from=builder /go/src/github.com/ovh/utask/utask /app/utask
13+
RUN chmod +x /app/utask

LICENSE

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2013-2019, OVH SAS
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MAINTAINERS

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# This is the official list of the project maintainers.
2+
# This is mostly useful for contributors that want to push
3+
# significant pull requests or for project management issues.
4+
#
5+
#
6+
# Names should be added to this file like so:
7+
# Individual's name <submission email address>
8+
# Individual's name <submission email address>
9+
#
10+
# Please keep the list sorted.
11+
#
12+
13+
Pablo Pérez Schröder <[email protected]>
14+
Thomas Schaffer <[email protected]>

Makefile

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
BINARY = utask
2+
3+
MAIN_LOCATION = ./cmd
4+
TEST_LOCATION = ./...
5+
6+
TEST_CMD = go test -v -cover ${TEST_LOCATION}
7+
8+
VERSION = 1.0.0
9+
LAST_COMMIT = `git rev-parse HEAD`
10+
VERSION_PKG = github.com/ovh/utask
11+
12+
DOCKER = 0
13+
DOCKER_OPT =
14+
15+
define build_binary
16+
GO111MODULE=on go get -d -v ./...
17+
GO111MODULE=on go build -ldflags "-X ${VERSION_PKG}.Commit=${LAST_COMMIT} -X ${VERSION_PKG}.Version=${VERSION}" \
18+
-o $(1) ${MAIN_LOCATION}/$(1)
19+
@[ ${DOCKER} -eq 0 ] || $(call docker_build,$(1))
20+
endef
21+
22+
define docker_build
23+
docker build ${DOCKER_OPT} -f ${MAIN_LOCATION}/$(1)/Dockerfile .
24+
endef
25+
26+
all: ${BINARY}
27+
28+
${BINARY}:
29+
$(call build_binary,${BINARY})
30+
31+
generate:
32+
go get github.com/ybriffa/jsonenums
33+
go get golang.org/x/tools/cmd/stringer
34+
go generate ./...
35+
36+
docker:
37+
@echo docker build enabled!
38+
$(eval DOCKER=1)
39+
40+
clean:
41+
rm -f ${BINARY}
42+
43+
re: clean all
44+
45+
test:
46+
go get github.com/jstemmer/go-junit-report
47+
go get github.com/stretchr/testify/assert
48+
GO111MODULE=on DEV=true bash test.sh ${TEST_CMD} 2>&1 | go-junit-report > report.xml
49+
50+
test-docker:
51+
DEV=true bash test-docker.sh ${TEST_CMD}
52+
53+
run-test-stack:
54+
bash test.sh bash interactive.sh
55+
56+
run-test-stack-docker:
57+
bash test-docker.sh bash interactive.sh
58+
59+
package:

Makefile-child

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
all:
2+
GO111MODULE=on go get -d -v ./...
3+
GO111MODULE=on go build -o utask ./cmd/utask
4+
for p in $$(ls ./plugins); do if [ -d ./plugins/$$p ]; then GO111MODULE=on go build --buildmode=plugin -o ./plugins/$$p.so ./plugins/$$p/*.go; fi; done
5+
for p in $$(ls ./init); do if [ -d ./init/$$p ]; then GO111MODULE=on go build --buildmode=plugin -o ./init/$$p.so ./init/$$p/*.go; fi; done
6+
7+
clean:
8+
rm -f utask
9+
rm -f plugins/*.so
10+
rm -f init/*.so
11+
12+
package:

0 commit comments

Comments
 (0)