This commit is contained in:
Chris Richardson
2025-05-12 18:09:43 -04:00
parent 03688d481d
commit a15be35063
3 changed files with 42 additions and 20 deletions

41
.gitea/gitea-ci.yaml Normal file
View File

@@ -0,0 +1,41 @@
name: Build And Test
run-name: ${{ gitea.actor }} is runs ci pipeline
on: [ push ]
jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: https://github.com/actions/checkout@v4
# - name: Use Node.js
# uses: https://github.com/actions/setup-node@v3
# with:
# node-version: '18.17'
# - run: npm ci
# - run: npm run lint
# - run: npm run test
# - run: npm run build:prod
# env:
# NODE_OPTIONS: --max_old_space_size=4096
publish:
runs-on: ubuntu-latest
needs: build
if: gitea.ref == 'refs/heads/main'
steps:
- uses: https://github.com/actions/checkout@v4
# - name: Set up Docker Buildx
# uses: https://github.com/docker/setup-buildx-action@v3
# with:
# config-inline: |
# [registry."<my-private-unsecure-git-repository-ip-address>:5000"]
# http = true
# insecure = true
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: "private-registry:5000/python-locust-example:${{gitea.sha}},private-registry:5000/python-locust-example:latest"

View File

@@ -1,4 +1,4 @@
FROM docker.apple.com/piedss/locust-2:2.7.0.6
RUN mkdir -p /home/locust/tests/
ADD .dist/usr/local/load_tests/locust-example /home/locust/tests/
ADD test_example.py /home/locust/tests/

View File

@@ -1,19 +0,0 @@
schemaVersion: 2.0
pipelines:
- branchName: develop
name: build_container
machine:
baseImage: docker.apple.com/piedss/locust:1.1.31
build:
template: freestyle:v4:publish
steps:
- mkdir -p .dist/usr/local/load_tests/locust-example/
- cp test_example.py .dist/usr/local/load_tests/locust-example/
package:
version: "0.1.${RIO_BUILD_NUMBER}"
dockerfile:
- publish:
- repo: docker.apple.com/piedss/locust-example-python
dockerfilePath: Dockerfile
perApplication: false