Update .gitlab-ci.yml file for day5

2 merge requests!12To master,!6Update .gitlab-ci.yml file for day5
Pipeline #73470 passed with stages
in 1 minute and 19 seconds
Showing with 67 additions and 0 deletions
+67 -0
stages:
- build
- testing
- packaging
build_application:
stage: build
tags:
- docker_itsoft
script:
- echo "This application will build here..."
- pwd
- echo "Build application Done!"
lint-testing:
stage: testing
tags:
- docker_itsoft
script:
- echo "This application will lint-test here..."
- pwd
- ls -a
- echo "Lint test Done!"
unit-testing:
stage: testing
tags:
- docker_itsoft
needs:
- job: 'lint-testing'
optional: true
before_script:
- echo "Prepare test data"
script:
- echo "This application will unit-test here..."
- echo "Unit test Done!"
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH == "develop"'
- if: '$CI_PIPELINE_SOURCE == "feature_new"'
build-image-job:
stage: packaging
tags:
- docker_itsoft
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
variables:
TAG: 'latest'
- if: '$CI_COMMIT_BRANCH == "develop"'
variables:
TAG: 'dev'
image: docker:20.10.16
services:
- docker:20.10.16-dind
parallel:
matrix:
- SERVICE: [cat, dog, child]
script:
- echo "This application will package here..."
- cd $SERVICE
- docker login docker.io -u $DOCKER_USERNAME -p $DOCKER_PWD
- docker info
- docker build -t docker.io/pathmakantha/$SERVICE:$TAG .
- docker push docker.io/pathmakantha/$SERVICE:$TAG
- echo "Packaging Done!"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment