Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 380c983a27 | |||
| 1e65e9b513 | |||
| 2a533ac5f5 | |||
| 9f7399722f | |||
| 78b96c5a83 | |||
| 8a64b4efc2 | |||
| 9f6012b9ce | |||
| 7a944caf44 |
@@ -8,16 +8,17 @@ steps:
|
||||
commands:
|
||||
- python3 -m unittest
|
||||
|
||||
- name: build
|
||||
- name: deploy
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: docker.dietrich-rink.de
|
||||
repo: docker.dietrich-rink.de/drone-test
|
||||
auto_tag: true
|
||||
force_tag: true
|
||||
username:
|
||||
from_secret: registry_user
|
||||
from_secret: docker_user
|
||||
password:
|
||||
from_secret: registry_pass
|
||||
from_secret: docker_pass
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
@@ -4,4 +4,4 @@ WORKDIR /app
|
||||
|
||||
COPY drone_test ./
|
||||
|
||||
CMD python -c "from drone_test import circle_area; print(circle_area(2)"
|
||||
CMD python . 1 2
|
||||
|
||||
9
drone_test/__main__.py
Normal file
9
drone_test/__main__.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""Python module to test drone builds"""
|
||||
|
||||
import sys
|
||||
|
||||
from _circle_area import circle_area
|
||||
|
||||
if __name__ == '__main__':
|
||||
for arg in sys.argv[1:]:
|
||||
print(circle_area(float(arg)))
|
||||
@@ -1,5 +1,3 @@
|
||||
"""Python module to test drone builds"""
|
||||
|
||||
import math
|
||||
|
||||
def circle_area(radius: float):
|
||||
@@ -1,7 +1,7 @@
|
||||
from unittest import TestCase
|
||||
import math
|
||||
|
||||
from drone_test import circle_area
|
||||
from drone_test._circle_area import circle_area
|
||||
|
||||
class CircleAreaTest(TestCase):
|
||||
def test_area_1(self):
|
||||
|
||||
Reference in New Issue
Block a user