gitlab ci

This commit is contained in:
Egor Matveev 2021-11-05 12:20:35 +03:00
parent e0c4401705
commit 9cf18db5b2
2 changed files with 9 additions and 50 deletions

View File

@ -1,19 +0,0 @@
stages:
- build
- deploy
before_script:
- echo "Starting..."
after_script:
- echo "Done!"
build:
stage: build
script:
- docker build -t sprint .
deploy:
deploy: test
script:
- docker-compose up -d

View File

@ -1,41 +1,19 @@
# This file is a template, and might need editing before it works on your project. stages:
# To contribute improvements to CI/CD templates, please follow the Development guide at: - build
# https://docs.gitlab.com/ee/development/cicd/templates.html - deploy
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Bash.gitlab-ci.yml
# See https://docs.gitlab.com/ee/ci/yaml/index.html for all available options
# you can delete this line if you're not using Docker
image: busybox:latest
before_script: before_script:
- echo "Before script section" - echo "Starting..."
- echo "For example you might run an update here or install a build dependency"
- echo "Or perhaps you might print out some debugging details"
after_script: after_script:
- echo "After script section" - echo "Done!"
- echo "For example you might do some cleanup here"
build1: build:
stage: build stage: build
script: script:
- echo "Do your build here" - docker build -t sprint .
test1: deploy:
stage: test
script:
- echo "Do a test here"
- echo "For example run a test suite"
test2:
stage: test
script:
- echo "Do another parallel test here"
- echo "For example run a lint test"
deploy1:
stage: deploy stage: deploy
script: script:
- echo "Do your deploy here" - docker-compose up -d