Skip to content

Commit

Permalink
Merge branch 'main' into uffizzi-k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
OrlinVasilev authored Nov 22, 2023
2 parents 7f92f51 + 969dd1b commit 06199e4
Show file tree
Hide file tree
Showing 50 changed files with 1,744 additions and 136 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21.3
go-version: 1.21.4
id: go
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21.3
go-version: 1.21.4
id: go
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21.3
go-version: 1.21.4
id: go
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21.3
go-version: 1.21.4
id: go
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21.3
go-version: 1.21.4
id: go
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21.3
go-version: 1.21.4
id: go
- name: Setup Docker
uses: docker-practice/actions-setup-docker@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.21.3
go-version: 1.21.4
id: go
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ Harbor backend is written in [Go](http://golang.org/). If you don't have a Harbo
| 2.7 | 1.19.4 |
| 2.8 | 1.20.6 |
| 2.9 | 1.21.3 |
| 2.10 | 1.21.4 |


Ensure your GOPATH and PATH have been configured in accordance with the Go environment instructions.

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ GOINSTALL=$(GOCMD) install
GOTEST=$(GOCMD) test
GODEP=$(GOTEST) -i
GOFMT=gofmt -w
GOBUILDIMAGE=golang:1.21.3
GOBUILDIMAGE=golang:1.21.4
GOBUILDPATHINCONTAINER=/harbor

# go build
Expand Down
2 changes: 1 addition & 1 deletion make/harbor.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ log:
# port: 5140

#This attribute is for migrator to detect the version of the .cfg file, DO NOT MODIFY!
_version: 2.9.0
_version: 2.10.0

# Uncomment external_database if using external database.
# external_database:
Expand Down
4 changes: 3 additions & 1 deletion make/migrations/postgresql/0130_2.10.0_schema.up.sql
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
DROP TABLE IF EXISTS harbor_resource_label;
DROP TABLE IF EXISTS harbor_resource_label;

CREATE INDEX IF NOT EXISTS idx_artifact_accessory_subject_artifact_id ON artifact_accessory (subject_artifact_id);
2 changes: 1 addition & 1 deletion make/photon/prepare/commands/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@click.command()
@click.option('-i', '--input', 'input_', required=True, help="The path of original config file")
@click.option('-o', '--output', default='', help="the path of output config file")
@click.option('-t', '--target', default='2.9.0', help="target version of input path")
@click.option('-t', '--target', default='2.10.0', help="target version of input path")
def migrate(input_, output, target):
"""
migrate command will migrate config file style to specific version
Expand Down
2 changes: 1 addition & 1 deletion make/photon/prepare/migrations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

MIGRATION_BASE_DIR = os.path.dirname(__file__)

accept_versions = {'1.9.0', '1.10.0', '2.0.0', '2.1.0', '2.2.0', '2.3.0', '2.4.0', '2.5.0', '2.6.0', '2.7.0', '2.8.0', '2.9.0'}
accept_versions = {'1.9.0', '1.10.0', '2.0.0', '2.1.0', '2.2.0', '2.3.0', '2.4.0', '2.5.0', '2.6.0', '2.7.0', '2.8.0', '2.9.0','2.10.0'}
21 changes: 21 additions & 0 deletions make/photon/prepare/migrations/version_2_10_0/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os
from jinja2 import Environment, FileSystemLoader, StrictUndefined, select_autoescape
from utils.migration import read_conf

revision = '2.10.0'
down_revisions = ['2.9.0']

def migrate(input_cfg, output_cfg):
current_dir = os.path.dirname(__file__)
tpl = Environment(
loader=FileSystemLoader(current_dir),
undefined=StrictUndefined,
trim_blocks=True,
lstrip_blocks=True,
autoescape = select_autoescape()
).get_template('harbor.yml.jinja')

config_dict = read_conf(input_cfg)

with open(output_cfg, 'w') as f:
f.write(tpl.render(**config_dict))
Loading

0 comments on commit 06199e4

Please sign in to comment.