Compare commits
5 commits
08089a16e7
...
58234199cf
Author | SHA1 | Date | |
---|---|---|---|
58234199cf | |||
2a5cc2d0c5 | |||
93c7a26579 | |||
7be58a9b5b | |||
cae3115061 |
7 changed files with 33 additions and 24 deletions
15
.github/workflows/build.yaml
vendored
Normal file
15
.github/workflows/build.yaml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: Lint
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
|
||||
buildx:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- uses: docker/setup-qemu-action@main
|
||||
- uses: docker/setup-buildx-action@main
|
||||
- uses: docker/build-push-action@main
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
|
@ -16,13 +16,7 @@
|
|||
# Build image with local docker daemon.
|
||||
[group('image')]
|
||||
@build:
|
||||
docker buildx build . --tag=kokuwaio/buildctl --platform=linux/amd64,linux/arm64 --push
|
||||
docker buildx build . --platform=linux/amd64,linux/arm64 --push --tag registry.kokuwa.io/b
|
||||
|
||||
# Inspect image with docker.
|
||||
[group('image')]
|
||||
@inspect: build
|
||||
docker image inspect kokuwaio/buildctl
|
||||
docker buildx build . --tag=kokuwaio/buildctl --platform=linux/amd64,linux/arm64
|
||||
|
||||
# Inspect image layers with `dive`.
|
||||
[group('image')]
|
||||
|
|
|
@ -12,7 +12,7 @@ steps:
|
|||
pull: true
|
||||
depends_on: []
|
||||
settings: &settings
|
||||
name: registry.kokuwa.io/buildctl:$CI_PIPELINE_NUMBER
|
||||
name: registry.kokuwa.io/kokuwaio/buildctl:ci-${CI_PIPELINE_NUMBER}
|
||||
auth:
|
||||
registry.kokuwa.io:
|
||||
username: {from_secret: kokuwa_io_username}
|
||||
|
@ -20,7 +20,7 @@ steps:
|
|||
platform: [linux/amd64, linux/arm64]
|
||||
annotation:
|
||||
org.opencontainers.image.title: Buildctl Plugin
|
||||
org.opencontainers.image.description: A Woodpecker CI plugin for yamllint to lint yaml files.
|
||||
org.opencontainers.image.description: A Woodpecker CI plugin for buildctl to build container images using a remote builtkitd instance.
|
||||
org.opencontainers.image.url: $CI_REPO_URL
|
||||
org.opencontainers.image.documentation: $CI_REPO_URL/README.md
|
||||
org.opencontainers.image.source: $CI_REPO_CLONE_URL
|
||||
|
|
|
@ -6,7 +6,6 @@ when:
|
|||
path: [.woodpecker/build.yaml, Dockerfile, Dockerfile.dockerignore, entrypoint.sh]
|
||||
|
||||
depends_on: [build]
|
||||
skip_clone: true
|
||||
matrix:
|
||||
PLATFORM: [amd64, arm64]
|
||||
labels:
|
||||
|
@ -14,25 +13,25 @@ labels:
|
|||
|
||||
steps:
|
||||
|
||||
pr:
|
||||
image: registry.kokuwa.io/buildctl:$CI_PIPELINE_NUMBER
|
||||
registry.kokuwa.io/kokuwaio/buildctl:ci-${CI_PIPELINE_NUMBER}:
|
||||
image: registry.kokuwa.io/kokuwaio/buildctl:ci-${CI_PIPELINE_NUMBER}
|
||||
pull: true
|
||||
commands: buildctl --version
|
||||
when:
|
||||
event: pull_request
|
||||
|
||||
kokuwa.io: &version
|
||||
image: kokuwa.io/buildctl
|
||||
registry.kokuwa.io/kokuwaio/buildctl: &version
|
||||
image: registry.kokuwa.io/kokuwaio/buildctl:latest
|
||||
pull: true
|
||||
commands: buildctl --version
|
||||
when:
|
||||
event: [manual, push]
|
||||
branch: main
|
||||
|
||||
docker.io:
|
||||
image: docker.io/kokuwaio/buildctl
|
||||
docker.io/kokuwaio/buildctl:
|
||||
image: docker.io/kokuwaio/buildctl:latest
|
||||
<<: *version
|
||||
|
||||
ghcr.io:
|
||||
image: ghcr.io/kokuwaio/buildctl
|
||||
ghcr.io/kokuwaio/buildctl:
|
||||
image: ghcr.io/kokuwaio/buildctl:latest
|
||||
<<: *version
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# bash is non-default location https://github.com/tianon/docker-bash/issues/29
|
||||
# hadolint only uses default locations https://github.com/hadolint/hadolint/issues/977
|
||||
# hadolint global ignore=DL4006
|
||||
|
||||
FROM docker.io/library/bash:5.2.37@sha256:01a15c6f48f6a3c08431cd77e11567823530b18159889dca3b7309b707beef91
|
||||
SHELL ["/usr/local/bin/bash", "-u", "-e", "-o", "pipefail", "-c"]
|
||||
|
||||
|
@ -17,7 +18,7 @@ RUN ARCH=$(uname -m) && \
|
|||
[[ $ARCH == aarch64 ]] && export SUFFIX=arm64; \
|
||||
[[ -z ${SUFFIX:-} ]] && echo "Unknown arch: $ARCH" && exit 1; \
|
||||
wget -q "https://github.com/moby/buildkit/releases/download/v0.21.0/buildkit-v0.21.0.linux-$SUFFIX.tar.gz" --output-document=- | tar --gz --extract --directory=/usr/local bin/buildctl && \
|
||||
chmod 555 /usr/local/bin/jq
|
||||
chmod 555 /usr/local/bin/buildctl
|
||||
|
||||
COPY --chmod=555 entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
|
|
@ -38,7 +38,7 @@ fi
|
|||
COMMAND="$COMMAND --frontend $BUILDCTL_FRONTEND"
|
||||
COMMAND="$COMMAND --local context='$BUILDCTL_CONTEXT'"
|
||||
COMMAND="$COMMAND --local dockerfile='$BUILDCTL_DOCKERFILE'"
|
||||
if [[ "${PLUGIN_PLATFORM:-}" == "true" ]]; then
|
||||
if [[ -n "${PLUGIN_PLATFORM:-}" ]]; then
|
||||
COMMAND="$COMMAND --opt platform='$PLUGIN_PLATFORM'"
|
||||
fi
|
||||
|
||||
|
|
|
@ -10,15 +10,15 @@
|
|||
"- docker.io/kokuwaio/buildctl:(?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+)",
|
||||
"- ghcr.io/kokuwaio/buildctl:(?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+)",
|
||||
"org.opencontainers.image.version: (?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+)",
|
||||
"https://github.com/moby/buildkit/releases/download/(?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+)/buildkit-v[0-9]+\\.[0-9]+\\.[0-9]+.linux-$SUFFIX.tar.gz",
|
||||
"https://github.com/moby/buildkit/releases/download/v[0-9]+\\.[0-9]+\\.[0-9]+/buildkit-(?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+).linux-$SUFFIX.tar.gz"
|
||||
"github.com/moby/buildkit/releases/download/(?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+)/buildkit-v[0-9]+\\.[0-9]+\\.[0-9]+.linux-\\$SUFFIX.tar.gz",
|
||||
"github.com/moby/buildkit/releases/download/v[0-9]+\\.[0-9]+\\.[0-9]+/buildkit-(?<currentValue>v[0-9]+\\.[0-9]+\\.[0-9]+).linux-\\$SUFFIX.tar.gz"
|
||||
],
|
||||
"datasourceTemplate": "github-tags",
|
||||
"packageNameTemplate": "moby/buildkit"
|
||||
},{
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["Dockerfile"],
|
||||
"matchStrings": ["https://github.com/jqlang/jq/releases/download/(?<currentValue>jq-[0-9]+\\.[0-9]+\\.[0-9]+)/jq-linux-$SUFFIX"],
|
||||
"matchStrings": ["github.com/jqlang/jq/releases/download/(?<currentValue>jq-[0-9]+\\.[0-9]+\\.[0-9]+)/jq-linux-\\$SUFFIX"],
|
||||
"datasourceTemplate": "github-tags",
|
||||
"packageNameTemplate": "jqlang/jq"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue