Skip to content

Commit

Permalink
Update merlin links in sidebar (#66)
Browse files Browse the repository at this point in the history
* add sim to toolbar

* Rename link name to Transformer Simulator

* Order applications by id ascending

* Redo publish-mlp-docker as testing finished

Co-authored-by: ariefrahmansyah <ariefrahmansyah@hotmail.com>
  • Loading branch information
karzuo and ariefrahmansyah authored Oct 26, 2022
1 parent ccae675 commit 5695f03
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 69 deletions.
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 = '{}'
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';

0 comments on commit 5695f03

Please sign in to comment.