Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Travis - Multiarch Builds, Autopublish on Docker-Hub and Security Scan with trivy #70

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
17b56f7
Merge pull request #3 from zetaab/feature/oidc_group
herbrandson Apr 2, 2019
8ac2f21
typo fix
complexsplit Apr 2, 2019
fb88fba
Merge pull request #4 from complexsplit/master
herbrandson Apr 2, 2019
24b2d47
Lazily request docs (so we don't request them before we've auth-ed)
Apr 2, 2019
74ce499
Chart added
Apr 3, 2019
c2f5d8c
Merge pull request #8 from IvanKirianov/dev
herbrandson Apr 3, 2019
dcfd2f1
Refactoring. Better charts. Fixed a bug parsing cpu usage. Using a be…
Apr 4, 2019
3642a26
nodeport yaml provided and readme updated for faster up-and-running o…
StevenPG Apr 6, 2019
9f4970a
Merge pull request #9 from StevenPG/dev
herbrandson Apr 6, 2019
24a6001
Adding sorting by cpu/ram support to nodes view. Some better error ha…
Apr 6, 2019
6464e70
Merge branch 'dev' of github.com:herbrandson/k8dash into dev
Apr 6, 2019
ef55ce7
Adding ingress.yaml to helm chart
Apr 6, 2019
42d5c26
Fix parsing disk space / ram
frohikey Apr 7, 2019
7c2f6d7
Switching router to solve issue w/ routing to urls with colons in the…
Apr 7, 2019
9287513
Helper function parseUnitsOfBytes
frohikey Apr 7, 2019
e93925f
Merge pull request #10 from frohikey/dev
herbrandson Apr 7, 2019
d59174f
Some styling efforts
Apr 7, 2019
08803dc
Merge branch 'dev' of github.com:herbrandson/k8dash into dev
Apr 7, 2019
b9b4907
Fixing issue w/ opening links in new tabs showing a 'page not found' …
Apr 9, 2019
5696146
Fixing bug with viewing namespaces
Apr 9, 2019
b4d816b
Initial work on responsive/mobile design
Apr 11, 2019
512c5a0
Wrapping up responsive design overhaul
Apr 13, 2019
275a977
Improving ios installed app experience
Apr 13, 2019
fc00861
Cleaning up a few small issues w/ responsive design
Apr 15, 2019
aad1405
Small fix to colSpan on workloads.
Apr 15, 2019
3749f07
A lot of charts work
Apr 17, 2019
f5233b5
Merge pull request #18 from herbrandson/charts
herbrandson Apr 19, 2019
24028d0
More stying of charts
Apr 20, 2019
9d99053
Small styling change for nodesPanel
Apr 20, 2019
0326db2
Adding more columns to pods/nodes to better display reservations and …
Apr 20, 2019
8e6d22c
Creating custom donut chart with animations
Apr 24, 2019
f291f32
Adding missing file
Apr 24, 2019
a9f1055
Merge branch 'stats' into dev
Apr 24, 2019
502bc40
Refactoring. More chart clean up. Improving sorting by pod resources.
Apr 24, 2019
b0b1a14
Set theme jekyll-theme-cayman
herbrandson Apr 25, 2019
89a7751
Packaging helm charts for deployment via helm hub
Apr 25, 2019
c44a2b4
Removing an old comment
May 1, 2019
60b075a
Merge branch 'master' of github.com:herbrandson/k8dash
May 1, 2019
f443819
Moving helm files into specific directory
May 1, 2019
d028f1c
Actually adding the helm files this time
May 1, 2019
6308d00
Fixing issue w/ text being cut off in the menu
May 2, 2019
0a60825
One more small fix for menu text cutoff
May 2, 2019
8de4c88
Better support for non-admin RBAC roles
May 15, 2019
9dcf91c
Fixing bug with Yaml not wrapping correctly in Firefox/Safari
May 17, 2019
65a424d
Enabling ability for k8dash to be served from non-root urls
May 18, 2019
ee663ca
Setting a 'base' tag to index.html to enable serving k8dash from non-…
May 19, 2019
d8524aa
Replacing 'page' npm package with custom router
May 20, 2019
3dbff38
Fixing bug with 'logs' and 'exec' paths (missing shebangs)
May 20, 2019
6381411
ensure k8dash scheduled on linux nodes
KnicKnic May 21, 2019
cc3eb0d
Merge pull request #24 from KnicKnic/master
herbrandson May 21, 2019
7695d15
Initial work at hide menu items based on user roles
Jun 7, 2019
3dbfbf0
Small fix to helm chart
Jun 7, 2019
ed0ee73
Merge branch 'master' into dev
Jun 7, 2019
da90409
Small fix to Helm chart
Jun 8, 2019
b5c1d32
Making names in EventPanel into links
Jun 13, 2019
dd9ed6d
Update npm and node dependencies
Jun 14, 2019
910f79b
Smart login doesn't loose the original url
Jun 14, 2019
d290b91
Improvements to the logging ui. Correctly decoding unicode chars. Ini…
Jun 18, 2019
5fd5a4d
Updating the readme to indicate that kubectl proxy cannot be used to …
Jun 19, 2019
a9854e9
Better icon styling to indicate various states
Jun 22, 2019
e7dab82
Adding ability to pass authorization headers recieved from the GET fo…
Jun 22, 2019
9ca05ad
A bit of performance work
Jun 22, 2019
f1f9cf5
Removing moment.js (a bit of perf gain)
Jun 22, 2019
4dadf69
Merge branch 'dev' into rules
Jun 22, 2019
c13552b
Limit menu options based on accounts permissions
Jun 23, 2019
14986ca
Fixing bug with displaying correct menu items when using oidc. Other …
Jun 24, 2019
ce84ab6
Fixing regression with invalid jwt being passed to the 'watch' apis
Jun 24, 2019
611a1a1
Support k8s cluster with parameter
titilambert Jul 10, 2019
67c4938
Merge pull request #33 from titilambert/master
herbrandson Jul 10, 2019
7d77419
Use humanize-duration to better format duration (mo, m, ms)
olivergg Dec 16, 2019
cbd9aa4
#47: Treat token as password field
paullryan Dec 25, 2019
b756157
Merge pull request #48 from nomadreservations/feature/47-autocomplete
herbrandson Jan 3, 2020
67493fb
Merge pull request #46 from olivergg/improve_duration_frmat
herbrandson Jan 3, 2020
5d72fd9
Bump lodash from 4.17.11 to 4.17.15 in /server
dependabot[bot] Jan 3, 2020
3c29c52
Merge pull request #51 from herbrandson/dependabot/npm_and_yarn/serve…
herbrandson Jan 3, 2020
8e3c4ba
Add anchor link for metadata values that match valid URLs
olivergg Jan 4, 2020
4fb83ca
Show job duration in job detail
olivergg Jan 5, 2020
06770cc
Merge pull request #54 from olivergg/show_job_duration
herbrandson Jan 15, 2020
98d7a20
Merge pull request #53 from olivergg/href_for_urls_in_metadata
herbrandson Jan 15, 2020
00c49c2
Support for multiple ingress paths
Jan 30, 2020
c78962c
Typo in chart archive
Jan 30, 2020
d89ad48
helmignore
Jan 30, 2020
657a43f
Typo
Jan 30, 2020
ac31064
Merge branch 'helm0.0.1'
Jan 30, 2020
ba83355
Service account yaml
Jan 30, 2020
a7835c8
fix deprecated api versions
Jan 31, 2020
1d5bf7c
Update Dockerfile for Multiarch support
Feb 5, 2020
7544884
Update Dockerfile for Multiarch support
Feb 5, 2020
c6509b3
Merge pull request #64 from ConnorGraham/helm0.0.1
herbrandson Feb 6, 2020
27fa02d
Merge pull request #63 from ConnorGraham/master
herbrandson Feb 6, 2020
7867dbd
Merge pull request #65 from turbosquid/issues/apiVersion
herbrandson Feb 6, 2020
fdb9190
Merge branch 'master' of git://github.com/herbrandson/k8dash
Feb 10, 2020
ccf5320
Merge branch 'master' of git://github.com/herbrandson/k8dash
Feb 10, 2020
4993395
update deps, replace node-sass with sass
Feb 11, 2020
53a3924
update deps, replace node-sass with sass
Feb 11, 2020
55abb42
Fix security issues reported by trivy
Feb 14, 2020
a075ccb
Add travis config
Feb 14, 2020
a962cc9
Update Travis & Dockerfile
Feb 14, 2020
ef050cc
Merge branch 'master' of https://github.com/thiscantbeserious/k8dash
Feb 14, 2020
c8ebb63
Fix brain
Feb 14, 2020
d03f06e
Update Travis to build
Feb 14, 2020
487cd62
Update Travis
Feb 14, 2020
7ac2d42
Update travis
Feb 14, 2020
c1297f9
Update Travis
Feb 14, 2020
54b825d
Update travis
Feb 15, 2020
fa185f2
Update travis
Feb 15, 2020
b101ff2
Update travis
Feb 15, 2020
eb83710
Update travis
Feb 15, 2020
57386c3
Update travis
Feb 15, 2020
93cf4de
Update travis
Feb 15, 2020
6bb4876
Update travis
Feb 15, 2020
c4d79cb
Update travis
Feb 15, 2020
eeb5dbe
Update travis
Feb 15, 2020
f605dd2
Update travis
Feb 15, 2020
a87417f
Update travis
Feb 15, 2020
e08a8a4
Update travis
Feb 15, 2020
bc5d97e
Update Dockerfile to improve Caching for NPM-Packages
Feb 16, 2020
8579de6
Update Dockerfile to improve Caching for NPM-Packages
Feb 16, 2020
c684399
Merge branch 'master' of https://github.com/thiscantbeserious/k8dash
Feb 16, 2020
c3ed9f6
Speed up Multiarch-Build for Travis
Feb 17, 2020
6c481d3
Update travis
Feb 17, 2020
5f00168
Finalize Dockerfile for Multiarch-Build & Optimize Travis-Config to p…
Feb 17, 2020
7500d1b
Finalize Travis config
Feb 17, 2020
ad43afd
Finalize Travis config
Feb 17, 2020
ec87f03
Finalize Travis config
Feb 17, 2020
8a34812
Added Travis build-status
thiscantbeserious Feb 17, 2020
4a76336
Update README.md
thiscantbeserious Feb 18, 2020
548e48a
Switch to herbrandson/k8dash
thiscantbeserious Feb 18, 2020
9fde86e
Update README.md
thiscantbeserious Feb 18, 2020
6c3db24
Code-review fixes
Mar 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
language: generic
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not tried using travis-ci w/ an open source project before, but I absolutely love that you've added this :)

Is there anything that will needs to be configured at travis-ci.com to make this work?

Copy link
Author

@thiscantbeserious thiscantbeserious Feb 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you need to generate an API-Token on Docker Hub and add that to the Travis Project via the HUB_TOKEN Environment Variable and you also need to set HUB_USER to your accoutname.

See here:

https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-settings

Afterwards Travis will publish it automatically on Docker Hub after each commit.

Btw. I only used it once myself but I loved the idea of being able to work remotely on my Chromebook and Travis doing the heavy duty for me (not just testing) so I gave it a go.

Guess I'll do that more often from now on, since I like the result. :) ...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I kinda love this idea :)

However, I need a bit to get this all wired up. It also makes for multiple large and only semi related changes in the PR. How would you feel about pulling the travis.yml file out into a separate PR? Everything else LGTM and I'd love to be able to merge it asap.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry. One other comment on your last comment above. I currently have it configured so DockerHub watches GitHub for changes and automatically does this build there. I think that's the same thing you were going for via Travis. Any advantages to moving that build out of DockerHub and into Travis?

services:
- docker
env:
global:
- HUB_REPO=herbrandson/k8dash
- BINFMT_TAG=a7996909642ee92942dcd6cff44b9b95f08dad64
- COMMIT=${TRAVIS_COMMIT::8}
- DOCKER_CLI_EXPERIMENTAL=enabled
cache:
directories:
- docker_images
- $HOME/.cache/trivy
before_cache:
- docker save -o docker_images/images.tar $(docker images -a -q)
before_install:
- sudo apt-get -y update || true
- sudo apt-get -y install qemu-system-arm qemu-user-static binfmt-support
- docker run --rm --privileged docker/binfmt:${BINFMT_TAG}
- sudo update-binfmts --display
- curl -fsSL https://get.docker.com -o get-docker.sh
- sudo sh get-docker.sh
- echo ${HUB_TOKEN} | docker login --username ${HUB_USER} --password-stdin
- docker load -i docker_images/images.tar || true
- docker buildx create --use
- docker buildx build ./ --platform=linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/i386 -t ${HUB_REPO}:${COMMIT} -t ${HUB_REPO}:latest --push
- docker save -o docker_images/images.tar $(docker images -a -q)
- export VERSION=$(curl --silent "https://api.github.com/repos/aquasecurity/trivy/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
- wget https://github.com/aquasecurity/trivy/releases/download/v${VERSION}/trivy_${VERSION}_Linux-64bit.tar.gz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious... any reason you're using wget here and curl above?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy & Paste from the individual snippets :))

- tar zxvf trivy_${VERSION}_Linux-64bit.tar.gz
script:
- ./trivy --exit-code 0 --severity HIGH --no-progress ${HUB_REPO}:${COMMIT}
- ./trivy --exit-code 1 --severity CRITICAL --no-progress ${HUB_REPO}:${COMMIT}
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
# Stage 1 - the build react app
FROM node:12.4.0-alpine as build-deps
# Stage 1 - install the heavy dependencies
FROM --platform=$BUILDPLATFORM node:lts-alpine as build-deps
WORKDIR /usr/src/app
COPY client/package.json client/package-lock.json ./
RUN npm i
RUN npm install --quiet
thiscantbeserious marked this conversation as resolved.
Show resolved Hide resolved

# Stage 2 - the build react app
FROM --platform=$BUILDPLATFORM node:lts-alpine as build
COPY --from=build-deps /usr/src/app/node_modules /usr/src/app/node_modules
WORKDIR /usr/src/app
COPY client/ ./
RUN npm run build

# Stage 2 - the production environment
FROM node:12.4.0-alpine

# Stage 3 - the production environment
FROM --platform=$TARGETPLATFORM node:lts-alpine as runtime
RUN apk add --no-cache tini
ENV NODE_ENV production
WORKDIR /usr/src/app
RUN chown -R node:node /usr/src/app/
EXPOSE 4654

COPY server/package.json server/package-lock.json ./
RUN npm i --production
RUN npm install --production --quiet

COPY --from=build-deps /usr/src/app/build /usr/src/app/public
COPY --from=build /usr/src/app/build /usr/src/app/public
COPY /server ./

USER node
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![Build Status](https://travis-ci.com/herbrandson/k8dash.svg?branch=master)](https://travis-ci.com/herbrandson/k8dash) - automatically built and published on [Docker Hub](https://hub.docker.com/repository/docker/herbrandson/k8dash/tags) via the :latest and :commit-id(:8) tag.

Builds are scanned with [trivy](https://github.com/aquasecurity/trivy) for exploits in base-container and/or npm-dependencies.

# K8Dash - Kubernetes Dashboard

K8Dash is the easiest way to manage your Kubernetes cluster. Why?
Expand Down Expand Up @@ -137,4 +141,4 @@ For the client, move to the `/client` directory, run `npm i` and then `npm start

## License

[Apache License 2.0](https://raw.githubusercontent.com/herbrandson/k8dash/master/LICENSE)
[Apache License 2.0](https://raw.githubusercontent.com/herbrandson/k8dash/master/LICENSE)
Loading