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

Main Merge #99

Merged
merged 22 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion .github/workflows/check_commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)'
pattern: '^(Merge branch ''main'' into develop)|(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)'
error: 'Commit messages do not follow https://www.conventionalcommits.org/en/v1.0.0/'
- name: Get Changed Files
uses: tj-actions/[email protected]
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,18 @@ jobs:
run: |
cat build/Dockerfile.prefix > Dockerfile
cat "flavour/${{ matrix.flavour.name }}/Dockerfile.flavour" >> Dockerfile

# Download mo
curl -sSL https://raw.githubusercontent.com/tests-always-included/mo/master/mo -o mo
chmod +x mo

cat build/Dockerfile.suffix.mo | BUILD_DATE=$(date -Iseconds) FLAVOUR=${{ matrix.flavour.name }} ./mo > build/Dockerfile.suffix

cat build/Dockerfile.suffix >> Dockerfile

rm mo
env:
FLAVOUR: "${{ matrix.flavour.name }}"

- name: Clean up Docker
run: |
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@ jobs:
run: |
cat build/Dockerfile.prefix > Dockerfile
cat "flavour/${{ matrix.flavour }}/Dockerfile.flavour" >> Dockerfile

# Download mo
curl -sSL https://raw.githubusercontent.com/tests-always-included/mo/master/mo -o mo
chmod +x mo

cat build/Dockerfile.suffix.mo | BUILD_DATE=$(date -Iseconds) FLAVOUR=${{ matrix.flavour }} ./mo > build/Dockerfile.suffix

cat build/Dockerfile.suffix >> Dockerfile

rm mo
- name: build flavour container
id: build-and-push
uses: docker/[email protected]
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@ Installs and configures [Terraform](https://terraform.io)
than the default is used, the volume-target needs to be adapted to the same directory
* Environment TERRAFORM_CREDENTIALS_PATH: Volume target for terraform credentials (optional). Defaults to `/terraform`. If something
different than the default is used, the volume-target needs to be adapted to the same directory
* If you used the browser based login in gcloud, you'll probably need to authenticate using the application-default
login using the gcloud cli by running

gcloud auth application-default login

### <a id="terragrunt"></a> Terragrunt

Expand Down
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ for FLAVOUR in ${FLAVOURS}
do
cat build/Dockerfile.prefix > Dockerfile
cat "flavour/${FLAVOUR}/Dockerfile.flavour" >> Dockerfile
cat build/Dockerfile.suffix >> Dockerfile
cat build/Dockerfile.suffix.mo | docker run --rm -i -e FLAVOUR=${FLAVOUR} -e BUILD_DATE=$(date -Iseconds) metal3d/mo >> Dockerfile
docker build --pull . -t "ghcr.io/dodevops/cloudcontrol-${FLAVOUR}:${TAG}"
done

Expand Down
4 changes: 2 additions & 2 deletions build/Dockerfile.prefix
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM node:lts-slim as cccClientBuild

WORKDIR /build
COPY ccc/client /build
COPY ccc-client /build
RUN npm config set update-notifier false
RUN npm install
RUN npm run-script build
RUN npm run-script build -- --base=/client/

FROM golang:1.19 AS cccBuild

Expand Down
26 changes: 0 additions & 26 deletions build/Dockerfile.suffix

This file was deleted.

37 changes: 37 additions & 0 deletions build/Dockerfile.suffix.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Features

COPY feature /home/cloudcontrol/feature-installers
COPY assets/feature-installer-utils.sh /

# CCC

COPY --from=cccBuild /build/ccc /usr/local/ccc/ccc
RUN chmod +x /usr/local/ccc/ccc

COPY --from=cccClientBuild /build/dist /usr/local/ccc/client

# Cloud control

COPY assets/cloudcontrol.sh /usr/local/bin/cloudcontrol
RUN chmod +x /usr/local/bin/cloudcontrol

# Chown

RUN chown cloudcontrol -R /home/cloudcontrol

EXPOSE 8080
USER cloudcontrol
ENTRYPOINT ["/usr/local/bin/cloudcontrol"]
WORKDIR /home/cloudcontrol
CMD ["serve"]

# Labels

LABEL io.artifacthub.package.readme-url=https://github.com/dodevops/cloudcontrol
LABEL org.opencontainers.image.created={{BUILD_DATE}}
LABEL org.opencontainers.image.description="The cloud engineer's toolbox - {{FLAVOUR}} flavour"
LABEL org.opencontainers.image.documentation=https://github.com/dodevops/cloudcontrol
LABEL org.opencontainers.image.source=https://github.com/dodevops/cloudcontrol
LABEL org.opencontainers.image.title="cloudcontrol-{{FLAVOUR}}"
LABEL org.opencontainers.image.url=https://github.com/dodevops/cloudcontrol
LABEL org.opencontainers.image.vendor="DO! DevOps"
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
> 1%
last 2 versions
not dead
not ie 11
5 changes: 5 additions & 0 deletions ccc-client/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
6 changes: 0 additions & 6 deletions ccc/client/.gitignore → ccc-client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
node_modules
/dist

/tests/e2e/videos/
/tests/e2e/screenshots/


# local env files
.env.local
Expand All @@ -24,6 +21,3 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?

src/**/*.js
src/**/*.js.map
53 changes: 53 additions & 0 deletions ccc-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# default

## Project setup

```
# yarn
yarn

# npm
npm install

# pnpm
pnpm install

# bun
bun install
```

### Compiles and hot-reloads for development

```
# yarn
yarn dev

# npm
npm run dev

# pnpm
pnpm dev

# bun
bun run dev
```

### Compiles and minifies for production

```
# yarn
yarn build

# npm
npm run build

# pnpm
pnpm build

# bun
bun run build
```

### Customize configuration

See [Configuration Reference](https://vitejs.dev/config/).
21 changes: 21 additions & 0 deletions ccc-client/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CloudControl</title>
</head>

<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>

</html>
Loading
Loading