作为 CI 管道的一部分,我们有一个用于许多 Web 服务的部署脚本,如下所示:
kubectl apply -f deployment1.yml
kubectl apply -f deployment2.yml
Run Code Online (Sandbox Code Playgroud)
问题是管道的下一阶段有时会失败,因为服务在启动时还没有准备好。
我想在脚本中添加一行,内容如下:
Wait until all deployments are in the Ready state, or fail if more than 30 seconds has elapsed.
Run Code Online (Sandbox Code Playgroud)
我认为以下方法可行,但不幸的是,超时标志似乎不可用:
kubectl rollout status deployment deployment1 --timeout=30s
kubectl rollout status deployment deployment2 --timeout=30s
Run Code Online (Sandbox Code Playgroud)
我不想在没有超时的情况下运行“kubectl rollout status”,因为如果其中一个部署出现故障,这将导致我们的构建挂起。
我在构建服务器上使用 jenkins 进行构建时得到了这个,但我正在本地计算机上尝试这个,然后它工作正常但出现错误
15:07:39 "",
15:07:39 "",
15:07:39 "ERROR in src/services/excel.service.ts:2:23 - error TS2307: Cannot find module 'xlsx'.",
15:07:39 "",
15:07:39 "2 import * as XLSX from 'xlsx';",
15:07:39 " ~~~~~~"
15:07:39
Run Code Online (Sandbox Code Playgroud)
使用 npm install xlsx 安装 xlsx
并导入 xlsx 模块。从 'xlsx' 导入 * 作为 XLSX;
import { Injectable } from '@angular/core';
import * as XLSX from 'xlsx';
import * as _ from 'lodash';
@Injectable({
providedIn: 'root'
})
export class ExcelService {
constructor() { }
wopts: XLSX.WritingOptions = { bookType: …Run Code Online (Sandbox Code Playgroud) [(ngModel)] 不能在表单标签内工作
当我使用 Multi Select Outside Form 标签时,可以正常选择 All 和 Deselect All 功能
但是我当我把它放在表格里面时它工作选择所有值
<form [formGroup]="roleForm">
<mat-form-field class="example-full-width">
<mat-select placeholder="Select Role Type" formControlName="roleType" (selectionChange)="roleTypeSelect($event.value)">
<mat-option *ngFor="let role of roleTypeList" [value]="role.roleTypeId">
{{role.roleTypeName}}
</mat-option>
</mat-select>
</mat-form-field> <!-- Multi Select Mat Start -->
<mat-form-field class="example-full-width">
<mat-select placeholder="Select Privileges" class="filter-select" [formControl]="selectedItems" [compareWith]="equals" multiple
#privilegeSelect="ngModel">
<mat-option disabled="disabled" class="filter-option">
<button mat-raised-button class="mat-primary fill text-sm" (click)="selectAll(privilegeSelect, dropdownList)">
Select All
</button>
<button mat-raised-button class="mat-primary fill text-sm eta-margin-all" (click)="deselectAll(privilegeSelect)">
Deselect All
</button>
</mat-option>
<mat-option *ngFor="let privilege of dropdownList" [value]="privilege">{{privilege.itemName}}</mat-option> …Run Code Online (Sandbox Code Playgroud)