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

!feat(rootless): add podman for rootless #507

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
60 changes: 30 additions & 30 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.PHONY: test-docker build-docker build-linux-cgo release test-excoveralls
.PHONY: test-podman build-podman build-linux-cgo release test-excoveralls

AWS ?= $(shell which aws)
SHA_SUM ?= $(shell which shasum)
GPG ?= $(shell which gpg)
TAR ?= $(shell which tar)
DOCKER_RUN ?= $(shell which docker) run --rm
PODMAN_RUN ?= $(shell which podman) run --rm
PANDOC ?= $(shell which pandoc)

MAN_FILES = $(wildcard man/*.md)
Expand Down Expand Up @@ -35,7 +35,7 @@ endef
man/%: man/%.md
$(PANDOC) -s -t man $< -o $@

all: test-docker build-all $(MAN_PAGES)
all: test-podman build-all $(MAN_PAGES)

test:
go test $(shell go list ./... | grep -v /vendor/)
Expand Down Expand Up @@ -81,9 +81,9 @@ build-darwin:
PREFIX=artifacts/ \
BINARY_SUFFIX=-$(VERSION)-darwin-amd64

build-docker: BINARY_SUFFIX ?= -$(VERSION)-$$GOOS-$$GOARCH
build-docker:
$(DOCKER_RUN) \
build-podman: BINARY_SUFFIX ?= -$(VERSION)-$$GOOS-$$GOARCH
build-podman:
$(PODMAN_RUN) \
--env PREFIX=/artifacts/ \
--env BINARY_SUFFIX=${BINARY_SUFFIX} \
--env GOARCH \
Expand All @@ -95,53 +95,53 @@ build-docker:
--workdir "/src/$(PROJECT)" \
golang:1.15 make build BUILD_TAGS=${BUILD_TAGS}

build-docker-linux:
$(MAKE) build-docker GOOS=linux GOARCH=amd64 CGO_ENABLED=0
build-podman-linux:
$(MAKE) build-podman GOOS=linux GOARCH=amd64 CGO_ENABLED=0

build-docker-linux-arm64:
$(MAKE) build-docker GOOS=linux GOARCH=arm64 CGO_ENABLED=0
build-podman-linux-arm64:
$(MAKE) build-podman GOOS=linux GOARCH=arm64 CGO_ENABLED=0

build-docker-linux-cgo:
$(MAKE) build-docker GOOS=linux GOARCH=amd64 CGO_ENABLED=1 \
build-podman-linux-cgo:
$(MAKE) build-podman GOOS=linux GOARCH=amd64 CGO_ENABLED=1 \
BUILD_TAGS="netcgo" BINARY_SUFFIX=-$(VERSION)-netcgo-linux-amd64

test-docker:
$(DOCKER_RUN) \
test-podman:
$(PODMAN_RUN) \
--env GOPATH=/ \
--volume "$(PWD)":"/src/$(PROJECT)":ro \
--workdir "/src/$(PROJECT)" \
golang:1.15 make test

benchmark-docker:
$(DOCKER_RUN) \
benchmark-podman:
$(PODMAN_RUN) \
--env GOPATH=/ \
--volume "$(PWD)":"/src/$(PROJECT)":ro \
--workdir "/src/$(PROJECT)" \
golang:1.15 make benchmark

test-simplecov:
docker build -f integration-tests/simplecov/Dockerfile .
podman build -f integration-tests/simplecov/Dockerfile .

test-lcov:
docker build -f integration-tests/lcov/Dockerfile .
podman build -f integration-tests/lcov/Dockerfile .

test-covpy:
docker build -f integration-tests/coverage_py/Dockerfile .
podman build -f integration-tests/coverage_py/Dockerfile .

test-gcov:
docker build -f integration-tests/gcov/Dockerfile .
podman build -f integration-tests/gcov/Dockerfile .

test-gocov:
docker build -f integration-tests/gocov/Dockerfile .
podman build -f integration-tests/gocov/Dockerfile .

test-clover:
docker build -f integration-tests/clover/Dockerfile .
podman build -f integration-tests/clover/Dockerfile .

test-cobertura:
docker build -f integration-tests/cobertura/Dockerfile .
podman build -f integration-tests/cobertura/Dockerfile .

test-excoveralls:
docker build -f integration-tests/excoveralls/Dockerfile .
podman build -f integration-tests/excoveralls/Dockerfile .

publish-head:
$(call upload_artifacts,head)
Expand Down Expand Up @@ -174,17 +174,17 @@ tag:

# Must be run in a OS X machine. OS X binary is build natively.
manual-release:
$(MAKE) build-docker-linux
$(MAKE) build-docker-linux-arm64
$(MAKE) build-docker-linux-cgo
$(MAKE) build-podman-linux
$(MAKE) build-podman-linux-arm64
$(MAKE) build-podman-linux-cgo
$(MAKE) build-darwin
$(MAKE) gen-linux-checksum
$(MAKE) gen-linux-arm64-checksum
$(MAKE) gen-linux-cgo-checksum
$(MAKE) gen-darwin-checksum
$(MAKE) build-docker-linux VERSION=latest
$(MAKE) build-docker-linux-arm64 VERSION=latest
$(MAKE) build-docker-linux-cgo VERSION=latest
$(MAKE) build-podman-linux VERSION=latest
$(MAKE) build-podman-linux-arm64 VERSION=latest
$(MAKE) build-podman-linux-cgo VERSION=latest
$(MAKE) build-darwin VERSION=latest
$(MAKE) gen-linux-checksum VERSION=latest
$(MAKE) gen-linux-arm64-checksum VERSION=latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The test reporter is distributed as a pre-built binary named cc-test-reporter. Y

### Linux ARM64
- [codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-arm64](https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-arm64)
- [codeclimate.com/downloads/test-reporter/test-reporter-${VERSION}-linux-amd64](https://codeclimate.com/downloads/test-reporter/test-reporter-${VERSION}-linux-arm64)
- [codeclimate.com/downloads/test-reporter/test-reporter-${VERSION}-linux-arm64](https://codeclimate.com/downloads/test-reporter/test-reporter-${VERSION}-linux-arm64)

### Linux netcgo (recommended if you're using a VPN)
- [codeclimate.com/downloads/test-reporter/test-reporter-latest-netcgo-linux-amd64](https://codeclimate.com/downloads/test-reporter/test-reporter-latest-netcgo-linux-amd64)
Expand Down
6 changes: 3 additions & 3 deletions examples/go_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ RUN "$(go env GOPATH)/bin/go-bindata" -o global/assets.go -pkg global assets/...
travis.yml
```yaml
services:
- docker
- podman

script:
- docker build -t app .
- docker run --rm app ./codecoverage.sh
- podman build -t app .
- podman run --rm app ./codecoverage.sh
```


Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_suites.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
version: 2.0
defaults: &defaults
working_directory: ~/repo
docker:
podman:
- image: circleci/ruby:2.4.2-jessie-node-browsers
environment:
PGHOST: 127.0.0.1
Expand Down
4 changes: 2 additions & 2 deletions examples/php_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ jobs:
build:
environment:
CC_TEST_REPORTER_ID: YOUR_CODE_CLIMATE_REPORTER_ID
docker:
podman:
- image: notnoopci/php:7.1.5-browsers
working_directory: ~/repo
steps:
- checkout
- run: sudo pecl channel-update pecl.php.net
- run: sudo pecl install xdebug && sudo docker-php-ext-enable xdebug
- run: sudo pecl install xdebug && sudo podman-php-ext-enable xdebug
- run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- run: chmod +x ./cc-test-reporter
- run: sudo mkdir -p $CIRCLE_TEST_REPORTS/phpunit
Expand Down
4 changes: 2 additions & 2 deletions examples/ruby_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
RACK_ENV: test
COVERAGE: true
TZ: /usr/share/zoneinfo/America/Chicago
docker:
podman:
- image: circleci/ruby:2.5.1-stretch-node
environment:
PGHOST: 127.0.0.1
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
path: test-artifacts

upload-coverage:
docker:
podman:
- image: circleci/ruby:2.5.1-stretch-node
environment:
CC_TEST_REPORTER_ID: c3ff91e23ea0fea718bb62dae0a8a5440dc082d5d2bb508af6b33d0babac479a
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/spf13/cobra/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/spf13/cobra/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/sys/plan9/mksyscall.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/golang.org/x/sys/unix/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/golang.org/x/sys/unix/linux/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/sys/unix/linux/mkall.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/sys/unix/linux/mksysnum.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vendor/golang.org/x/sys/unix/mkall.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/sys/unix/mkerrors.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/sys/unix/mkpost.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/sys/unix/mksyscall.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions vendor/golang.org/x/tools/cmd/tip/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/gopkg.in/src-d/go-git.v4/_examples/storage/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions vendor/gopkg.in/src-d/go-git.v4/references_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.