Skip to content

Commit e0075d1

Browse files
committed
initial commit
0 parents  commit e0075d1

Some content is hidden

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

64 files changed

+6116
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
.idea/
3+
4+
build/
5+
dist/
6+
7+
.cr-release-packages/

.golangci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
run:
2+
deadline: 5m

.goreleaser.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
env:
2+
- GO111MODULE=on
3+
- CGO_ENABLED=0
4+
before:
5+
hooks:
6+
- go mod download
7+
8+
builds:
9+
- id: lighthouse-webui-plugin
10+
# Path to main.go file or main package.
11+
# Default is `.`.
12+
main: ./cmd/server/main.go
13+
14+
# Binary name.
15+
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
16+
# Default is the name of the project directory.
17+
binary: lighthouse-webui-plugin
18+
19+
# Custom ldflags templates.
20+
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
21+
ldflags:
22+
- -X "github.com/jenkins-x-plugins/lighthouse-webui-plugin/internal/version.Version={{.Env.VERSION}}" -X "github.com/jenkins-x-plugins/lighthouse-webui-plugin/internal/version.Revision={{.Env.REV}}" -X "github.com/jenkins-x-plugins/lighthouse-webui-plugin/internal/version.Date={{.Env.BUILDDATE}}"
23+
24+
# GOOS list to build for.
25+
# For more info refer to: https://golang.org/doc/install/source#environment
26+
# Defaults are darwin and linux.
27+
goos:
28+
- windows
29+
- darwin
30+
- linux
31+
32+
# GOARCH to build for.
33+
# For more info refer to: https://golang.org/doc/install/source#environment
34+
# Defaults are 386 and amd64.
35+
goarch:
36+
- amd64
37+
- arm
38+
- arm64
39+
40+
archives:
41+
- name_template: "lighthouse-webui-plugin-{{ .Os }}-{{ .Arch }}"
42+
format_overrides:
43+
- goos: windows
44+
format: zip
45+
46+
checksum:
47+
# You can change the name of the checksums file.
48+
# Default is `lighthouse-webui-plugin_{{ .Version }}_checksums.txt`.
49+
name_template: "lighthouse-webui-plugin-checksums.txt"
50+
51+
# Algorithm to be used.
52+
# Accepted options are sha256, sha512, sha1, crc32, md5, sha224 and sha384.
53+
# Default is sha256.
54+
algorithm: sha256
55+
56+
changelog:
57+
# set it to true if you wish to skip the changelog generation
58+
skip: true
59+
60+
release:
61+
# If set to true, will not auto-publish the release.
62+
# Default is false.
63+
draft: false
64+
65+
# If set to auto, will mark the release as not ready for production
66+
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
67+
# If set to true, will mark the release as not ready for production.
68+
# Default is false.
69+
prerelease: false
70+
71+
# You can change the name of the GitHub release.
72+
# Default is `{{.Tag}}`
73+
name_template: "{{.Env.VERSION}}"
74+

.helmignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
22+
*.png
23+
24+
# known compile time folders
25+
target/
26+
node_modules/
27+
vendor/
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apiVersion: tekton.dev/v1beta1
2+
kind: PipelineRun
3+
metadata:
4+
creationTimestamp: null
5+
name: pullrequest
6+
spec:
7+
pipelineSpec:
8+
tasks:
9+
- name: from-build-pack
10+
resources: {}
11+
taskSpec:
12+
metadata: {}
13+
stepTemplate:
14+
image: uses:jenkins-x/jx3-pipeline-catalog/tasks/go-plugin/pullrequest.yaml@versionStream
15+
name: ""
16+
resources:
17+
requests:
18+
cpu: 400m
19+
memory: 600Mi
20+
workingDir: /workspace/source
21+
steps:
22+
- image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone-pr.yaml@versionStream
23+
name: ""
24+
resources: {}
25+
- name: jx-variables
26+
resources: {}
27+
- name: build-make-linux
28+
resources: {}
29+
- name: build-make-test
30+
resources: {}
31+
- name: build-container-build
32+
resources: {}
33+
podTemplate: {}
34+
serviceAccountName: tekton-bot
35+
timeout: 240h0m0s
36+
status: {}

.lighthouse/jenkins-x/release.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apiVersion: tekton.dev/v1beta1
2+
kind: PipelineRun
3+
metadata:
4+
creationTimestamp: null
5+
name: release
6+
spec:
7+
pipelineSpec:
8+
tasks:
9+
- name: chart
10+
resources: {}
11+
taskSpec:
12+
metadata: {}
13+
stepTemplate:
14+
image: uses:jenkins-x/jx3-pipeline-catalog/tasks/go-plugin/release.yaml@versionStream
15+
name: ""
16+
resources: {}
17+
workingDir: /workspace/source
18+
steps:
19+
- image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone.yaml@versionStream
20+
name: ""
21+
resources: {}
22+
- name: next-version
23+
resources: {}
24+
- name: jx-variables
25+
resources: {}
26+
- name: release-binary
27+
resources: {}
28+
- name: build-and-push-image
29+
resources: {}
30+
- name: chart-docs
31+
resources: {}
32+
- name: changelog
33+
resources: {}
34+
- name: release-chart
35+
resources: {}
36+
- name: upload-binaries
37+
resources: {}
38+
- name: promote-release
39+
resources: {}
40+
serviceAccountName: tekton-bot
41+
timeout: 240h0m0s
42+
status: {}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: config.lighthouse.jenkins-x.io/v1alpha1
2+
kind: TriggerConfig
3+
spec:
4+
presubmits:
5+
- name: pr
6+
context: "pr"
7+
always_run: true
8+
optional: false
9+
source: "pullrequest.yaml"
10+
postsubmits:
11+
- name: release
12+
context: "release"
13+
source: "release.yaml"
14+
branches:
15+
- ^main$
16+
- ^master$

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM alpine:3.13
2+
3+
RUN apk add --no-cache ca-certificates \
4+
&& adduser -D -u 1000 jx
5+
6+
COPY ./web/static /app/web/static
7+
COPY ./web/templates /app/web/templates
8+
COPY ./build/linux/lighthouse-webui-plugin /app/
9+
10+
WORKDIR /app
11+
USER 1000
12+
13+
ENTRYPOINT ["/app/lighthouse-webui-plugin"]

0 commit comments

Comments
 (0)