forked from kubesphere/devops-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: rick <1450685+LinuxSuRen@users.noreply.github.com>
- Loading branch information
1 parent
e96b79e
commit d14eb44
Showing
12 changed files
with
696 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,292 @@ | ||
name: Build Podman Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- test-* # make it be easier for contributors to test | ||
tags: | ||
- 'v*.*.*' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
BuildBase: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Docker meta for KubeSphere | ||
id: meta | ||
if: github.repository_owner == 'kubesphere' | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
kubespheredev/builder-base | ||
ghcr.io/${{ github.repository_owner }}/builder-base | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern=v{{version}}-podman | ||
type=sha | ||
- name: Docker meta for Contributors | ||
id: metaContributors | ||
if: github.repository_owner != 'kubesphere' | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
ghcr.io/${{ github.repository_owner }}/builder-base | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch,suffix=-podman | ||
type=ref,event=pr,suffix=-podman | ||
type=semver,pattern=v{{version}}-podman | ||
type=sha,suffix=-podman | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_SECRETS }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GHCR_TOKEN }} | ||
- name: Build and push Docker images | ||
uses: docker/build-push-action@v2.4.0 | ||
if: github.repository_owner == 'kubesphere' | ||
with: | ||
context: base | ||
file: base/podman/Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 | ||
- name: Build and push Docker images for Contributors | ||
uses: docker/build-push-action@v2.4.0 | ||
if: github.repository_owner != 'kubesphere' | ||
with: | ||
context: base | ||
file: base/podman/Dockerfile | ||
tags: ${{ steps.metaContributors.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.metaContributors.outputs.labels }} | ||
platforms: linux/amd64 | ||
|
||
BuildGo: | ||
needs: BuildBase | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Docker meta for KubeSphere | ||
id: meta | ||
if: github.repository_owner == 'kubesphere' | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
kubespheredev/builder-go | ||
ghcr.io/${{ github.repository_owner }}/builder-go | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch,suffix=-podman | ||
type=ref,event=pr,suffix=-podman | ||
type=semver,pattern=v{{version}}-podman | ||
type=sha,suffix=-podman | ||
- name: Docker meta for Contributors | ||
id: metaContributors | ||
if: github.repository_owner != 'kubesphere' | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
ghcr.io/${{ github.repository_owner }}/builder-go | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern=v{{version}}-podman | ||
type=sha | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_SECRETS }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GHCR_TOKEN }} | ||
- name: Build and push Docker images | ||
uses: docker/build-push-action@v2.4.0 | ||
if: github.repository_owner == 'kubesphere' | ||
with: | ||
context: go | ||
file: go/podman/Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 | ||
- name: Build and push Docker images for Contributors | ||
uses: docker/build-push-action@v2.4.0 | ||
if: github.repository_owner != 'kubesphere' | ||
with: | ||
context: go | ||
file: go/podman/Dockerfile | ||
tags: ${{ steps.metaContributors.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.metaContributors.outputs.labels }} | ||
platforms: linux/amd64 | ||
|
||
BuildMaven: | ||
needs: BuildBase | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Docker meta for KubeSphere | ||
id: meta | ||
if: github.repository_owner == 'kubesphere' | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
kubespheredev/builder-maven | ||
ghcr.io/${{ github.repository_owner }}/builder-maven | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch,suffix=-podman | ||
type=ref,event=pr,suffix=-podman | ||
type=semver,pattern=v{{version}}-podman | ||
type=sha,suffix=-podman | ||
- name: Docker meta for Contributors | ||
id: metaContributors | ||
if: github.repository_owner != 'kubesphere' | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
ghcr.io/${{ github.repository_owner }}/builder-maven | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch,suffix=-podman | ||
type=ref,event=pr,suffix=-podman | ||
type=semver,pattern=v{{version}}-podman | ||
type=sha,suffix=-podman | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_SECRETS }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GHCR_TOKEN }} | ||
- name: Build and push Docker images | ||
uses: docker/build-push-action@v2.4.0 | ||
if: github.repository_owner == 'kubesphere' | ||
with: | ||
context: maven | ||
file: maven/podman/Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 | ||
- name: Build and push Docker images for Contributors | ||
uses: docker/build-push-action@v2.4.0 | ||
if: github.repository_owner != 'kubesphere' | ||
with: | ||
context: maven | ||
file: maven/podman/Dockerfile | ||
tags: ${{ steps.metaContributors.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.metaContributors.outputs.labels }} | ||
platforms: linux/amd64 | ||
|
||
BuildNodeJs: | ||
needs: BuildBase | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Docker meta for KubeSphere | ||
id: meta | ||
if: github.repository_owner == 'kubesphere' | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
kubespheredev/builder-nodejs | ||
ghcr.io/${{ github.repository_owner }}/builder-nodejs | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch,suffix=-podman | ||
type=ref,event=pr,suffix=-podman | ||
type=semver,pattern=v{{version}}-podman | ||
type=sha,suffix=-podman | ||
- name: Docker meta for Contributors | ||
id: metaContributors | ||
if: github.repository_owner != 'kubesphere' | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: | | ||
ghcr.io/${{ github.repository_owner }}/builder-nodejs | ||
tags: | | ||
type=schedule | ||
type=ref,event=branch,suffix=-podman | ||
type=ref,event=pr,suffix=-podman | ||
type=semver,pattern=v{{version}}-podman | ||
type=sha,suffix=-podman | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USER }} | ||
password: ${{ secrets.DOCKER_HUB_SECRETS }} | ||
- name: Login to GHCR | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GHCR_TOKEN }} | ||
- name: Build and push Docker images | ||
uses: docker/build-push-action@v2.4.0 | ||
if: github.repository_owner == 'kubesphere' | ||
with: | ||
context: nodejs | ||
file: nodejs/podman/Dockerfile | ||
tags: ${{ steps.meta.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64 | ||
- name: Build and push Docker images for Contributors | ||
uses: docker/build-push-action@v2.4.0 | ||
if: github.repository_owner != 'kubesphere' | ||
with: | ||
context: nodejs | ||
file: nodejs/podman/Dockerfile | ||
tags: ${{ steps.metaContributors.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.metaContributors.outputs.labels }} | ||
platforms: linux/amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
COMMIT := $(shell git rev-parse --short HEAD) | ||
VERSION := dev-$(shell git describe --tags $(shell git rev-list --tags --max-count=1)) | ||
|
||
build-base-podman: | ||
docker build base -f base/podman/Dockerfile -t kubespheredev/builder-base:$(VERSION)-podman | ||
push-base-podman: | ||
docker push kubespheredev/builder-base:$(VERSION)-podman | ||
|
||
build-maven-podman: | ||
docker build maven -f maven/podman/Dockerfile -t kubespheredev/builder-maven:$(VERSION)-podman | ||
push-maven-podman: | ||
docker push kubespheredev/builder-maven:$(VERSION)-podman | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
There're two base images base on different container runtime here: | ||
|
||
* Docker | ||
* Podman | ||
|
||
## Podman | ||
|
||
In order to make it be easy to use. We provide some default conf files: | ||
|
||
* [containers.conf](containers.conf) | ||
* [registries.conf](registries.conf) | ||
* Add `docker.io` into the default registries for keeping compatible | ||
* [storage.conf](storage.conf) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[engine] | ||
cgroup_manager="cgroupfs" | ||
events_logger="file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.