Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge: fast forward release-1.0 to main #1045

Merged
merged 68 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
660d167
refactor: Logger initializes logging (#867)
Mar 21, 2023
67dca8e
test(cov): make unit tests cover more (#905)
qweeah Mar 26, 2023
07a754e
refactor: add root package for Cobra commands (#825)
qweeah Mar 30, 2023
60eec26
build(deps): bump github.com/docker/cli from 23.0.1+incompatible to 2…
dependabot[bot] Mar 30, 2023
3341fac
refactor: unify command contexts (#899)
qweeah Apr 6, 2023
55751b8
test: generate coverage profile during e2e tests (#903)
qweeah Apr 6, 2023
981e419
build(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#919)
dependabot[bot] Apr 8, 2023
f005e2f
refactor: replace terminal package used by `oras login` (#910)
qweeah Apr 10, 2023
923537e
test(e2e): OCI layout specs for `oras tag` (#902)
qweeah Apr 10, 2023
a7e690e
build(deps): bump github.com/docker/cli from 23.0.2+incompatible to 2…
dependabot[bot] Apr 11, 2023
9d7edb9
Add make target for e2e (#924)
sajayantony Apr 11, 2023
676a8ed
test: make e2e coverage data in action (#926)
qweeah Apr 13, 2023
07fbec8
build(deps): bump github.com/docker/cli from 23.0.3+incompatible to 2…
dependabot[bot] Apr 18, 2023
a54a99d
feat: use oras-credential-go to do auth (#932)
qweeah Apr 27, 2023
5735073
doc: fix broken logo link (#935)
FeynmanZhou Apr 27, 2023
103aef5
docs: fix broken links in README (#937)
wangxiaoxuan273 Apr 28, 2023
776041f
build: using cross compilation in docker build (#938)
northtyphoon Apr 28, 2023
861c3b2
build(deps): bump golang.org/x/term from 0.7.0 to 0.8.0 (#942)
dependabot[bot] May 5, 2023
e9d5418
build(deps): bump oras-go and oras-credentials-go (#946)
qweeah May 11, 2023
60ee07e
fixed the link in the file : oras/CONTRIBUTING.md (#951)
yash7raut May 18, 2023
b6fbe97
build(deps): bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2 (#953)
dependabot[bot] May 18, 2023
92187ca
build: add dependabot for e2e module (#958)
qweeah May 30, 2023
5717a05
build(deps): bump oras.land/oras-go/v2 from 2.1.0 to 2.2.0 (#955)
dependabot[bot] May 30, 2023
7d802fe
build(deps): bump github.com/oras-project/oras-credentials-go from 0.…
dependabot[bot] May 30, 2023
c5b4364
build(deps): bump github.com/opencontainers/image-spec from 1.1.0-rc2…
dependabot[bot] May 30, 2023
0f68de4
build(deps): bump github.com/onsi/ginkgo/v2 from 2.9.0 to 2.9.5 in /t…
dependabot[bot] May 30, 2023
e24078f
build(deps): bump github.com/onsi/gomega from 1.27.1 to 1.27.7 in /te…
dependabot[bot] May 30, 2023
379a308
build(deps): bump oras.land/oras-go/v2 from 2.1.0 to 2.2.0 in /test/e…
dependabot[bot] May 30, 2023
cd7319c
build(deps): bump github.com/onsi/ginkgo/v2 from 2.9.5 to 2.9.7 in /t…
dependabot[bot] May 31, 2023
f4a7aed
fix: correct spec flag description (#964)
qweeah May 31, 2023
57005b9
build(deps): bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3 (#966)
dependabot[bot] Jun 5, 2023
3ff15bb
chore: add snap for ubuntu (#965)
Jun 6, 2023
5c1581e
build(deps): bump github.com/onsi/gomega from 1.27.7 to 1.27.8 in /te…
dependabot[bot] Jun 8, 2023
4bed51a
build(deps): bump github.com/onsi/ginkgo/v2 from 2.9.7 to 2.10.0 in /…
dependabot[bot] Jun 8, 2023
455e8de
chore: simplify e2e scripts and github action (#967)
qweeah Jun 9, 2023
d310eb6
Add help to make file
Jun 14, 2023
7c09fd4
Revert "Add help to make file" (#974)
Jun 14, 2023
22a7316
Add help to make file (#975)
Jun 19, 2023
b908e36
build(deps): bump golang.org/x/term from 0.8.0 to 0.9.0 (#971)
dependabot[bot] Jun 20, 2023
365ad23
build(deps): bump github.com/onsi/ginkgo/v2 from 2.10.0 to 2.11.0 in …
dependabot[bot] Jun 20, 2023
bf33bb7
test: add unit-tests for `internal/version.go` (#977)
enraiha0307 Jun 21, 2023
b4cac2e
build(deps): bump github.com/oras-project/oras-credentials-go from 0.…
qweeah Jun 27, 2023
99c55ce
fix: enforce path validation for push/attach and improve path travers…
suganyas Jun 28, 2023
de3cc9a
chore: add experimental mark to filtered tag listing (#994)
qweeah Jun 29, 2023
5e2cfe9
test(e2e): add test for pushing via absolute path (#991)
qweeah Jun 29, 2023
f9aec91
test(e2e): update spec-related constants to string literal (#992)
qweeah Jun 29, 2023
ef743de
chore: update help doc with OCI layout support (#997)
qweeah Jul 3, 2023
ba60b99
feat: add flag to skip deleting obsolete referrers index (#957)
qweeah Jul 3, 2023
e5a7c2e
fix: pushing based on temporary file store path (#996)
qweeah Jul 4, 2023
42650e5
chore: update minor version (#1000)
qweeah Jul 5, 2023
34390f9
fix: properly print tree for `oras discover` (#1005)
shizhMSFT Jul 6, 2023
e63c7ba
build(deps): bump golang.org/x/term from 0.9.0 to 0.10.0 (#1008)
dependabot[bot] Jul 6, 2023
7fc68d4
build(deps): bump oras-go to main branch (#1004)
qweeah Jul 6, 2023
43e585f
revert: "chore: update minor version (#1000)" (#1014)
qweeah Jul 10, 2023
57c63b8
bump: update golang from 1.20.2 to 1.20.5 (#1015)
qweeah Jul 10, 2023
edfc253
bump: update oras version to 1.1.0-rc.1
qweeah Jul 10, 2023
ef6e022
bump: tag and release ORAS CLI v1.1.0-rc.1 (#1016)
qweeah Jul 11, 2023
5194c2e
chore: fix lint warning (#1001)
kranurag7 Jul 11, 2023
46780e7
chore: fix the links in project readme (#1012)
amands98 Jul 12, 2023
ed3fbcc
chore: update container build prepare job output in Github Actions (#…
qweeah Jul 12, 2023
21d0b71
test: add unit test for error scenario in `internal/credential/store.…
enraiha0307 Jul 12, 2023
3092656
chore: use golangci lint (#986)
kranurag7 Jul 13, 2023
a1d0764
fix: correct e2e specs and CI check configuration (#1023)
qweeah Jul 18, 2023
4b9ffea
workflow: add github stale action (#1024)
sajayantony Jul 20, 2023
9260209
fix: move stale into .github/workflows (#1031)
sajayantony Jul 22, 2023
41cb0c8
build(deps): bump github.com/onsi/gomega from 1.27.8 to 1.27.10 in /t…
dependabot[bot] Jul 25, 2023
0b6651a
chore: improving error log for `oras push` and `oras attach` when the…
1Shubham7 Jul 27, 2023
e6b9a44
chore: exempt stale if milestone is set (#1036)
qweeah Jul 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ updates:
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "gomod"
directory: "/test/e2e/"
schedule:
interval: "daily"
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ jobs:
run: make test
- name: Run E2E Tests
run: |
sh $GITHUB_WORKSPACE/test/e2e/scripts/e2e.sh $GITHUB_WORKSPACE --clean
if [[ $GITHUB_REF_NAME == v* && $GITHUB_REF_TYPE == tag ]]; then
make teste2e
else
make teste2e-covdata
fi
env:
ORAS_PATH: bin/linux/amd64/oras
- name: Check Version
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright The ORAS Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: golangci-lint

on:
pull_request:
paths-ignore:
- 'docs/**'

permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.20']
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
3 changes: 1 addition & 2 deletions .github/workflows/release-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ jobs:
if [[ "${VERSION}" == "${BRANCH_NAME}" ]]; then
VERSION=$(git rev-parse --short HEAD)
fi
echo ::set-output name=version::${VERSION}
echo ::set-output name=ref::ghcr.io/${{ github.repository }}:${VERSION}
echo "ref=ghcr.io/${{ github.repository }}:${VERSION}" >> $GITHUB_OUTPUT
- name: docker login
uses: docker/login-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: setup go environment
uses: actions/setup-go@v3
with:
go-version: '1.20.2'
go-version: '1.20.5'
- name: run goreleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright The ORAS Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: "Close stale issues and PRs"
on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
stale-issue-message: "This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days."
stale-pr-message: "This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 30 days."
close-issue-message: "This issue was closed because it has been stalled for 30 days with no activity."
close-pr-message: "This PR was closed because it has been stalled for 30 days with no activity."
days-before-issue-stale: 60
days-before-pr-stale: 45
days-before-issue-close: 30
days-before-pr-close: 30
exempt-all-milestones: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ debug

# Custom
coverage.txt
test/e2e/coverage.txt
**/covcounters.*
**/covmeta.*
bin/
dist/
*.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Contributing

Please refer to the [ORAS Contributing guide](https://oras.land/contributing/).
Please refer to the [ORAS Contributing guide](https://oras.land/docs/community/contributing_guide).
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM docker.io/library/golang:1.20.2-alpine as builder
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.20.5-alpine as builder
ARG TARGETPLATFORM
RUN apk add git make
ENV ORASPKG /oras
Expand Down
57 changes: 36 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,95 +32,110 @@ LDFLAGS += -X $(PROJECT_PKG)/internal/version.GitCommit=${GIT_COMMIT}
LDFLAGS += -X $(PROJECT_PKG)/internal/version.GitTreeState=${GIT_DIRTY}

.PHONY: test
test: tidy vendor check-encoding
test: tidy vendor check-encoding ## tidy and run tests
$(GO_EXE) test -race -v -coverprofile=coverage.txt -covermode=atomic ./...

.PHONY: teste2e
teste2e: ## run end to end tests
./test/e2e/scripts/e2e.sh $(shell git rev-parse --show-toplevel) --clean

.PHONY: covhtml
covhtml:
covhtml: ## look at code coverage
open .cover/coverage.html

.PHONY: clean
clean:
clean: ## clean up build
git status --ignored --short | grep '^!! ' | sed 's/!! //' | xargs rm -rf

.PHONY: build
build: build-linux build-mac build-windows
build: build-linux build-mac build-windows ## build for all targets

.PHONY: build-linux
build-linux: build-linux-amd64 build-linux-arm64 build-linux-arm-v7 build-linux-s390x
build-linux: build-linux-amd64 build-linux-arm64 build-linux-arm-v7 build-linux-s390x ## build all linux architectures

.PHONY: build-linux-amd64
build-linux-amd64:
build-linux-amd64: ## build for linux amd64
GOARCH=amd64 CGO_ENABLED=0 GOOS=linux $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/linux/amd64/$(CLI_EXE) $(CLI_PKG)

.PHONY: build-linux-arm64
build-linux-arm64:
build-linux-arm64: ## build for linux arm64
GOARCH=arm64 CGO_ENABLED=0 GOOS=linux $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/linux/arm64/$(CLI_EXE) $(CLI_PKG)

.PHONY: build-linux-arm-v7
build-linux-arm-v7:
build-linux-arm-v7: ## build for linux arm v7
GOARCH=arm CGO_ENABLED=0 GOOS=linux $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/linux/arm/v7/$(CLI_EXE) $(CLI_PKG)

.PHONY: build-linux-s390x
build-linux-s390x:
build-linux-s390x: ## build for linux s390x
GOARCH=s390x CGO_ENABLED=0 GOOS=linux $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/linux/s390x/$(CLI_EXE) $(CLI_PKG)

.PHONY: build-mac
build-mac: build-mac-arm64 build-mac-amd64
build-mac: build-mac-arm64 build-mac-amd64 ## build all mac architectures

.PHONY: build-mac-amd64
build-mac-amd64:
build-mac-amd64: ## build for mac amd64
GOARCH=amd64 CGO_ENABLED=0 GOOS=darwin $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/darwin/amd64/$(CLI_EXE) $(CLI_PKG)

.PHONY: build-mac-arm64
build-mac-arm64:
build-mac-arm64: ## build for mac arm64
GOARCH=arm64 CGO_ENABLED=0 GOOS=darwin $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/darwin/arm64/$(CLI_EXE) $(CLI_PKG)

.PHONY: build-windows
build-windows: build-windows-amd64 build-windows-arm64
build-windows: build-windows-amd64 build-windows-arm64 ## build all windows architectures

.PHONY: build-windows-amd64
build-windows-amd64:
build-windows-amd64: ## build for windows amd64
GOARCH=amd64 CGO_ENABLED=0 GOOS=windows $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/windows/amd64/$(CLI_EXE).exe $(CLI_PKG)

.PHONY: build-windows-arm64
build-windows-arm64:
build-windows-arm64: ## build for windows arm64
GOARCH=arm64 CGO_ENABLED=0 GOOS=windows $(GO_EXE) build -v --ldflags="$(LDFLAGS)" \
-o bin/windows/arm64/$(CLI_EXE).exe $(CLI_PKG)

.PHONY: check-encoding
check-encoding:
check-encoding: ## check file CR/LF encoding
! find cmd internal -name "*.go" -type f -exec file "{}" ";" | grep CRLF

.PHONY: fix-encoding
fix-encoding:
fix-encoding: ## fix file CR/LF encoding
find cmd internal -type f -name "*.go" -exec sed -i -e "s/\r//g" {} +

.PHONY: tidy
tidy:
tidy: ## go mod tidy
GO111MODULE=on $(GO_EXE) mod tidy

.PHONY: vendor
vendor:
vendor: ## go mod vendor
GO111MODULE=on $(GO_EXE) mod vendor

.PHONY: fetch-dist
fetch-dist:
fetch-dist: ## fetch distribution
mkdir -p _dist
cd _dist && \
for obj in ${TARGET_OBJS} ; do \
curl -sSL -o oras_${VERSION}_$${obj} https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_$${obj} ; \
done

.PHONY: sign
sign:
sign: ## sign
for f in $$(ls _dist/*.{gz,txt} 2>/dev/null) ; do \
gpg --armor --detach-sign $${f} ; \
done

.PHONY: teste2e-covdata
teste2e-covdata: ## test e2e coverage
export GOCOVERDIR=$(CURDIR)/test/e2e/.cover; \
rm -rf $$GOCOVERDIR; \
mkdir -p $$GOCOVERDIR; \
$(MAKE) teste2e && $(GO_EXE) tool covdata textfmt -i=$$GOCOVERDIR -o "$(CURDIR)/test/e2e/coverage.txt"

.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[%\/0-9A-Za-z_-]+:.*?##/ { printf " \033[36m%-45s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
[![codecov](https://codecov.io/gh/oras-project/oras/branch/main/graph/badge.svg)](https://codecov.io/gh/oras-project/oras)


![ORAS](https://github.com/oras-project/oras-www/raw/main/docs/assets/images/oras.png)
<p align="left">
<a href="https://oras.land/"><img src="https://oras.land/img/oras.svg" alt="banner" width="100px"></a>
</p>

## Docs

Documentation for the ORAS CLI is located on
the project website: [oras.land/cli](https://oras.land/cli/)
the project website: [oras.land/cli](https://oras.land/docs/category/oras-commands)

## Development Environment Setup

Refer to the [development guide](https://oras.land/cli/5_developer_guide/) to get started [contributing to ORAS](https://oras.land/contributing/).
Refer to the [development guide](https://oras.land/docs/community/developer_guide) to get started [contributing to ORAS](https://oras.land/docs/community/contributing_guide).

## Code of Conduct

Expand Down
5 changes: 3 additions & 2 deletions cmd/oras/internal/display/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (p *tagManifestStatusForRepo) PushReference(ctx context.Context, expected o
if p.printHint != nil {
p.printHint.Do(func() {
ref := p.refPrefix + "@" + expected.Digest.String()
Print("Tagging", ref)
_ = Print("Tagging", ref)
})
}
if err := p.Repository.PushReference(ctx, expected, content, reference); err != nil {
Expand All @@ -136,9 +136,10 @@ func (p *tagManifestStatusForTarget) Tag(ctx context.Context, desc ocispec.Descr
if p.printHint != nil {
p.printHint.Do(func() {
ref := p.refPrefix + "@" + desc.Digest.String()
Print("Tagging", ref)
_ = Print("Tagging", ref)
})
}

if err := p.Target.Tag(ctx, desc, reference); err != nil {
return err
}
Expand Down
8 changes: 8 additions & 0 deletions cmd/oras/internal/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ limitations under the License.
package errors

import (
"errors"
"fmt"

"oras.land/oras-go/v2/registry"
"oras.land/oras-go/v2/registry/remote"
)

// NewErrInvalidReference creates a new error based on the reference string.
Expand All @@ -30,3 +32,9 @@ func NewErrInvalidReference(ref registry.Reference) error {
func NewErrInvalidReferenceStr(ref string) error {
return fmt.Errorf("%s: invalid image reference, expecting <name:tag|name@digest>", ref)
}

// IsReferrersIndexDelete checks if err is a referrers index delete error.
func IsReferrersIndexDelete(err error) bool {
var re *remote.ReferrersError
return errors.As(err, &re) && re.IsReferrersIndexDelete()
}
2 changes: 1 addition & 1 deletion cmd/oras/internal/option/applier.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type FlagApplier interface {
// NOTE: The option argument need to be a pointer to the options, so its value
// becomes addressable.
func ApplyFlags(optsPtr interface{}, target *pflag.FlagSet) {
rangeFields(optsPtr, func(fa FlagApplier) error {
_ = rangeFields(optsPtr, func(fa FlagApplier) error {
fa.ApplyFlags(target)
return nil
})
Expand Down
14 changes: 3 additions & 11 deletions cmd/oras/internal/option/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,7 @@ func (opts *Common) ApplyFlags(fs *pflag.FlagSet) {
fs.BoolVarP(&opts.Verbose, "verbose", "v", false, "verbose output")
}

// SetLoggerLevel sets up the logger based on common options.
func (opts *Common) SetLoggerLevel() (context.Context, logrus.FieldLogger) {
var logLevel logrus.Level
if opts.Debug {
logLevel = logrus.DebugLevel
} else if opts.Verbose {
logLevel = logrus.InfoLevel
} else {
logLevel = logrus.WarnLevel
}
return trace.WithLoggerLevel(context.Background(), logLevel)
// WithContext returns a new FieldLogger and an associated Context derived from ctx.
func (opts *Common) WithContext(ctx context.Context) (context.Context, logrus.FieldLogger) {
return trace.NewLogger(ctx, opts.Debug, opts.Verbose)
}
Loading