mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
Merge branch 'ci-update'
This commit is contained in:
commit
cd2ecc3853
@ -16,6 +16,8 @@ fi
|
||||
|
||||
major_version="$(printf '%s' "$VERSION" | cut -d . -f 1)"
|
||||
|
||||
# Date based tag
|
||||
printf '%s' "$VERSION-$(date +%Y%m%d),"
|
||||
# Program version
|
||||
printf '%s' "$VERSION,"
|
||||
|
||||
|
67
.drone.jsonnet
Normal file
67
.drone.jsonnet
Normal file
@ -0,0 +1,67 @@
|
||||
local test(py_version) = {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "test-" + py_version,
|
||||
"steps": [
|
||||
{
|
||||
"name": "test",
|
||||
"image": "python:" + py_version,
|
||||
"commands": [
|
||||
"git submodule update --recursive --remote --init",
|
||||
"pip install -r requirements-docker.txt",
|
||||
"python3 setup.py install",
|
||||
"python3 -m unittest discover test/ --verbose"
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
local build_docker(py_version) = {
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "build_docker",
|
||||
"steps": [
|
||||
{
|
||||
"name": "set Docker image tags",
|
||||
"image": "bash",
|
||||
"commands": [
|
||||
"bash .drone-write-tags.sh $DRONE_TAG > .tags",
|
||||
"# Will build the following tags:",
|
||||
"cat .tags"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "build Docker image",
|
||||
"image": "plugins/docker",
|
||||
"settings": {
|
||||
"repo": "jlu5/pylink",
|
||||
"username": {
|
||||
"from_secret": "docker_user"
|
||||
},
|
||||
"password": {
|
||||
"from_secret": "docker_token"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"depends_on": ["test-" + py_version],
|
||||
"trigger": {
|
||||
"event": [
|
||||
"tag"
|
||||
],
|
||||
"ref": {
|
||||
"exclude": [
|
||||
"refs/tags/*alpha*",
|
||||
"refs/tags/*dev*"
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
[
|
||||
test("3.7"),
|
||||
test("3.8"),
|
||||
test("3.9"),
|
||||
test("3.10"),
|
||||
build_docker("3.10"),
|
||||
]
|
37
.drone.yml
37
.drone.yml
@ -1,37 +0,0 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build
|
||||
|
||||
steps:
|
||||
- name: "test"
|
||||
image: python:3.8
|
||||
commands:
|
||||
- "git submodule update --recursive --remote --init"
|
||||
- "pip install -r requirements-docker.txt"
|
||||
- "python3 setup.py install"
|
||||
- "python3 -m unittest discover test/ --verbose"
|
||||
|
||||
- name: "set Docker image tags"
|
||||
image: bash
|
||||
commands:
|
||||
- "bash .drone-write-tags.sh $DRONE_TAG > .tags"
|
||||
- "# Will build the following tags:"
|
||||
- "cat .tags"
|
||||
|
||||
- name: "build Docker image"
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: jlu5/pylink
|
||||
username:
|
||||
from_secret: docker_user
|
||||
password:
|
||||
from_secret: docker_token
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
ref:
|
||||
exclude:
|
||||
- refs/tags/*alpha*
|
||||
- refs/tags/*dev*
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,6 +3,9 @@
|
||||
!example-*.yml
|
||||
!.*.yml
|
||||
|
||||
# Generated from .drone.jsonnet
|
||||
.drone.yml
|
||||
|
||||
# Automatically generated by setup.py
|
||||
/__init__.py
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user