Skip to content

Commit 0ce6d6f

Browse files
committed
refactor: project structure
this commit introduces following changes: - new project structure - new improved dockerfile using debian:buster-slim as base image - remove rust dependency tools by default
1 parent 29dc594 commit 0ce6d6f

File tree

14 files changed

+310
-227
lines changed

14 files changed

+310
-227
lines changed

.drone.yml

Lines changed: 89 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,89 @@
1-
pipeline:
2-
publish:
3-
image: plugins/docker
4-
group: production
5-
repo: joseluisq/rust-linux-darwin-builder
6-
dockerfile: ./docker/Dockerfile
7-
username:
8-
from_secret: dockerhub_username
9-
password:
10-
from_secret: dockerhub_password
11-
auto_tag: true
12-
build_args:
13-
- DOCKER_IMAGE_VERSION=${DRONE_TAG}
14-
when:
15-
event: tag
16-
branch: master
17-
18-
notification:
19-
image: plugins/slack
20-
webhook:
21-
from_secret: slack_webhook
22-
channel: ci-cd
23-
when:
24-
status: [success, failure]
1+
---
2+
kind: pipeline
3+
type: docker
4+
name: development
5+
6+
platform:
7+
os: linux
8+
arch: amd64
9+
10+
steps:
11+
- name: build
12+
image: docker
13+
volumes:
14+
- name: dockersock
15+
path: /var/run/docker.sock
16+
commands:
17+
- docker build -f ./docker/Dockerfile -t joseluisq/rust-linux-darwin-builder:latest .
18+
19+
- name: test
20+
image: joseluisq/rust-linux-darwin-builder:latest
21+
pull: if-not-exists
22+
commands:
23+
- ./docker/image_test.sh
24+
25+
trigger:
26+
event:
27+
- push
28+
- pull_request
29+
- tag
30+
31+
volumes:
32+
- name: dockersock
33+
host:
34+
path: /var/run/docker.sock
35+
36+
37+
---
38+
kind: pipeline
39+
type: docker
40+
name: production
41+
42+
platform:
43+
os: linux
44+
arch: amd64
45+
46+
steps:
47+
- name: publish
48+
image: plugins/docker
49+
settings:
50+
repo: joseluisq/rust-linux-darwin-builder
51+
dockerfile: ./docker/Dockerfile
52+
username:
53+
from_secret: dockerhub_username
54+
password:
55+
from_secret: dockerhub_password
56+
auto_tag: true
57+
build_args:
58+
- DOCKER_IMAGE_VERSION=${DRONE_TAG}
59+
60+
trigger:
61+
target:
62+
- production
63+
64+
65+
---
66+
kind: pipeline
67+
type: docker
68+
name: notification
69+
70+
platform:
71+
os: linux
72+
arch: amd64
73+
74+
steps:
75+
- name: notify
76+
image: plugins/slack
77+
settings:
78+
webhook:
79+
from_secret: slack_webhook
80+
channel: ci-cd
81+
82+
depends_on:
83+
- development
84+
- production
85+
86+
trigger:
87+
status:
88+
- success
89+
- failure

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ os:
77
- linux
88

99
script:
10-
- bash ./test-image
10+
- bash ./image_test.sh
1111

1212
notifications:
1313
email:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
build:
22
docker build \
33
-t joseluisq/rust-linux-darwin-builder:1 \
4-
-f Dockerfile .
4+
-f docker/Dockerfile .
55
.PHONY: build
66

77
release:

0 commit comments

Comments
 (0)