Enhance script in make/dev/nodeclarity/entrypoint.sh

This commit is contained in:
Steven Zou 2017-06-23 17:31:05 +08:00
parent a12ec997cc
commit 7c68c1ca69
9 changed files with 25 additions and 13 deletions

View File

@ -80,7 +80,7 @@ script:
- sudo mkdir -p /harbor
- sudo mv ./VERSION /harbor/VERSION
- sudo service mysql stop
- sudo make run_clarity_ut CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.2.5
- sudo make run_clarity_ut CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.2.6
- cat ./src/ui_ng/lib/npm-ut-test-results
- sudo ./tests/testprepare.sh
- sudo docker-compose -f ./make/docker-compose.test.yml up -d
@ -101,7 +101,7 @@ script:
- docker-compose -f make/docker-compose.test.yml down
- sudo rm -rf /data/config/*
- ls /data/cert
- sudo make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.2.5 NOTARYFLAG=true
- sudo make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.2.6 NOTARYFLAG=true
- docker ps
- ./tests/notarytest.sh

View File

@ -96,7 +96,8 @@ CLAIRDBVERSION=9.6.3
#clarity parameters
CLARITYIMAGE=vmware/harbor-clarity-ui-builder[:tag]
CLARITYSEEDPATH=/harbor_ui
CLARITYSEEDPATH=/harbor_src
CLARITYUTPATH=${CLARITYSEEDPATH}/ui_ng/lib
CLARITYBUILDSCRIPT=/entrypoint.sh
# docker parameters
@ -266,9 +267,9 @@ compile_jobservice:
compile_clarity:
@echo "compiling binary for clarity ui..."
@if [ "$(HTTPPROXY)" != "" ] ; then \
$(DOCKERCMD) run --rm -v $(UIPATH)/static:$(CLARITYSEEDPATH)/dist -v $(UINGPATH)/src:$(CLARITYSEEDPATH)/src $(CLARITYIMAGE) $(SHELL) $(CLARITYBUILDSCRIPT) -p $(HTTPPROXY); \
$(DOCKERCMD) run --rm -v $(SRCPATH):$(CLARITYSEEDPATH) $(CLARITYIMAGE) $(SHELL) $(CLARITYBUILDSCRIPT) -p $(HTTPPROXY); \
else \
$(DOCKERCMD) run --rm -v $(UIPATH)/static:$(CLARITYSEEDPATH)/dist -v $(UINGPATH)/src:$(CLARITYSEEDPATH)/src $(CLARITYIMAGE) $(SHELL) $(CLARITYBUILDSCRIPT); \
$(DOCKERCMD) run --rm -v $(SRCPATH):$(CLARITYSEEDPATH) $(CLARITYIMAGE) $(SHELL) $(CLARITYBUILDSCRIPT); \
fi
@echo "Done."
@ -389,7 +390,7 @@ refresh_clarity_builder:
run_clarity_ut:
@echo "run clarity ut ..."
@$(DOCKERCMD) run --rm -v $(UINGPATH)/lib:$(CLARITYSEEDPATH)/lib -v $(BUILDPATH)/tests:$(CLARITYSEEDPATH)/tests $(CLARITYIMAGE) $(SHELL) $(CLARITYSEEDPATH)/tests/run-clarity-ut.sh
@$(DOCKERCMD) run --rm -v $(UINGPATH)/lib:$(CLARITYSEEDPATH) -v $(BUILDPATH)/tests:$(CLARITYSEEDPATH)/tests $(CLARITYIMAGE) $(SHELL) $(CLARITYSEEDPATH)/tests/run-clarity-ut.sh
pushimage:
@echo "pushing harbor images ..."

View File

@ -50,13 +50,13 @@ You can compile the code by one of the three approaches:
* Build, install and bring up Harbor without Notary:
```sh
$ make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.2.5
$ make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.2.6
```
* Build, install and bring up Harbor with Notary:
```sh
$ make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.2.5 NOTARYFLAG=true
$ make install GOBUILDIMAGE=golang:1.7.3 COMPILETAG=compile_golangimage CLARITYIMAGE=vmware/harbor-clarity-ui-builder:1.2.6 NOTARYFLAG=true
```
#### II. Compile code with your own Golang environment, then build Harbor

View File

@ -18,6 +18,7 @@ if [ ! -z "$npm_proxy" -a "$npm_proxy" != " " ]; then
npm config set proxy $npm_proxy
fi
rm -rf ./node_modules
mv /harbor_resources/node_modules ./
cat ./package.json

View File

@ -1,4 +1,4 @@
<clr-datagrid (clrDgRefresh)="refresh($event)">
<clr-datagrid (clrDgRefresh)="refresh($event)" [clrDgLoading]="loading">
<clr-dg-column>{{'PROJECT.NAME' | translate}}</clr-dg-column>
<clr-dg-column>{{'PROJECT.ACCESS_LEVEL' | translate}}</clr-dg-column>
<clr-dg-column *ngIf="showRoleInfo">{{'PROJECT.ROLE' | translate}}</clr-dg-column>

View File

@ -30,6 +30,7 @@ import { State } from 'clarity-angular';
export class ListProjectComponent {
_filterType: string = ProjectTypes[0];
@Input() loading: boolean = true;
@Input() projects: Project[];
@Input()
get filteredType(): string {

View File

@ -25,6 +25,6 @@
</span>
</div>
</div>
<list-project [projects]="changedProjects" [filteredType]="projectTypes[currentFilteredType]" (toggle)="toggleProject($event)" (delete)="deleteProject($event)" (paginate)="retrieve($event)"></list-project>
<list-project [projects]="changedProjects" [filteredType]="projectTypes[currentFilteredType]" (toggle)="toggleProject($event)" (delete)="deleteProject($event)" (paginate)="retrieve($event)" [loading]="loading"></list-project>
</div>
</div>

View File

@ -60,6 +60,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
projectName: string = "";
subscription: Subscription;
loading: boolean = true;
constructor(
private projectService: ProjectService,
@ -122,13 +123,19 @@ export class ProjectComponent implements OnInit, OnDestroy {
}
getProjects(name?: string, isPublic?: number, page?: number, pageSize?: number): void {
this.loading = true;
this.projectService
.listProjects(name, isPublic, page, pageSize)
.subscribe(
response => {
this.changedProjects = response.json();
this.loading = false;
},
error => this.messageHandlerService.handleError(error)
error => {
this.loading = false;
this.messageHandlerService.handleError(error);
}
);
}

View File

@ -2,9 +2,11 @@
set -e
cp -r /harbor_ui/lib/* /harbor_ui
cd /harbor_src
mv /harbor_resources/node_modules ./
npm install
npm run test > lib/npm-ut-test-results
npm run test > ./npm-ut-test-results