Skip to content
Merged
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
21 changes: 21 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Container runtime files are consumed inside Linux images: a CRLF checkout on
# Windows would break `sh entrypoint.sh` and Dockerfile inputs.
shenyu-dist/**/docker/Dockerfile text eol=lf
shenyu-dist/**/docker/*.sh text eol=lf
script/*.sh text eol=lf
62 changes: 62 additions & 0 deletions .github/workflows/docker-image-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: docker-image-smoke

# Path-filtered on purpose: this is a distribution smoke test, not part of the
# main build. While the `pull_request.paths` filter is present, do not add this
# workflow to the required-status-check list (a docs-only PR would never report a
# result and would stay blocked); remove the filter first if it must be required.
on:
pull_request:
paths:
- 'shenyu-dist/**/docker/**'
- 'shenyu-dist/**/src/main/assembly/**'
- 'Makefile'
- 'script/docker-image-smoke.sh'
- 'docs/container-runtime.md'
- '.github/workflows/docker-image-smoke.yml'
push:
branches:
- master
paths:
- 'shenyu-dist/**/docker/**'
- 'shenyu-dist/**/src/main/assembly/**'
- 'Makefile'
- 'script/docker-image-smoke.sh'
- 'docs/container-runtime.md'
- '.github/workflows/docker-image-smoke.yml'

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
smoke:
if: github.repository == 'apache/shenyu'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: ./actions/setup-java-with-retry
with:
java-version: "17"
distribution: "temurin"
- name: Run container runtime smoke checks
run: bash script/docker-image-smoke.sh
4 changes: 2 additions & 2 deletions .github/workflows/integrated-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ jobs:
docker pull "$image"
}

pull_with_retry alpine:latest
pull_with_retry alpine:3.24
pull_with_retry amazoncorretto:17.0.21-alpine3.24
pull_with_retry amazoncorretto:17.0.11-alpine3.19
pull_with_retry centos:7
pull_with_retry eclipse-temurin:17-centos7
pull_with_retry elasticsearch:8.2.3
pull_with_retry otel/opentelemetry-collector-contrib:0.111.0
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ build-bootstrap:
-Prelease \
clean package

smoke-image: ## smoke test the container runtime contract of the distribution images
@bash script/docker-image-smoke.sh

build-all-image: build-admin-image build-bootstrap-image ## build images on local, does not support multi platforms.
@echo "build images"

Expand All @@ -75,7 +78,7 @@ build-bootstrap-image: build-bootstrap ## build bootstrap image for local
publish-all-images: init publish-admin-image publish-bootstrap-image ## build and publish images on buildx, for producing multi platform images
@docker buildx rm shenyu

.PHONY: init
.PHONY: init smoke-image
init:
@docker buildx create --name shenyu
@docker buildx use shenyu
Expand All @@ -95,8 +98,8 @@ publish-bootstrap-image: build-bootstrap
@echo "build and push bootstrap image"
@docker buildx build --push \
--platform=linux/arm64,linux/amd64 \
-t ${REGISTRY}/${BOOSTRAP_REPOSITORY}:latest \
-t ${REGISTRY}/${BOOSTRAP_REPOSITORY}:${VERSION} \
-t ${REGISTRY}/${BOOTSTRAP_REPOSITORY}:latest \
-t ${REGISTRY}/${BOOTSTRAP_REPOSITORY}:${VERSION} \
--build-arg APP_NAME=apache-shenyu-${VERSION}-bootstrap-bin \
--label "commit.id=${COMMIT_ID}" \
-f ${SHENYU_HOME}/shenyu-dist/shenyu-bootstrap-dist/docker/Dockerfile \
Expand Down
Loading
Loading