Skip to content

Commit

Permalink
Errors logs for debug changes in the maven.yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sreejit-K committed Sep 19, 2023
1 parent f8bb890 commit 3de863b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- name: Set up properties
run: sh configure-dependencies.sh
# # debug step
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# ## limits ssh access and adds the ssh public key for the user which triggered the workflow ie holashchand
# limit-access-to-actor: true
- name: Setup upterm session
uses: lhotari/action-upterm@v1
with:
## limits ssh access and adds the ssh public key for the user which triggered the workflow ie holashchand
limit-access-to-actor: true
- name: Build and test
run: make test
# test:
Expand Down
16 changes: 14 additions & 2 deletions tools/cli/src/toolbox/registry/restart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { allUp } from './status'

import { Toolbox } from '../../types'
import { GitRawJson, Toolbox } from '../../types'

// Accept a toolbox, return a registry restart viewer
export default async (toolbox: Toolbox, soft: boolean) => {
Expand All @@ -15,9 +15,21 @@ export default async (toolbox: Toolbox, soft: boolean) => {
message: 'Restarting all registry containers',
})

// List containers
const rawJson = JSON.parse(
await system.run('docker compose ps --format json')
)

let activeContainer = rawJson.map((i:GitRawJson) => i.Service).join(' ');


let restartComamnd = 'docker compose up --force-recreate -d ' + activeContainer;

console.log(restartComamnd);

await system
.exec(
soft ? 'docker compose restart' : 'docker compose up --force-recreate -d'
soft ? 'docker compose restart' : restartComamnd
)
.catch((error: Error) => {
events.emit('registry.create', {
Expand Down
15 changes: 15 additions & 0 deletions tools/cli/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,18 @@ export interface RegistryHealth {
export interface SignatureOptions {
signatureEnabled: boolean
}

export interface GitRawJson {
ID: string;
Name: string;
Image: string;
Command: string;
Project: string;
Service: string;
Created: number;
State: string;
Status: string;
Health: string;
ExitCode: number;
Publishers: any[]; // You can specify a more specific type if needed
}

0 comments on commit 3de863b

Please sign in to comment.