forked from goharbor/harbor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
525 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
apiVersion: builds.katanomi.dev/v1alpha1 | ||
kind: Build | ||
spec: | ||
workspaces: | ||
- description: | | ||
This workspace is shared among all the pipeline tasks to read/write common resources | ||
name: source | ||
tasks: | ||
- name: prepare-dockerfile | ||
timeout: 30m | ||
retries: 0 | ||
taskRef: | ||
kind: ClusterTask | ||
name: alauda-script | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
params: | ||
- name: tool-image | ||
value: registry.alauda.cn:60080/fundamentals/katanomi-ci-builder:master | ||
- name: script | ||
value: | | ||
cd tests/test-engine-image && ./generate.sh api | ||
- name: build-image-amd | ||
timeout: 60m | ||
retries: 0 | ||
runAfter: | ||
- prepare-dockerfile | ||
taskRef: | ||
kind: ClusterTask | ||
name: build-image-buildkit | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
- name: cache | ||
- name: config | ||
when: [] | ||
params: | ||
- name: reuse-image | ||
value: "false" | ||
- name: dockerfile | ||
value: tests/test-engine-image/Dockerfile | ||
- name: context | ||
value: tests/test-engine-image | ||
- name: container-images | ||
value: | ||
- build-harbor.alauda.cn/fundamentals/harbor-e2e-engine:5.3.0-api | ||
- name: labels | ||
value: | ||
- branch=$(build.git.branch.name) | ||
- commit=$(build.git.lastCommit.id) | ||
- commit_id=$(build.git.lastCommit.id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
apiVersion: builds.katanomi.dev/v1alpha1 | ||
kind: Build | ||
spec: | ||
git: | ||
options: | ||
depth: 3 | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 200Mi | ||
requests: | ||
cpu: 200m | ||
memory: 200Mi | ||
workspaces: | ||
- name: source | ||
params: | ||
- name: HARBOR_PASSWORD | ||
description: 密码 | ||
type: string | ||
default: Harbor12345 | ||
- name: HARBOR_HOST | ||
description: harbor 地址,访问地址去掉协议的部分,如 harbor.test、127.0.0.1:8080 | ||
type: string | ||
default: "" | ||
- name: HARBOR_HOST_SCHEMA | ||
description: harbor 地址的协议,http 或者 https | ||
type: string | ||
default: "http" | ||
- name: TEST_IMAGE | ||
description: 测试镜像的地址 | ||
type: string | ||
default: "build-harbor.alauda.cn/fundamentals/harbor-e2e-engine:5.3.0-api" | ||
tasks: | ||
- name: api-test | ||
timeout: 2.5h | ||
retries: 0 | ||
taskRef: | ||
resolver: katanomi.dev.gitsource | ||
params: | ||
- name: url | ||
value: https://gitlab-ce.alauda.cn/devops/edge | ||
- name: revision | ||
value: refs/heads/master | ||
- name: pathInRepo | ||
value: tasks/docker-in-docker/0.1/docker-in-docker.yaml | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
params: | ||
- name: command | ||
value: | | ||
export HARBOR_HOST=$(params.HARBOR_HOST) | ||
export HARBOR_HOST_SCHEMA=$(params.HARBOR_HOST_SCHEMA) | ||
export HARBOR_PASSWORD=$(params.HARBOR_PASSWORD) | ||
export E2E_IMAGE=$(params.TEST_IMAGE) | ||
./tests/ci/api_run.sh DB $(params.HARBOR_HOST) | ||
- name: upload-report | ||
timeout: 30m | ||
retries: 0 | ||
runAfter: | ||
- api-test | ||
taskRef: | ||
resolver: katanomi.hub | ||
params: | ||
- name: kind | ||
value: task | ||
- name: name | ||
value: upload-files | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
params: | ||
- name: artifacts-path | ||
value: | ||
- $(workspaces.source.path)/log.html | ||
- name: artifact-repository | ||
value: https://build-nexus.alauda.cn/repository/alauda/ | ||
- name: target-path | ||
value: ./devops/pipeline-report/harbor-e2e/$(build.git.branch)/ | ||
- name: checksum | ||
value: "false" | ||
- name: upload-pack | ||
value: "false" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
import os | ||
import base | ||
|
||
def generate_cert(): | ||
command = ["notation", "cert", "generate-test", "--default", "wabbit-networks.io"] | ||
base.run_command(command) | ||
|
||
def sign_artifact(artifact): | ||
command = ["notation", "sign", "-d", "--allow-referrers-api", artifact] | ||
if os.environ.get("HARBOR_HOST_SCHEMA") == "http": | ||
insecure = ["--insecure-registry"] | ||
else: | ||
insecure = [] | ||
|
||
command = ["notation", "sign", *insecure, "-d", "--allow-referrers-api", artifact] | ||
base.run_command(command) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.