mirror of
https://github.com/project-zot/zot.git
synced 2025-03-11 02:17:43 -05:00
changed go version to 1.18
Signed-off-by: Alex Stan <alexandrustan96@yahoo.ro>
This commit is contained in:
parent
620bc7c517
commit
66484c8ca9
25 changed files with 33 additions and 355 deletions
2
.github/workflows/benchmark.yaml
vendored
2
.github/workflows/benchmark.yaml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
# Run benchmark with `go test -bench` and stores the output to a file
|
# Run benchmark with `go test -bench` and stores the output to a file
|
||||||
- name: Run benchmark
|
- name: Run benchmark
|
||||||
run: make BENCH_OUTPUT=ci-cd run-bench
|
run: make BENCH_OUTPUT=ci-cd run-bench
|
||||||
|
|
2
.github/workflows/ci-cd.yml
vendored
2
.github/workflows/ci-cd.yml
vendored
|
@ -37,7 +37,7 @@ jobs:
|
||||||
- name: Install go
|
- name: Install go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
- name: Check out source code
|
- name: Check out source code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
- name: Cache go dependencies
|
- name: Cache go dependencies
|
||||||
|
|
2
.github/workflows/cloc.yml
vendored
2
.github/workflows/cloc.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
- name: Install go
|
- name: Install go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
- name: Check out source code
|
- name: Check out source code
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
6
.github/workflows/cluster.yaml
vendored
6
.github/workflows/cluster.yaml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
|
@ -116,8 +116,8 @@ jobs:
|
||||||
./bin/zot-linux-amd64 serve test/cluster/config-minio3.json &
|
./bin/zot-linux-amd64 serve test/cluster/config-minio3.json &
|
||||||
sleep 10
|
sleep 10
|
||||||
# run tests
|
# run tests
|
||||||
skopeo --debug copy --format=oci --dest-tls-verify=false docker://ghcr.io/project-zot/golang:1.17 docker://localhost:8080/golang:1.17
|
skopeo --debug copy --format=oci --dest-tls-verify=false docker://ghcr.io/project-zot/golang:1.18 docker://localhost:8080/golang:1.18
|
||||||
skopeo --debug copy --src-tls-verify=false docker://localhost:8080/golang:1.17 oci:golang:1.17
|
skopeo --debug copy --src-tls-verify=false docker://localhost:8080/golang:1.18 oci:golang:1.18
|
||||||
echo "{\"name\":\"foo\",\"value\":\"bar\"}" > config.json
|
echo "{\"name\":\"foo\",\"value\":\"bar\"}" > config.json
|
||||||
echo "hello world" > artifact.txt
|
echo "hello world" > artifact.txt
|
||||||
oras push localhost:8080/hello-artifact:v2 \
|
oras push localhost:8080/hello-artifact:v2 \
|
||||||
|
|
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
|
@ -46,7 +46,7 @@ jobs:
|
||||||
- name: Install go
|
- name: Install go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
2
.github/workflows/ecosystem-tools.yaml
vendored
2
.github/workflows/ecosystem-tools.yaml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
|
|
2
.github/workflows/golangci-lint.yaml
vendored
2
.github/workflows/golangci-lint.yaml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '1.17'
|
go-version: '1.18'
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v2
|
uses: golangci/golangci-lint-action@v2
|
||||||
|
|
2
.github/workflows/license.yaml
vendored
2
.github/workflows/license.yaml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
- name: Install go-licenses
|
- name: Install go-licenses
|
||||||
run: go install github.com/google/go-licenses@latest
|
run: go install github.com/google/go-licenses@latest
|
||||||
- name: Check for forbidden licenses
|
- name: Check for forbidden licenses
|
||||||
|
|
4
.github/workflows/oci-conformance-action.yml
vendored
4
.github/workflows/oci-conformance-action.yml
vendored
|
@ -18,10 +18,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
- name: Install go 1.17
|
- name: Install go 1.18
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
- name: Checkout this PR
|
- name: Checkout this PR
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Start zot server
|
- name: Start zot server
|
||||||
|
|
2
.github/workflows/tls.yaml
vendored
2
.github/workflows/tls.yaml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.x
|
go-version: 1.18.x
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE
|
cd $GITHUB_WORKSPACE
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ---
|
# ---
|
||||||
# Stage 1: Install certs, build binary, create default config file
|
# Stage 1: Install certs, build binary, create default config file
|
||||||
# ---
|
# ---
|
||||||
FROM ghcr.io/project-zot/golang:1.17 AS builder
|
FROM ghcr.io/project-zot/golang:1.18 AS builder
|
||||||
ARG COMMIT
|
ARG COMMIT
|
||||||
ARG OS
|
ARG OS
|
||||||
ARG ARCH
|
ARG ARCH
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ---
|
# ---
|
||||||
# Stage 1: Install certs, build binary, create default config file
|
# Stage 1: Install certs, build binary, create default config file
|
||||||
# ---
|
# ---
|
||||||
FROM ghcr.io/project-zot/golang:1.17 AS builder
|
FROM ghcr.io/project-zot/golang:1.18 AS builder
|
||||||
ARG COMMIT
|
ARG COMMIT
|
||||||
RUN apt-get update && apt-get install -y git make ca-certificates
|
RUN apt-get update && apt-get install -y git make ca-certificates
|
||||||
RUN mkdir -p /go/src/github.com/project-zot/zot
|
RUN mkdir -p /go/src/github.com/project-zot/zot
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ---
|
# ---
|
||||||
# Stage 1: Install certs, build binary, create default config file
|
# Stage 1: Install certs, build binary, create default config file
|
||||||
# ---
|
# ---
|
||||||
FROM ghcr.io/project-zot/golang:1.17 AS builder
|
FROM ghcr.io/project-zot/golang:1.18 AS builder
|
||||||
ARG COMMIT
|
ARG COMMIT
|
||||||
ARG OS
|
ARG OS
|
||||||
ARG ARCH
|
ARG ARCH
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ---
|
# ---
|
||||||
# Stage 1: Install certs, build binary, create default config file
|
# Stage 1: Install certs, build binary, create default config file
|
||||||
# ---
|
# ---
|
||||||
FROM ghcr.io/project-zot/golang:1.17 AS builder
|
FROM ghcr.io/project-zot/golang:1.18 AS builder
|
||||||
ARG COMMIT
|
ARG COMMIT
|
||||||
ARG OS
|
ARG OS
|
||||||
ARG ARCH
|
ARG ARCH
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ---
|
# ---
|
||||||
# Stage 1: Build binary, create default config file
|
# Stage 1: Build binary, create default config file
|
||||||
# ---
|
# ---
|
||||||
FROM ghcr.io/project-zot/golang:1.17 AS builder
|
FROM ghcr.io/project-zot/golang:1.18 AS builder
|
||||||
ARG COMMIT
|
ARG COMMIT
|
||||||
ARG OS
|
ARG OS
|
||||||
ARG ARCH
|
ARG ARCH
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ---
|
# ---
|
||||||
# Stage 1: Install certs, build binary, create default config file
|
# Stage 1: Install certs, build binary, create default config file
|
||||||
# ---
|
# ---
|
||||||
FROM ghcr.io/project-zot/golang:1.17 AS builder
|
FROM ghcr.io/project-zot/golang:1.18 AS builder
|
||||||
RUN mkdir -p /go/src/github.com/project-zot/zot
|
RUN mkdir -p /go/src/github.com/project-zot/zot
|
||||||
WORKDIR /go/src/github.com/project-zot/zot
|
WORKDIR /go/src/github.com/project-zot/zot
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ---
|
# ---
|
||||||
# Stage 1: Install certs, build binary, create default config file
|
# Stage 1: Install certs, build binary, create default config file
|
||||||
# ---
|
# ---
|
||||||
FROM ghcr.io/project-zot/golang:1.17 AS builder
|
FROM ghcr.io/project-zot/golang:1.18 AS builder
|
||||||
RUN mkdir -p /go/src/github.com/project-zot/zot
|
RUN mkdir -p /go/src/github.com/project-zot/zot
|
||||||
WORKDIR /go/src/github.com/project-zot/zot
|
WORKDIR /go/src/github.com/project-zot/zot
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# ---
|
# ---
|
||||||
# Stage 1: Build binary, create default config file
|
# Stage 1: Build binary, create default config file
|
||||||
# ---
|
# ---
|
||||||
FROM ghcr.io/project-zot/golang:1.17 AS builder
|
FROM ghcr.io/project-zot/golang:1.18 AS builder
|
||||||
RUN mkdir -p /go/src/github.com/project-zot/zot
|
RUN mkdir -p /go/src/github.com/project-zot/zot
|
||||||
WORKDIR /go/src/github.com/project-zot/zot
|
WORKDIR /go/src/github.com/project-zot/zot
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
||||||
module zotregistry.io/zot
|
module zotregistry.io/zot
|
||||||
|
|
||||||
go 1.17
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/99designs/gqlgen v0.17.2
|
github.com/99designs/gqlgen v0.17.2
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
build:
|
build:
|
||||||
from:
|
from:
|
||||||
type: docker
|
type: docker
|
||||||
url: docker://ghcr.io/project-zot/golang:1.17
|
url: docker://ghcr.io/project-zot/golang:1.18
|
||||||
binds:
|
binds:
|
||||||
- . -> /zotcopy
|
- . -> /zotcopy
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
build:
|
build:
|
||||||
from:
|
from:
|
||||||
type: docker
|
type: docker
|
||||||
url: docker://ghcr.io/project-zot/golang:1.17
|
url: docker://ghcr.io/project-zot/golang:1.18
|
||||||
binds:
|
binds:
|
||||||
- . -> /zotcopy
|
- . -> /zotcopy
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
build:
|
build:
|
||||||
from:
|
from:
|
||||||
type: docker
|
type: docker
|
||||||
url: docker://ghcr.io/project-zot/golang:1.17
|
url: docker://ghcr.io/project-zot/golang:1.18
|
||||||
binds:
|
binds:
|
||||||
- . -> /zotcopy
|
- . -> /zotcopy
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
build:
|
build:
|
||||||
from:
|
from:
|
||||||
type: docker
|
type: docker
|
||||||
url: docker://ghcr.io/project-zot/golang:1.17
|
url: docker://ghcr.io/project-zot/golang:1.18
|
||||||
binds:
|
binds:
|
||||||
- . -> /zotcopy
|
- . -> /zotcopy
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -6,7 +6,7 @@ function setup_file() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Download test data to folder common for the entire suite, not just this file
|
# Download test data to folder common for the entire suite, not just this file
|
||||||
skopeo --insecure-policy copy --format=oci docker://ghcr.io/project-zot/golang:1.17 oci:${TEST_DATA_DIR}/golang:1.17
|
skopeo --insecure-policy copy --format=oci docker://ghcr.io/project-zot/golang:1.18 oci:${TEST_DATA_DIR}/golang:1.18
|
||||||
# Setup zot server
|
# Setup zot server
|
||||||
local zot_root_dir=${BATS_FILE_TMPDIR}/zot
|
local zot_root_dir=${BATS_FILE_TMPDIR}/zot
|
||||||
local zot_config_file=${BATS_FILE_TMPDIR}/zot_config.json
|
local zot_config_file=${BATS_FILE_TMPDIR}/zot_config.json
|
||||||
|
@ -43,26 +43,26 @@ function teardown_file() {
|
||||||
|
|
||||||
@test "push image" {
|
@test "push image" {
|
||||||
run skopeo --insecure-policy copy --dest-tls-verify=false \
|
run skopeo --insecure-policy copy --dest-tls-verify=false \
|
||||||
oci:${TEST_DATA_DIR}/golang:1.17 \
|
oci:${TEST_DATA_DIR}/golang:1.18 \
|
||||||
docker://127.0.0.1:8080/golang:1.17
|
docker://127.0.0.1:8080/golang:1.18
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
run curl http://127.0.0.1:8080/v2/_catalog
|
run curl http://127.0.0.1:8080/v2/_catalog
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[ $(echo "${lines[-1]}" | jq '.repositories[]') = '"golang"' ]
|
[ $(echo "${lines[-1]}" | jq '.repositories[]') = '"golang"' ]
|
||||||
run curl http://127.0.0.1:8080/v2/golang/tags/list
|
run curl http://127.0.0.1:8080/v2/golang/tags/list
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"1.17"' ]
|
[ $(echo "${lines[-1]}" | jq '.tags[]') = '"1.18"' ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "pull image" {
|
@test "pull image" {
|
||||||
local oci_data_dir=${BATS_FILE_TMPDIR}/oci
|
local oci_data_dir=${BATS_FILE_TMPDIR}/oci
|
||||||
run skopeo --insecure-policy copy --src-tls-verify=false \
|
run skopeo --insecure-policy copy --src-tls-verify=false \
|
||||||
docker://127.0.0.1:8080/golang:1.17 \
|
docker://127.0.0.1:8080/golang:1.18 \
|
||||||
oci:${oci_data_dir}/golang:1.17
|
oci:${oci_data_dir}/golang:1.18
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
run cat ${BATS_FILE_TMPDIR}/oci/golang/index.json
|
run cat ${BATS_FILE_TMPDIR}/oci/golang/index.json
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
[ $(echo "${lines[-1]}" | jq '.manifests[].annotations."org.opencontainers.image.ref.name"') = '"1.17"' ]
|
[ $(echo "${lines[-1]}" | jq '.manifests[].annotations."org.opencontainers.image.ref.name"') = '"1.18"' ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "push oras artifact" {
|
@test "push oras artifact" {
|
||||||
|
|
Loading…
Add table
Reference in a new issue