Skip to content
Snippets Groups Projects
Commit 74af942c authored by Ronnie Friman's avatar Ronnie Friman
Browse files

separated purge&build image jobs

parent fafce9c1
No related branches found
No related tags found
No related merge requests found
Pipeline #64095 canceled
stages: stages:
- push-image - purge
- build
- rf-test - rf-test
- push-results - push-results
...@@ -7,22 +8,27 @@ docker-push: ...@@ -7,22 +8,27 @@ docker-push:
image: docker image: docker
services: services:
- docker:dind - docker:dind
stage: push-image stage: purge
tags: ['docker'] tags: ['docker']
only: only:
- testing - testing
before_script: script:
- printf "REACT_APP_URL=%s\n" "$REACT_APP_URL" > .env
- echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin
- docker stop front - docker stop front
- docker rm front - docker rm front
allow_failure: true allow_failure: true
docker-build:
image: docker
services:
- docker:dind
stage: build
tags: ['docker']
only:
- testing
script: script:
- printf "REACT_APP_URL=%s\n" "$REACT_APP_URL" > .env
- docker build -t overflow2019/frontend:test . - docker build -t overflow2019/frontend:test .
- docker push overflow2019/frontend
- docker run --name front -p 8080:3000 -d overflow2019/frontend:test - docker run --name front -p 8080:3000 -d overflow2019/frontend:test
after_script:
- docker logout
rf-test: rf-test:
image: gitlab.labranet.jamk.fi:4567/wimma-lab-2019/mysticons/devsecops/robot image: gitlab.labranet.jamk.fi:4567/wimma-lab-2019/mysticons/devsecops/robot
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment