Skip to content

Commit d0bf429

Browse files
committed
chore(passport): use podman replace docker
1 parent 3b6775c commit d0bf429

5 files changed

Lines changed: 34 additions & 37 deletions

File tree

.woodpecker/build-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pipeline:
1313
image: bash
1414
commands:
1515
- export VERSION=$([ -z $CI_COMMIT_TAG ] && echo latest || echo $CI_COMMIT_TAG)-$(sed 's#/#-#g' <<< $CI_SYSTEM_ARCH)
16-
- echo $CONTAINER_PASSWORD | docker login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
17-
- make docker-build docker-immutable-push
16+
- echo $CONTAINER_PASSWORD | podman login $DRYCC_REGISTRY --username $CONTAINER_USERNAME --password-stdin > /dev/null 2>&1
17+
- make podman-build podman-immutable-push
1818
secrets:
1919
- codename
2020
- dev_registry

.woodpecker/manifest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ pipeline:
1919
- name: publish-manifest
2020
image: bash
2121
commands:
22-
- docker run --rm
22+
- podman run --rm
2323
-e PLUGIN_SPEC=.woodpecker/manifest.tmpl
2424
-e PLUGIN_USERNAME=$CONTAINER_USERNAME
2525
-e PLUGIN_PASSWORD=$CONTAINER_PASSWORD
2626
-e DRONE_TAG=$CI_COMMIT_TAG
2727
-v $(pwd):$(pwd)
2828
-w $(pwd)
29-
plugins/manifest
29+
docker.io/plugins/manifest
3030
secrets:
3131
- container_username
3232
- container_password

.woodpecker/test-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pipeline:
1212
- name: test-linux
1313
image: bash
1414
commands:
15-
- make test docker-build-test upload-coverage
15+
- make test podman-build-test upload-coverage
1616
secrets:
1717
- codename
1818
- dev_registry

Makefile

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PLATFORM ?= linux/amd64,linux/arm64
77

88
include versioning.mk
99

10-
SHELLCHECK_PREFIX := docker run -v ${CURDIR}:/workdir -w /workdir ${DEV_REGISTRY}/drycc/go-dev shellcheck
10+
SHELLCHECK_PREFIX := podman run -v ${CURDIR}:/workdir -w /workdir ${DEV_REGISTRY}/drycc/go-dev shellcheck
1111
SHELL_SCRIPTS = $(wildcard rootfs/bin/*) $(shell find "rootfs" -name '*.sh') $(wildcard _scripts/*.sh)
1212

1313
# Test processes used in quick unit testing
@@ -19,44 +19,41 @@ check-kubectl:
1919
exit 2; \
2020
fi
2121

22-
check-docker:
23-
@if [ -z $$(which docker) ]; then \
24-
echo "Missing \`docker\` client which is required for development"; \
22+
check-podman:
23+
@if [ -z $$(which podman) ]; then \
24+
echo "Missing \`podman\` client which is required for development"; \
2525
exit 2; \
2626
fi
2727

28-
build: docker-build
28+
build: podman-build
2929

30-
docker-build: check-docker
31-
docker build ${DOCKER_BUILD_FLAGS} --build-arg CODENAME=${CODENAME} -t ${IMAGE} rootfs
32-
docker tag ${IMAGE} ${MUTABLE_IMAGE}
30+
podman-build: check-podman
31+
podman build --build-arg CODENAME=${CODENAME} -t ${IMAGE} rootfs
32+
podman tag ${IMAGE} ${MUTABLE_IMAGE}
3333

34-
docker-buildx: check-docker
35-
docker buildx build --build-arg CODENAME=${CODENAME} --platform ${PLATFORM} -t ${IMAGE} rootfs --push
34+
podman-build-test: check-podman
35+
podman build --build-arg CODENAME=${CODENAME} -t ${IMAGE}.test -f rootfs/Dockerfile.test rootfs
3636

37-
docker-build-test: check-docker
38-
docker build ${DOCKER_BUILD_FLAGS} --build-arg CODENAME=${CODENAME} -t ${IMAGE}.test -f rootfs/Dockerfile.test rootfs
39-
40-
deploy: check-kubectl docker-build docker-push
37+
deploy: check-kubectl podman-build podman-push
4138
kubectl --namespace=drycc patch deployment drycc-$(COMPONENT) --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"$(IMAGE)"}]'
4239

43-
clean: check-docker
44-
docker rmi $(IMAGE)
40+
clean: check-podman
41+
podman rmi $(IMAGE)
4542

4643
commit-hook:
4744
cp _scripts/util/commit-msg .git/hooks/commit-msg
4845

49-
full-clean: check-docker
50-
docker images -q $(IMAGE_PREFIX)/$(COMPONENT) | xargs docker rmi -f
46+
full-clean: check-podman
47+
podman images -q $(IMAGE_PREFIX)/$(COMPONENT) | xargs podman rmi -f
5148

5249
test: test-style test-unit test-functional
5350

54-
test-style: docker-build-test
55-
docker run -v ${CURDIR}:/test -w /test/rootfs ${IMAGE}.test /test/rootfs/bin/test-style
51+
test-style: podman-build-test
52+
podman run -v ${CURDIR}:/test -w /test/rootfs ${IMAGE}.test /test/rootfs/bin/test-style
5653
${SHELLCHECK_PREFIX} $(SHELL_SCRIPTS)
5754

58-
test-unit: docker-build-test
59-
docker run -v ${CURDIR}:/test -w /test/rootfs ${IMAGE}.test /test/rootfs/bin/test-unit
55+
test-unit: podman-build-test
56+
podman run -v ${CURDIR}:/test -w /test/rootfs ${IMAGE}.test /test/rootfs/bin/test-unit
6057

6158
test-functional:
6259
@echo "Implement functional tests in _tests directory"
@@ -66,6 +63,6 @@ test-integration:
6663

6764
upload-coverage:
6865
$(eval CI_ENV := $(shell curl -s https://codecov.io/env | bash))
69-
docker run ${CI_ENV} -v ${CURDIR}:/test -w /test/rootfs ${IMAGE}.test /test/rootfs/bin/upload-coverage
66+
podman run ${CI_ENV} -v ${CURDIR}:/test -w /test/rootfs ${IMAGE}.test /test/rootfs/bin/upload-coverage
7067

71-
.PHONY: check-kubectl check-docker build docker-build docker-build-test deploy clean commit-hook full-clean test test-style test-unit test-functional test-integration upload-coverage
68+
.PHONY: check-kubectl check-podman build podman-build podman-build-test deploy clean commit-hook full-clean test test-style test-unit test-functional test-integration upload-coverage

versioning.mk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ info:
1010
@echo "Immutable tag: ${IMAGE}"
1111
@echo "Mutable tag: ${MUTABLE_IMAGE}"
1212

13-
.PHONY: docker-push
14-
docker-push: docker-mutable-push docker-immutable-push
13+
.PHONY: podman-push
14+
podman-push: podman-mutable-push podman-immutable-push
1515

16-
.PHONY: docker-immutable-push
17-
docker-immutable-push:
18-
docker push ${IMAGE}
16+
.PHONY: podman-immutable-push
17+
podman-immutable-push:
18+
podman push ${IMAGE}
1919

20-
.PHONY: docker-mutable-push
21-
docker-mutable-push:
22-
docker push ${MUTABLE_IMAGE}
20+
.PHONY: podman-mutable-push
21+
podman-mutable-push:
22+
podman push ${MUTABLE_IMAGE}

0 commit comments

Comments
 (0)