Skip to content

Commit 3ef9036

Browse files
nevallajakolehm
authored andcommitted
Switch to Drone 1.0 (#104)
1 parent 6e7101d commit 3ef9036

File tree

1 file changed

+40
-23
lines changed

1 file changed

+40
-23
lines changed

.drone.yml

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,70 @@
1-
pipeline:
2-
test:
1+
kind: pipeline
2+
name: amd64
3+
4+
platform:
5+
os: linux
6+
arch: amd64
7+
steps:
8+
- name: test
39
image: ruby:2.4
410
commands:
511
- bundle install --path bundler
612
- bundle exec rspec spec/ # && bundle exec rubocop --fail-level A -S --format c --parallel
713
- bundle exec rubocop lib/
8-
docker_latest:
9-
registry: quay.io
14+
- name: docker_latest
1015
image: plugins/docker
11-
secrets: [ docker_username, docker_password ]
12-
repo: quay.io/kontena/mortar
13-
dockerfile: Dockerfile
14-
auto_tag: true
16+
settings:
17+
registry: quay.io
18+
username:
19+
from_secret: docker_username
20+
password:
21+
from_secret: docker_password
22+
repo: quay.io/kontena/mortar
23+
dockerfile: Dockerfile
24+
auto_tag: true
1525
when:
1626
branch: ['master']
1727
event: ['push']
18-
docker_release:
19-
registry: quay.io
28+
- name: docker_release
2029
image: plugins/docker
21-
secrets: [ docker_username, docker_password ]
22-
repo: quay.io/kontena/mortar
23-
dockerfile: Dockerfile
24-
auto_tag: true
30+
settings:
31+
registry: quay.io
32+
username:
33+
from_secret: docker_username
34+
password:
35+
from_secret: docker_password
36+
repo: quay.io/kontena/mortar
37+
dockerfile: Dockerfile
38+
auto_tag: true
2539
when:
2640
event: ['tag']
27-
28-
release-gem:
41+
- name: release-gem
2942
image: ruby:2.4
30-
secrets: [ rubygems_auth ]
43+
environment:
44+
RUBYGEMS_AUTH:
45+
from_secret: rubygems_auth
3146
commands:
3247
- mkdir -p ~/.gem
3348
- echo $RUBYGEMS_AUTH | base64 -d > ~/.gem/credentials && chmod 0600 ~/.gem/credentials
3449
- gem build kontena-mortar.gemspec
3550
- gem push *.gem
3651
when:
3752
event: ['tag']
38-
39-
create_gh_release:
53+
- name: create_gh_release
4054
image: ubuntu:xenial
41-
secrets: [ github_token ]
55+
environment:
56+
GITHUB_TOKEN:
57+
from_secret: github_token
4258
commands:
4359
- ./build/drone/create_release.sh
4460
when:
4561
event: tag
46-
build_xenial:
62+
- name: build_xenial
4763
image: ubuntu:xenial
48-
secrets: [ github_token ]
4964
environment:
50-
- CPPFLAGS=-P
65+
CPPFLAGS: '-P'
66+
GITHUB_TOKEN:
67+
from_secret: github_token
5168
commands:
5269
- ./build/drone/ubuntu_xenial.sh
5370
when:

0 commit comments

Comments
 (0)