mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-25 03:35:21 +01:00
Enhance script in make/dev/nodeclarity/entrypoint.sh
This commit is contained in:
parent
a12ec997cc
commit
7c68c1ca69
@ -80,7 +80,7 @@ script:
|
|||||||
- sudo mkdir -p /harbor
|
- sudo mkdir -p /harbor
|
||||||
- sudo mv ./VERSION /harbor/VERSION
|
- sudo mv ./VERSION /harbor/VERSION
|
||||||
- sudo service mysql stop
|
- 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
|
- cat ./src/ui_ng/lib/npm-ut-test-results
|
||||||
- sudo ./tests/testprepare.sh
|
- sudo ./tests/testprepare.sh
|
||||||
- sudo docker-compose -f ./make/docker-compose.test.yml up -d
|
- 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
|
- docker-compose -f make/docker-compose.test.yml down
|
||||||
- sudo rm -rf /data/config/*
|
- sudo rm -rf /data/config/*
|
||||||
- ls /data/cert
|
- 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
|
- docker ps
|
||||||
- ./tests/notarytest.sh
|
- ./tests/notarytest.sh
|
||||||
|
9
Makefile
9
Makefile
@ -96,7 +96,8 @@ CLAIRDBVERSION=9.6.3
|
|||||||
|
|
||||||
#clarity parameters
|
#clarity parameters
|
||||||
CLARITYIMAGE=vmware/harbor-clarity-ui-builder[:tag]
|
CLARITYIMAGE=vmware/harbor-clarity-ui-builder[:tag]
|
||||||
CLARITYSEEDPATH=/harbor_ui
|
CLARITYSEEDPATH=/harbor_src
|
||||||
|
CLARITYUTPATH=${CLARITYSEEDPATH}/ui_ng/lib
|
||||||
CLARITYBUILDSCRIPT=/entrypoint.sh
|
CLARITYBUILDSCRIPT=/entrypoint.sh
|
||||||
|
|
||||||
# docker parameters
|
# docker parameters
|
||||||
@ -266,9 +267,9 @@ compile_jobservice:
|
|||||||
compile_clarity:
|
compile_clarity:
|
||||||
@echo "compiling binary for clarity ui..."
|
@echo "compiling binary for clarity ui..."
|
||||||
@if [ "$(HTTPPROXY)" != "" ] ; then \
|
@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 \
|
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
|
fi
|
||||||
@echo "Done."
|
@echo "Done."
|
||||||
|
|
||||||
@ -389,7 +390,7 @@ refresh_clarity_builder:
|
|||||||
|
|
||||||
run_clarity_ut:
|
run_clarity_ut:
|
||||||
@echo "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:
|
pushimage:
|
||||||
@echo "pushing harbor images ..."
|
@echo "pushing harbor images ..."
|
||||||
|
@ -50,13 +50,13 @@ You can compile the code by one of the three approaches:
|
|||||||
* Build, install and bring up Harbor without Notary:
|
* Build, install and bring up Harbor without Notary:
|
||||||
|
|
||||||
```sh
|
```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:
|
* Build, install and bring up Harbor with Notary:
|
||||||
|
|
||||||
```sh
|
```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
|
#### II. Compile code with your own Golang environment, then build Harbor
|
||||||
|
@ -18,6 +18,7 @@ if [ ! -z "$npm_proxy" -a "$npm_proxy" != " " ]; then
|
|||||||
npm config set proxy $npm_proxy
|
npm config set proxy $npm_proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -rf ./node_modules
|
||||||
mv /harbor_resources/node_modules ./
|
mv /harbor_resources/node_modules ./
|
||||||
|
|
||||||
cat ./package.json
|
cat ./package.json
|
||||||
|
@ -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.NAME' | translate}}</clr-dg-column>
|
||||||
<clr-dg-column>{{'PROJECT.ACCESS_LEVEL' | 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>
|
<clr-dg-column *ngIf="showRoleInfo">{{'PROJECT.ROLE' | translate}}</clr-dg-column>
|
||||||
|
@ -30,6 +30,7 @@ import { State } from 'clarity-angular';
|
|||||||
export class ListProjectComponent {
|
export class ListProjectComponent {
|
||||||
_filterType: string = ProjectTypes[0];
|
_filterType: string = ProjectTypes[0];
|
||||||
|
|
||||||
|
@Input() loading: boolean = true;
|
||||||
@Input() projects: Project[];
|
@Input() projects: Project[];
|
||||||
@Input()
|
@Input()
|
||||||
get filteredType(): string {
|
get filteredType(): string {
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
@ -60,6 +60,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
|
|||||||
projectName: string = "";
|
projectName: string = "";
|
||||||
|
|
||||||
subscription: Subscription;
|
subscription: Subscription;
|
||||||
|
loading: boolean = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private projectService: ProjectService,
|
private projectService: ProjectService,
|
||||||
@ -122,13 +123,19 @@ export class ProjectComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getProjects(name?: string, isPublic?: number, page?: number, pageSize?: number): void {
|
getProjects(name?: string, isPublic?: number, page?: number, pageSize?: number): void {
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
this.projectService
|
this.projectService
|
||||||
.listProjects(name, isPublic, page, pageSize)
|
.listProjects(name, isPublic, page, pageSize)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
response => {
|
response => {
|
||||||
this.changedProjects = response.json();
|
this.changedProjects = response.json();
|
||||||
|
this.loading = false;
|
||||||
},
|
},
|
||||||
error => this.messageHandlerService.handleError(error)
|
error => {
|
||||||
|
this.loading = false;
|
||||||
|
this.messageHandlerService.handleError(error);
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cp -r /harbor_ui/lib/* /harbor_ui
|
cd /harbor_src
|
||||||
|
|
||||||
|
mv /harbor_resources/node_modules ./
|
||||||
|
|
||||||
npm install
|
npm install
|
||||||
npm run test > lib/npm-ut-test-results
|
npm run test > ./npm-ut-test-results
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user