-
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.
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 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,46 @@ | ||
name: runner-push-to-fit2cloud | ||
|
||
on: | ||
push: | ||
branches: | ||
- v3.x | ||
paths: | ||
- "Dockerfile.runner" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Prepare | ||
id: prepare | ||
run: | | ||
DOCKER_IMAGE=registry.fit2cloud.com/metersphere/task-runner | ||
DOCKER_PLATFORMS=linux/amd64,linux/arm64 | ||
TAG_NAME=3.x-python | ||
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}" | ||
echo ::set-output name=docker_image::${DOCKER_IMAGE} | ||
echo ::set-output name=version::${TAG_NAME} | ||
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ | ||
--build-arg VERSION=${TAG_NAME} \ | ||
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ | ||
--build-arg --no-cache \ | ||
--build-arg VCS_REF=${GITHUB_SHA::8} \ | ||
-f Dockerfile.runner \ | ||
${DOCKER_IMAGE_TAGS} . | ||
- name: Set up Docker Buildx | ||
uses: crazy-max/ghaction-docker-buildx@v3 | ||
- name: Docker Buildx (build) | ||
run: | | ||
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }} | ||
- name: Login to Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: registry.fit2cloud.com | ||
username: ${{ secrets.FIT2CLOUD_REGISTRY_USERNAME }} | ||
password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }} | ||
- name: Docker Buildx (push) | ||
run: | | ||
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} |
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,19 @@ | ||
ARG IMG_TAG=v3.x | ||
|
||
FROM registry.fit2cloud.com/metersphere/metersphere-ce:${IMG_TAG} as task-runner | ||
|
||
|
||
FROM registry.fit2cloud.com/metersphere/graalpy-community:3.10 | ||
|
||
COPY --from=task-runner /metersphere /metersphere | ||
COPY --from=task-runner /task-runner /task-runner | ||
COPY --from=task-runner /result-hub /result-hub | ||
COPY --from=task-runner /shells /shells | ||
COPY --from=task-runner /standalone /standalone | ||
COPY --from=task-runner /deployments /deployments | ||
COPY --from=task-runner /opt/jmeter /opt/jmeter | ||
|
||
RUN yum install -y java-21-openjdk | ||
|
||
RUN useradd -m appuser | ||
RUN echo 'appuser:appuser' | chpasswd |