1.0.0 • Published 6 years ago
pipeline-test v1.0.0
Bob -> Alice : hello
Alice -> Bob : Go AwayPipeline Utils
This repository contains Dockerfiles of images that can be used in GitLab pipelines. They usually contains tools that can be used for building, testing, and deploying projects.
Usage
.gitlab-ci.yml example:
image: registry.naspersclassifieds.com/olxeu/ecosystem/pipeline/base:latest
services:
- docker:dind
stages:
- build
- deploy
build:
stage: build
script:
- docker build -t registry.naspersclassifieds.com/olxeu/foobar:latest -f env/docker/Dockerfile ./
deploy:
stage: deploy
only:
- master
script:
- echo $GITCRYPT_KEY | base64 -d > /tmp/key && git-crypt unlock /tmp/key
- docker build -t registry.naspersclassifieds.com/olxeu/foobar:staging -f env/docker/Dockerfile.staging ./
- ENV=staging ./env/pipeline/deploy.sh # pushes image to AWS ECR, creates new Elasticbeanstalk version, change environment versionLocal usage
If you want to run gitlab-runner locally you need to first build the base image and the image used by your job:
build base image:
docker build -t registry.naspersclassifieds.com/olxeu/ecosystem/pipeline/base:latest base
docker build -t registry.naspersclassifieds.com/olxeu/ecosystem/pipeline/golang:latest golangOnce the images are build, you may execute gitlab-runner locally:
brew install gitlab-runner
gitlab-runner exec docker --docker-pull-policy never [job]1.0.0
6 years ago