forked from mendersoftware/mender-convert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
41 lines (36 loc) · 1 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
image: docker:git
variables:
DOCKER_REPOSITORY: mendersoftware/mender-convert
stages:
- test
- build
test:
stage: test
before_script:
- apk add --no-cache bash perl-utils
# Rename the branch we're on, so that it's not in the way for the
# subsequent fetch. It's ok if this fails, it just means we're not on any
# branch.
- git branch -m temp-branch || true
# Git trick: Fetch directly into our local branches instead of remote
# branches.
- git fetch origin 'refs/heads/*:refs/heads/*'
# Get last remaining tags, if any.
- git fetch --tags origin
- git clone http://github.com/mendersoftware/mendertesting
script:
# Check commit compliance.
- mendertesting/check_commits.sh
# Check licenses
- mendertesting/check_license.sh
build:
stage: build
services:
- docker:dind
script:
- IMAGE_NAME=$DOCKER_REPOSITORY:pr ./docker-build
- docker save $DOCKER_REPOSITORY:pr > image.tar
artifacts:
expire_in: 2w
paths:
- image.tar