Skip to content
Snippets Groups Projects
Commit 77d2cc60 authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

Merge branch 'update-ci' into 'develop'

Added CI job for building latest image form develop

See merge request !4
parents f7b79b81 5d578385
No related branches found
No related tags found
1 merge request!4Added CI job for building latest image form develop
stages: stages:
- test - test
- sonar - sonar
- build
test: test:
stage: test stage: test
...@@ -17,8 +18,21 @@ test: ...@@ -17,8 +18,21 @@ test:
sonar: sonar:
stage: sonar stage: sonar
image: trion/ng-cli:15.2.10 image: trion/ng-cli:15.2.10
# only: only:
# - develop - develop
script: script:
- npm ci --force - npm ci --force
- npm run sonar -- -Dsonar.host.url=${SONAR_HOST} -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.projectName=${SONAR_PROJECT_NAME} -Dsonar.branch.name=develop -Dsonar.login=${SONAR_LOGIN_TOKEN} - npm run sonar -- -Dsonar.host.url=${SONAR_HOST} -Dsonar.projectKey=${SONAR_PROJECT_KEY} -Dsonar.projectName=${SONAR_PROJECT_NAME} -Dsonar.branch.name=develop -Dsonar.login=${SONAR_LOGIN_TOKEN}
build_and_push_latest_image:
stage: build
only:
- develop
variables:
IMAGE_TAG: "latest"
script:
- |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REPOSITORY
docker build -t $DOCKER_REPOSITORY_LOCAL:$IMAGE_TAG .
docker push $DOCKER_REPOSITORY_LOCAL:$IMAGE_TAG
docker logout $DOCKER_REPOSITORY
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment