asD
This commit is contained in:
41
.gitea/gitea-ci.yaml
Normal file
41
.gitea/gitea-ci.yaml
Normal 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"
|
||||
|
||||
@@ -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/
|
||||
|
||||
19
rio.yaml
19
rio.yaml
@@ -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
|
||||
Reference in New Issue
Block a user