-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
39 lines (36 loc) · 1.06 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
variables:
DOCKER_PASSWORD: $DOCKER_PASSWORD
DOCKER_REGISTRY: docker.example.com
DOCKER_USER: docker
DOCKER_NAME: luarocks-artifactory
DOCKER_TAG: latest
ARTIFACTORY_URL: https://repo.example.com/artifactory
REPOSITORY_NAME:
value: my-luarocks.snapshot
description: Set repository name
stages:
- build
my-luarocks.snapshot:
tags:
- repo.example.com
stage: build
image: docker:latest
script:
- docker pull $DOCKER_REGISTRY/$DOCKER_NAME:$DOCKER_TAG
- docker run
--device /dev/fuse
-v "$(pwd)/create-luarocks.sh:/create-luarocks.sh"
--privileged
--rm
$DOCKER_REGISTRY/$DOCKER_NAME:$DOCKER_TAG
sh /create-luarocks.sh $ARTIFACTORY_URL $REPOSITORY_NAME $DEPLOY_CI_AUTH --install-any penlight rapidjson
docker build:
stage: build
when: manual
image: docker:latest
before_script:
- docker info
script:
- docker login $DOCKER_REGISTRY -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker build -t $DOCKER_REGISTRY/$DOCKER_NAME:$DOCKER_TAG .
- docker push $DOCKER_REGISTRY/$DOCKER_NAME:$DOCKER_TAG