Skip to content

Commit 31e1c44

Browse files
committed
Merge branch 'main' of github.com:drycc/base into main
2 parents 22e48ab + 681b39e commit 31e1c44

9 files changed

Lines changed: 117 additions & 112 deletions

File tree

.drone/drone.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

.drone/manifest.tmpl

Lines changed: 0 additions & 12 deletions
This file was deleted.

.woodpecker/build-linux.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
matrix:
2+
platform:
3+
- linux/amd64
4+
- linux/arm64
5+
6+
platform: ${platform}
7+
8+
labels:
9+
type: exec
10+
11+
pipeline:
12+
- name: publish-linux
13+
image: bash
14+
commands:
15+
- 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 clean docker-build docker-immutable-push clean
18+
secrets:
19+
- dev_registry
20+
- drycc_registry
21+
- container_username
22+
- container_password
23+
when:
24+
event:
25+
- push
26+
- tag
27+
28+
depends_on:
29+
- test-linux

.woodpecker/manifest.tmpl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
image: registry.drycc.cc/drycc/{{project}}:bullseye
2+
{{#if build.tags}}
3+
tags:
4+
{{#each build.tags}}
5+
- {{this}}
6+
{{/each}}
7+
{{/if}}
8+
manifests:
9+
-
10+
image: registry.drycc.cc/drycc/{{project}}:bullseye-amd64
11+
platform:
12+
architecture: amd64
13+
os: linux
14+
-
15+
image: registry.drycc.cc/drycc/{{project}}:bullseye-arm64
16+
platform:
17+
architecture: arm64
18+
os: linux

.woodpecker/manifest.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
platform: linux/amd64
2+
3+
labels:
4+
type: exec
5+
6+
pipeline:
7+
- name: generate-manifest
8+
image: bash
9+
commands:
10+
- sed -i "s/{{project}}/$${CI_REPO_NAME}/g" .woodpecker/manifest.tmpl
11+
- sed -i "s/registry.drycc.cc/$${DRYCC_REGISTRY}/g" .woodpecker/manifest.tmpl
12+
secrets:
13+
- drycc_registry
14+
when:
15+
event:
16+
- tag
17+
- push
18+
19+
- name: publish-manifest
20+
image: bash
21+
commands:
22+
- docker run --rm
23+
-e PLUGIN_SPEC=.woodpecker/manifest.tmpl
24+
-e PLUGIN_USERNAME=$CONTAINER_USERNAME
25+
-e PLUGIN_PASSWORD=$CONTAINER_PASSWORD
26+
-v $(pwd):$(pwd)
27+
-w $(pwd)
28+
plugins/manifest
29+
secrets:
30+
- container_username
31+
- container_password
32+
when:
33+
event:
34+
- tag
35+
- push
36+
37+
depends_on:
38+
- build-linux

.woodpecker/test-linux.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
matrix:
2+
platform:
3+
- linux/amd64
4+
- linux/arm64
5+
6+
platform: ${platform}
7+
8+
labels:
9+
type: exec
10+
11+
pipeline:
12+
- name: test-linux
13+
image: bash
14+
commands:
15+
- make test
16+
secrets:
17+
- dev_registry
18+
when:
19+
event:
20+
- push
21+
- tag

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ ARG BASE_LAYER
22
FROM ${BASE_LAYER}
33
ENV LANG C.UTF-8
44
SHELL ["/bin/bash", "-c"]
5-
ENTRYPOINT ["init-stack"]
5+
ENTRYPOINT ["init-stack"]

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@ clean:
1515
mkimage:
1616
./scripts/mkimage.sh minbase "${CODENAME}"
1717

18-
build: mkimage
18+
docker-build: mkimage
1919
@docker build . \
2020
--tag ${IMAGE} \
2121
--build-arg BASE_LAYER=$(shell docker import ${WORK_DIR}.tar.gz) \
2222
--file Dockerfile
2323

24-
publish: test-style build
24+
docker-immutable-push: test-style build
2525
@docker push "${IMAGE}"
2626
@echo -e "\\033[32m---> Build image $codename complete, enjoy life...\\033[0m"
2727

28+
build: docker-build
29+
30+
publish: docker-immutable-push
31+
32+
test: test-style
33+
2834
test-style:
29-
${SHELLCHECK_PREFIX} $(SHELL_SCRIPTS)
35+
${SHELLCHECK_PREFIX} $(SHELL_SCRIPTS)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Drycc Base Image
22

3-
[![Build Status](https://drone.drycc.cc/api/badges/drycc/base/status.svg)](https://drone.drycc.cc/drycc/base)
3+
[![Build Status](https://woodpecker.drycc.cc/api/badges/drycc/base/status.svg)](https://woodpecker.drycc.cc/drycc/base)
44

55
A slimmed-down Debian-based container image used as the basis of [Drycc Workflow](https://github.com/drycc/workflow) and other components.
66

0 commit comments

Comments
 (0)