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

Update merlin links in sidebar #66

Merged
merged 4 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
136 changes: 68 additions & 68 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: ci
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
- "v[0-9]+.[0-9]+.[0-9]+*"
branches:
- main
pull_request:
Expand All @@ -13,20 +13,20 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Install dependencies
run: |
npm install --global yarn
make setup
make init-dep
- name: Lint source code
run: make lint
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Install dependencies
run: |
npm install --global yarn
make setup
make init-dep
- name: Lint source code
run: make lint

integration-test:
runs-on: ubuntu-latest
Expand All @@ -39,83 +39,83 @@ jobs:
POSTGRES_USER: mlp
POSTGRES_PASSWORD: mlp
ports:
- 5432:5432
- 5432:5432
keto:
image: oryd/keto:v0.4.3-alpha.2
env:
DSN: memory
ports:
- 4466:4466
- 4466:4466
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Integration test
env:
POSTGRES_HOST: localhost
POSTGRES_DB: mlp
POSTGRES_USER: mlp
POSTGRES_PASSWORD: mlp
KETO_URL: http://localhost:4466
run: make it-test-api-ci
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Integration test
env:
POSTGRES_HOST: localhost
POSTGRES_DB: mlp
POSTGRES_USER: mlp
POSTGRES_PASSWORD: mlp
KETO_URL: http://localhost:4466
run: make it-test-api-ci

publish-gojek-mlp-ui:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org
- name: Install dependencies
working-directory: ./ui
run: yarn install
- name: Publish @gojek/mlp-ui library
working-directory: ./ui
run: |
yarn set-version-from-git
yarn lib publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org
- name: Install dependencies
working-directory: ./ui
run: yarn install
- name: Publish @gojek/mlp-ui library
working-directory: ./ui
run: |
yarn set-version-from-git
yarn lib publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-mlp-docker:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
needs: integration-test
steps:
- uses: actions/checkout@v2
- name: Build and push docker image
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
registry: ghcr.io
tag_with_ref: true
- uses: actions/checkout@v2
- name: Build and push docker image
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
registry: ghcr.io
tag_with_ref: true

e2e-test:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
needs: publish-mlp-docker
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.8.1
- name: Create kind cluster
uses: helm/kind-action@v1.3.0
- name: Create mlp namespace
run: kubectl create namespace mlp
- name: Deploy MLP
run: ./scripts/e2e/deploy-mlp.sh "charts/mlp"
- name: Run E2E test
run: ./scripts/e2e/run-e2e.sh "api"
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.8.1
- name: Create kind cluster
uses: helm/kind-action@v1.3.0
- name: Create mlp namespace
run: kubectl create namespace mlp
- name: Deploy MLP
run: ./scripts/e2e/deploy-mlp.sh "charts/mlp"
- name: Run E2E test
run: ./scripts/e2e/run-e2e.sh "api"

release-charts:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
Expand Down
2 changes: 1 addition & 1 deletion api/service/applications_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ type applicationService struct {
}

func (service *applicationService) List() (apps []*models.Application, err error) {
err = service.Where("is_disabled = FALSE").Find(&apps).Error
err = service.Where("is_disabled = FALSE").Order("id ASC").Find(&apps).Error
return
}
3 changes: 3 additions & 0 deletions db-migrations/11_update_merlin_app_config.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
UPDATE applications
SET config = '{}'
tiopramayudi marked this conversation as resolved.
Show resolved Hide resolved
WHERE name = 'Merlin';
13 changes: 13 additions & 0 deletions db-migrations/11_update_merlin_app_config.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
UPDATE applications
SET config = '{
"sections": [
{
"name": "Models",
"href": "/models"
},
{
"name": "Transformer Simulator",
"href": "/transformer-simulator"
}
]
}' WHERE name = 'Merlin';