Commit Graph

402 Commits

Author SHA1 Message Date
Andrew Dryga
28fe571543 Small improvements to make setup process easier for OS contributors (#1171)
* Remove _build folders for umbrella apps

For umbrella apps everything goes into /_build directory so there no need to ignore directories that should never be created

* Change mix aliases to be more aligned with what OS community would expect

1. We want ecto.create and ecto.migrate to be run on each tests, this will simplify setup steps (no need to run migrations manually)

2. ecto.remigrate is not needed because now you can just run ecto.drop and on tests migrations would be executed anyways.

* Rename docker-compose step name in CONTRIBUTING.md

The step was renamed here: dd67baf629 (diff-67a4805fdcc6145d7b3ada2a6099a9b2e91c9d0fd108c22f95d2f01d219793d1R10)

* Remove .devcontainer

This an is opinionated change. Right now devcontainer doesn't work but should be easy to fix (with renaming step name), but at the same time it forces developers that use VS code to have unified development environment (including plugins for the editor itself).

I feel like it's not a good path to go for OS and for small team - everyone should be allowed to use setup they like. Especially for people like me that tend to recompile ls-elixir for Elixir plugin from master branch.

Plus it's yet another thing to maintain while nobody on the team is using it, which means it will be always causing issues.

* Make fz_http mix.exs aliases aligned with umbrella app ones

* Redirect stderr to stdout in a command called from dev.exs

Otherwise I'm getting this on my MacOS (that has a `route` implementation that doesn't show interfaces) when `mix phx.server` is executed:
```
usage: route [-dnqtv] command [[modifiers] args]
```

* Fix race condition due to static device field values

Both public_key and name are unique and we should not use static values for field covered by unique index, otherwise deadlocks and slow tests are expected.

* Remove unwanted transaction block

The changeset code doesn't have any code that accesses the database and individual Ecto.SQL commands are already wrapped in transactions by default, so there is no need to start it manually and hold for longer than expected (while irrelevant Elixir code is running).

* Use netstat to identify egress interface on MacOS

* Rename uninstall.sh to omnibus-uninstall.sh

* Fix uninstall path in omnibus_build.yml
2022-12-06 15:07:45 -08:00
Jamil
7a1ffd8c4f Fix build cache
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2022-11-28 21:20:24 -08:00
dependabot[bot]
990b36fa5f Bump akhilerm/tag-push-action from 2.0.0 to 2.1.0 (#1152)
Bumps [akhilerm/tag-push-action](https://github.com/akhilerm/tag-push-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/akhilerm/tag-push-action/releases)
- [Commits](https://github.com/akhilerm/tag-push-action/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: akhilerm/tag-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 08:27:51 -08:00
Jamil
157ac0bb38 run checks on master too (#1143) 2022-11-23 23:14:36 -08:00
Gabi
116de06bf4 Disallow netmasks in devices' ip to prevent overlaps in firewall (#1140)
* fix: disallow netmasks in devices' ip to prevent overlaps in firewall

/32 is still allowed for ipv4 and /128 is still allowed for ipv6.
No migration is needed since netmasks for devices ips were broken
before-hand.

* chore: rename `validate_single_ip` function and reword its error message

* Update pre-commit to allow slash

* fix restore cache

* Refactor a bit

* Fix clobbered restore-keys

* Break cache

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2022-11-23 22:56:22 -08:00
Kian-Meng Ang
ec5f0e24ae Fix typos (#1141)
Found via `codespell -S omnibus,*.json,yarn.lock,seeds.exs -L keypair,keypairs,iif,statics,wee`
2022-11-23 21:42:54 -08:00
Jamil
1988cbe1de Change restart policy to unless-stopped (#1138)
* restart: unless-stopped

* Use updated ruby action
2022-11-23 16:13:37 -08:00
Jamil
ddcbc4dbd5 Remove nodejs from test workflow (#1131) 2022-11-18 11:18:34 -08:00
Jamil
1054de6585 Fix intermittent assert_{patched,redirected} failures (#1125)
* Fix intermittent assert_{patched,redirected} failures

* Split into two

* Remove empty file dope
2022-11-17 11:58:58 -08:00
Jamil
afe50ad248 Conventional Commits (#1116)
* chore: add conventional-commits

* Use branch for conventional commits

* Remove dupe workflow 🔨
2022-11-16 08:28:51 -08:00
dependabot[bot]
de4a010e7a Bump andstor/file-existence-action from 1 to 2 (#1080)
Bumps [andstor/file-existence-action](https://github.com/andstor/file-existence-action) from 1 to 2.
- [Release notes](https://github.com/andstor/file-existence-action/releases)
- [Commits](https://github.com/andstor/file-existence-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: andstor/file-existence-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 10:46:23 -07:00
dependabot[bot]
a59dc78dc5 Bump actions/cache from 3.0.10 to 3.0.11 (#1029)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.10 to 3.0.11.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.0.10...v3.0.11)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 15:20:32 -07:00
dependabot[bot]
fc8fc52cec Bump JamesIves/github-pages-deploy-action from 4.4.0 to 4.4.1 (#1030)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/v4.4.0...v4.4.1)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-17 15:19:59 -07:00
Jamil
bccebca359 Try cleaning docs (#1034) 2022-10-17 10:40:28 -07:00
Jamil
4d08083f0f Fix build artifact download (#1032) 2022-10-17 08:52:02 -07:00
Jamil
d963929c07 0.6.0 (#1004)
* 0.6.0

* Make OIDC and SAML user provisioning configurable per-provider (#1015)

* Got ugly migration to work

* Move auto_create_users to per-provider config

* Update deps to bust cache

* Update Process sleep

* Update docs with Auto create users

* working migration script (#1013)

* Add telem for Docker and SAML (#1020)

* Add telem for Docker and SAML

* Omit unneeded format
2022-10-13 15:22:53 -07:00
dependabot[bot]
ae88cc17d9 Bump actions/cache from 2 to 3.0.10 (#997)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.0.10.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3.0.10)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-03 22:36:47 -05:00
Jamil
dd67baf629 Build docker image in build workflow; Update automatic install to use Docker (#983)
* Test docker prod build in CI

* Need uses

* Set build-args

* Split builds

* Fix build-args format

* wtf

* hmmm

* Jeebus

* build version based on drafted release

* Build multi-platform images

* Only build for supported platforms

* Use newer OTP fingers crossed

* Use OTP 24 for arm64

* Finalize test build of Docker image

* Update comment

* Bump to OTP 25.1

* Use proper ver

* D'oh proper sha

* Use OTP 24 and install python for node build

* Use new Docker base

* Use python3

* Use newly-built base images with other platform support

* Don't build for ppc64le and s390x

* Build only for amd64/arm64

* Don't rebuild on publish; simply copy

* See where the image is being pushed

* Remove echo

* Add docker updates

* Match platforms from base image

* Use docker-compose over docker compose

* Use our own base

* we need python3

* use consistent service name

* trim trailing slash from external_url

* Build for latest tag in staging
2022-09-29 08:20:32 -05:00
Jamil
7861977379 (Supercedes #950) Bump elixir (#953)
* Bump elixir to 1.14.0

* gen_env -> compile_env

* Update Dockerfiles

* Update software
2022-09-12 14:40:16 -07:00
dependabot[bot]
befbc748d8 Bump actions/checkout from 2 to 3 (#951)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-12 12:26:47 -07:00
Jamil
ea67535f9a Bump runtimes; deps; postgres 13.5 -> 13.8 (#944)
* Bump deps; runtimes; pg to 13.8

* bump npm deps

* Bump nginx

* Use PCRE over PCRE2
2022-09-01 21:08:37 -07:00
Jamil
41ff3c3b3f Cache node deps; fix minor docs typos (#923)
* Minor typo fixes

* cache node deps

* Remove unneeded script

* Remove unneeded script

* Remove redundant lint-docs step...

* Cache nodejs for static anal

* npm ci before use

* limit markdownlint to docs for now

* Move markdownlint config to root
2022-08-18 21:01:04 -07:00
Po Chen
6c2703869e Use Dockerfile.prod (#915)
Signed-off-by: Po Chen <chenpaul914@gmail.com>

Signed-off-by: Po Chen <chenpaul914@gmail.com>
2022-08-11 11:19:04 -07:00
Po Chen
9505d70f91 Prod image (#887)
* rename dockerfile

* use renamed dockerfile

* add Dockerfile.prod

* digest

* add publish image workflow

* add helper scripts

* start example docker compose

* fix workflow

* stage

* chmod

* stage

* nft

* must be root

* create path

* list address

* try alpine again

* remove nobody

* fix shared lib

* set wireguard endpoint

* config interface and route before starting server

* fix env var name

* move env var defaults into dockerfile

* persist private key

* migrate on start

* add create-or-reset-admin

* link env values

* clean up

* fix permission

* rename service

* add deploy

* persist pg data

* build version

* set version on build

* add gen_secrets

* fix typo

* move version to the end

* move up a little

* use map_join

* remove gen_secrets

* add gen-env

* cat

* gen more

* add telemetry
2022-08-10 14:42:38 -07:00
Jamil
d0499ae592 Don't fail fast for publishing to Cloudsmith (#870) 2022-07-28 14:41:34 -07:00
Jamil
da059e05ff Update publish_docs.yml 2022-07-27 07:20:29 -07:00
Jamil
46ad5fa9b0 Fix docs build (#858)
* Fix docs cache path

* Add manual docs trigger
2022-07-27 07:17:55 -07:00
Jamil
f590364ecd Fix empty OIDC config prevents fresh application from starting (#846)
* Fix master build

* use JSON for openid_connect_providers

* (hopefully) print errors to STDOUT

* set TERMINFO

* Upload built artifact before functional testing

* D'oh

* Revert logging change
2022-07-25 19:21:41 -07:00
Jamil
7cc428a6ea Remove elixir/erlang from prod build (#799)
* Don't install erlang/elixir to embedded path; only used for build

* bump deps

* Use custom path

* More efforts to shrink final package size

* Change prefix

* fix path
2022-07-25 11:47:58 -07:00
Jamil
55a19c994c Remove nodejs and python from build (#796)
* Try removing nodejs

* Add nodejs plugin

* Remove unused nodejs and python builds

* skip adding nodejs plugin
2022-07-25 11:47:58 -07:00
Jamil Bou Kheir
7a8ac0da42 Rebase onto master 2022-07-25 11:47:58 -07:00
Chetan Verma
afefde7110 Move docs to Docusaurus (#726) 2022-07-25 11:47:58 -07:00
dependabot[bot]
be688962a3 Bump JamesIves/github-pages-deploy-action from 4.2.2 to 4.4.0 (#838)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 4.2.2 to 4.4.0.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/v4.2.2...v4.4.0)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-25 09:29:55 -07:00
Po Chen
9857b5cad7 Update test.yml (#790) 2022-07-08 11:19:27 -07:00
Po Chen
7c720f3bd8 Add cloudsmith publish (#783)
* add cloudsmith publish

* add more distributions

* build on tag or dispatch

* add attribution

* rename

* Update publish.yml
2022-07-07 15:43:49 -07:00
Po Chen
8baa6b1c0f fix ci (#781)
* fix ci

* take 2
2022-07-05 08:47:52 -07:00
Jamil
1fcb45ced4 Parallelize CI builds for tests (#780)
* Parallelize CI builds for tests

* NodeJS 16
2022-07-02 15:26:53 -07:00
Jamil
609aaecfe9 Remove unused workflow; don't run release_drafter except on master (#775)
* Remove unused workflow; don't run release_drafter except on master

* use correct syntax for string literal
2022-07-01 01:35:30 -07:00
Jamil
bb0d653a2d Bump OTP to 25.0.1 (#692) 2022-06-09 15:01:29 -07:00
Jamil
f56f6b4c16 Revert to OTP 24 (#664)
* Revert to OTP 24 :-(

* Bust build cache

* Bump ICU
2022-05-31 19:37:41 -07:00
Jamil
4da7fd5a88 Cache deps for static analysis tools (#654) 2022-05-27 19:07:59 -07:00
Jamil
772426c535 Minor test improvements (#644)
* Minor test improvements

* Don't hardcode MIX_ENV; clarify .env file usage

* Spruce up fz_common tests
2022-05-25 07:10:40 -07:00
Andrew Rousset
82bc1835f6 add clang to get dependencies for building rust code (#639)
* add clang to get dependencies for building rust code

* add clang to get dependencies for building rust code
2022-05-20 16:24:08 -07:00
Jamil
efa840ede4 Update update_deps.yml
I hate you OpenSUSE
2022-05-20 11:04:44 -07:00
Jamil
b075354336 remove check-update
Remove `check-update`
2022-05-20 11:01:43 -07:00
Jamil
b6d0f5512d Update update_deps.yml
Fix package install flags
2022-05-20 10:59:29 -07:00
Jamil
3c342dc063 Update update_deps.yml 2022-05-20 10:41:43 -07:00
Jamil
c362683123 Update update_deps.yml
Use single quotes in YAML
2022-05-20 10:40:00 -07:00
Jamil
be44c9707c Add workflow for updating runner deps (#638) 2022-05-20 10:37:50 -07:00
Jamil
500faf813a Bump all runtimes; use simpler version function for app version (#634) 2022-05-19 07:38:16 -07:00