From a3dd330715cda1cae77f78f5bc77cba95146eb78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Mon, 22 Feb 2021 17:54:06 +0100 Subject: [PATCH 01/28] Add new .gitlab-ci.yml file --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..efa19451 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,22 @@ +build-job: + stage: build + script: + - echo "Hello, $GITLAB_USER_LOGIN!" + +test-job1: + stage: test + script: + - echo "This job tests something" + +test-job2: + stage: test + script: + - echo "This job tests something, but takes more time than test-job1." + - echo "After the echo commands complete, it runs the sleep command for 20 seconds" + - echo "which simulates a test that runs 20 seconds longer than test-job1" + - sleep 20 + +deploy-prod: + stage: deploy + script: + - echo "This job deploys something from the $CI_COMMIT_BRANCH branch." -- GitLab From a61bba67ec4ffc17e87e39fa2e40597d263b785a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Mon, 22 Feb 2021 18:35:42 +0100 Subject: [PATCH 02/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index efa19451..5604b12c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,22 +1,34 @@ -build-job: - stage: build - script: - - echo "Hello, $GITLAB_USER_LOGIN!" +image: node:latest +before_script: + - apt-get update -qy + - apt-get install -y ruby-dev + - gem install dpl + test-job1: stage: test script: - echo "This job tests something" -test-job2: - stage: test - script: - - echo "This job tests something, but takes more time than test-job1." - - echo "After the echo commands complete, it runs the sleep command for 20 seconds" - - echo "which simulates a test that runs 20 seconds longer than test-job1" - - sleep 20 +stages: + - staging + - production + +staging: + type: deploy + stage: staging + image: ruby:latest + script: + - dpl --provider=heroku --app=$HEROKU_APP_STAGING --api-key=$HEROKU_API_KEY + only: + - dev + +production: + type: deploy + stage: production + image: ruby:latest + script: + - dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api-key=$HEROKU_API_KEY + only: + - master -deploy-prod: - stage: deploy - script: - - echo "This job deploys something from the $CI_COMMIT_BRANCH branch." -- GitLab From 2ab924c190832d96ae4acdcfb2ce0b8553d6ebd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Mon, 22 Feb 2021 18:37:14 +0100 Subject: [PATCH 03/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5604b12c..6d0885c4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,15 +4,16 @@ before_script: - apt-get update -qy - apt-get install -y ruby-dev - gem install dpl - -test-job1: - stage: test - script: - - echo "This job tests something" stages: - staging - production + - test + +test-job1: + stage: test + script: + - echo "This job tests something" staging: type: deploy -- GitLab From e5778baff3a10f4f8844801947bca0b3a0c3bc3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Mon, 22 Feb 2021 18:40:55 +0100 Subject: [PATCH 04/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d0885c4..7bc1dfbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: node:latest +image: python:3 before_script: - apt-get update -qy -- GitLab From cf0753b324547a805906ee0a0b9eb4fac1ee8e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Mon, 22 Feb 2021 18:50:57 +0100 Subject: [PATCH 06/28] Update settings.py --- backend/secfit/secfit/settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/secfit/secfit/settings.py b/backend/secfit/secfit/settings.py index 92336536..fdcd5c27 100644 --- a/backend/secfit/secfit/settings.py +++ b/backend/secfit/secfit/settings.py @@ -43,6 +43,8 @@ ALLOWED_HOSTS = [ "10." + groupid + ".0.4", "molde.idi.ntnu.no", "10.0.2.2", + "secfit-group15-staging.herokuapp.com", + "secfit-group15-production.herokuapp.com" ] # Application definition -- GitLab From abf27550a1cacc6445ab9028f6c721df7fe59b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Mon, 22 Feb 2021 19:19:11 +0100 Subject: [PATCH 07/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 57 +++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7bc1dfbb..5d5cc13c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,35 +1,30 @@ -image: python:3 - -before_script: - - apt-get update -qy - - apt-get install -y ruby-dev - - gem install dpl - stages: - - staging - - production - - test + - build + - release -test-job1: - stage: test +build_image: + only: + - master + image: registry.gitlab.com/majorhayden/container-buildah + stage: build + variables: + STORAGE_DRIVER: "vfs" + BUILDAH_FORMAT: "docker" + before_script: + - dnf install -y nodejs + - curl https://cli-assets.heroku.com/install.sh | sh + - sed -i '/^mountopt =.*/d' /etc/containers/storage.conf script: - - echo "This job tests something" - -staging: - type: deploy - stage: staging - image: ruby:latest - script: - - dpl --provider=heroku --app=$HEROKU_APP_STAGING --api-key=$HEROKU_API_KEY - only: - - dev - -production: - type: deploy - stage: production - image: ruby:latest - script: - - dpl --provider=heroku --app=$HEROKU_APP_PRODUCTION --api-key=$HEROKU_API_KEY - only: - - master + - buildah bud --iidfile iidfile -t rust-python-demo:$CI_COMMIT_SHORT_SHA . + - buildah push --creds=_:$(heroku auth:token) $(cat iidfile) registry.heroku.com/secfit-group15/web +release: + only: + - master + image: node:10.17-alpine + stage: release + before_script: + - apk add curl bash + - curl https://cli-assets.heroku.com/install.sh | sh + script: + - heroku container:release -a secfit-group15 web \ No newline at end of file -- GitLab From e0a318e04c8c37d52826048fd643b2e7a6a782b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Mon, 22 Feb 2021 19:30:37 +0100 Subject: [PATCH 08/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d5cc13c..efa19451 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,30 +1,22 @@ -stages: - - build - - release - -build_image: - only: - - master - image: registry.gitlab.com/majorhayden/container-buildah +build-job: stage: build - variables: - STORAGE_DRIVER: "vfs" - BUILDAH_FORMAT: "docker" - before_script: - - dnf install -y nodejs - - curl https://cli-assets.heroku.com/install.sh | sh - - sed -i '/^mountopt =.*/d' /etc/containers/storage.conf script: - - buildah bud --iidfile iidfile -t rust-python-demo:$CI_COMMIT_SHORT_SHA . - - buildah push --creds=_:$(heroku auth:token) $(cat iidfile) registry.heroku.com/secfit-group15/web + - echo "Hello, $GITLAB_USER_LOGIN!" + +test-job1: + stage: test + script: + - echo "This job tests something" + +test-job2: + stage: test + script: + - echo "This job tests something, but takes more time than test-job1." + - echo "After the echo commands complete, it runs the sleep command for 20 seconds" + - echo "which simulates a test that runs 20 seconds longer than test-job1" + - sleep 20 -release: - only: - - master - image: node:10.17-alpine - stage: release - before_script: - - apk add curl bash - - curl https://cli-assets.heroku.com/install.sh | sh +deploy-prod: + stage: deploy script: - - heroku container:release -a secfit-group15 web \ No newline at end of file + - echo "This job deploys something from the $CI_COMMIT_BRANCH branch." -- GitLab From 936ef43188b0228ddf65e0737f2f5921000b6e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Mon, 22 Feb 2021 19:35:18 +0100 Subject: [PATCH 09/28] Update settings.py --- backend/secfit/secfit/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/secfit/secfit/settings.py b/backend/secfit/secfit/settings.py index fdcd5c27..af44b594 100644 --- a/backend/secfit/secfit/settings.py +++ b/backend/secfit/secfit/settings.py @@ -44,7 +44,8 @@ ALLOWED_HOSTS = [ "molde.idi.ntnu.no", "10.0.2.2", "secfit-group15-staging.herokuapp.com", - "secfit-group15-production.herokuapp.com" + "secfit-group15-production.herokuapp.com", + "secfit-group15.herokuapp.com" ] # Application definition -- GitLab From a04266fe3761d20f963b8dc3964558ed1fa458e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 10:28:46 +0100 Subject: [PATCH 10/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index efa19451..d0d59c95 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,22 +1,20 @@ -build-job: - stage: build - script: - - echo "Hello, $GITLAB_USER_LOGIN!" - -test-job1: - stage: test - script: - - echo "This job tests something" +image: docker:latest +services: + - docker:dind -test-job2: - stage: test - script: - - echo "This job tests something, but takes more time than test-job1." - - echo "After the echo commands complete, it runs the sleep command for 20 seconds" - - echo "which simulates a test that runs 20 seconds longer than test-job1" - - sleep 20 +variables: + DOCKER_DRIVER: overlay -deploy-prod: - stage: deploy +stages: + - build + +docker-build: + stage: build script: - - echo "This job deploys something from the $CI_COMMIT_BRANCH branch." + - docker build -f Dockerfile --iidfile imageid.txt -t registry.heroku.com/secfit-group15/my-app . + - docker login -u _ -p $HEROKU_TOKEN registry.heroku.com + - docker push registry.heroku.com/secfit-group15/my-app + - apk add --no-cache curl + - echo "Docker Image ID is $(cat imageid.txt)" + - |- + curl -X PATCH https://api.heroku.com/apps/secfit-group15/formation --header "Content-Type: application/json" --header "Accept: application/vnd.heroku+json; version=3.docker-releases" --header "Authorization: Bearer ${HEROKU_TOKEN}" --data '{ "updates": [ { "type": "web", "docker_image": "'$(cat imageid.txt)'" } ] }' -- GitLab From 5ff3440441bd96b0c1fda41237f50b803d390820 Mon Sep 17 00:00:00 2001 From: ikvassil Date: Tue, 23 Feb 2021 10:41:37 +0100 Subject: [PATCH 11/28] Add yaml file --- Dockerfile | 2 +- frontend/.gitlab-ci.yaml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 frontend/.gitlab-ci.yaml diff --git a/Dockerfile b/Dockerfile index 23c4ac6b..393fb090 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,4 @@ ENV GROUPID=${GROUPID} ENV PORT_PREFIX=${PORT_PREFIX} # Copy nginx config to the container -COPY nginx.conf /etc/nginx/nginx.conf \ No newline at end of file +COPY nginx.conf /etc/nginx/nginx.conf diff --git a/frontend/.gitlab-ci.yaml b/frontend/.gitlab-ci.yaml new file mode 100644 index 00000000..bd99a6bf --- /dev/null +++ b/frontend/.gitlab-ci.yaml @@ -0,0 +1,16 @@ +image: docker:latest +services: + - docker:dind + +variables: + DOCKER_DRIVER: overlay + +stages: + - build + +docker-build: + stage: build + script: + - docker build -t registry.gitlab.com/vegarms/tdt4242-base . + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com + - docker push registry.gitlab.com/vegarms/tdt4242-base -- GitLab From c0d10ea126696fd5c2700742475cff879070fabb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 11:05:11 +0100 Subject: [PATCH 12/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d0d59c95..f852ea70 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,9 +11,9 @@ stages: docker-build: stage: build script: - - docker build -f Dockerfile --iidfile imageid.txt -t registry.heroku.com/secfit-group15/my-app . + - docker build -f Dockerfile --iidfile imageid.txt -t registry.heroku.com/secfit-group15/web . - docker login -u _ -p $HEROKU_TOKEN registry.heroku.com - - docker push registry.heroku.com/secfit-group15/my-app + - docker push registry.heroku.com/secfit-group15/web - apk add --no-cache curl - echo "Docker Image ID is $(cat imageid.txt)" - |- -- GitLab From daf2878604244d7c708b4e5d8b23eaf8a628f874 Mon Sep 17 00:00:00 2001 From: Irina Kera Gundersen Date: Tue, 23 Feb 2021 11:16:59 +0100 Subject: [PATCH 13/28] Update .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f852ea70..fc657117 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,9 +11,9 @@ stages: docker-build: stage: build script: - - docker build -f Dockerfile --iidfile imageid.txt -t registry.heroku.com/secfit-group15/web . + - docker build -f Dockerfile --iidfile imageid.txt -t registry.heroku.com/secfit-group15 . - docker login -u _ -p $HEROKU_TOKEN registry.heroku.com - - docker push registry.heroku.com/secfit-group15/web + - docker push registry.heroku.com/secfit-group15 - apk add --no-cache curl - echo "Docker Image ID is $(cat imageid.txt)" - |- -- GitLab From 7128f9b6f231eb6dc08756aac043b595e18da68a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 11:23:14 +0100 Subject: [PATCH 14/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc657117..36e0ff0d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,10 +11,13 @@ stages: docker-build: stage: build script: - - docker build -f Dockerfile --iidfile imageid.txt -t registry.heroku.com/secfit-group15 . - - docker login -u _ -p $HEROKU_TOKEN registry.heroku.com - - docker push registry.heroku.com/secfit-group15 - - apk add --no-cache curl - - echo "Docker Image ID is $(cat imageid.txt)" - - |- - curl -X PATCH https://api.heroku.com/apps/secfit-group15/formation --header "Content-Type: application/json" --header "Accept: application/vnd.heroku+json; version=3.docker-releases" --header "Authorization: Bearer ${HEROKU_TOKEN}" --data '{ "updates": [ { "type": "web", "docker_image": "'$(cat imageid.txt)'" } ] }' + - apk add --no-cache curl + - docker login -u _ -p $HEROKU_TOKEN registry.heroku.com + - docker pull registry.heroku.com/secfit-group15/web || true + - docker build + --cache-from registry.heroku.com/secfit-group15/web + --tag registry.heroku.com/secfit-group15/web + --file ./Dockerfile + "." + - docker push registry.heroku.com/secfit-group15/web + -- GitLab From dd16903c01857e3afc5ab6ec29db0cdfd814f364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 11:30:04 +0100 Subject: [PATCH 15/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 36e0ff0d..8b4c598c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,14 @@ image: docker:latest + services: - - docker:dind + - name: docker:dind + entrypoint: ["env", "-u", "DOCKER_HOST"] + command: ["dockerd-entrypoint.sh"] variables: - DOCKER_DRIVER: overlay + DOCKER_HOST: tcp://docker:2375/ + DOCKER_DRIVER: overlay2 + DOCKER_TLS_CERTDIR: "" stages: - build -- GitLab From 00b00a3e3eba8b3cfe94aa4537de3fdcdc014122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 11:34:59 +0100 Subject: [PATCH 16/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8b4c598c..f88e72cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,14 +1,10 @@ -image: docker:latest +image: docker:stable services: - - name: docker:dind - entrypoint: ["env", "-u", "DOCKER_HOST"] - command: ["dockerd-entrypoint.sh"] + - docker:dind variables: - DOCKER_HOST: tcp://docker:2375/ - DOCKER_DRIVER: overlay2 - DOCKER_TLS_CERTDIR: "" + DOCKER_DRIVER: overlay stages: - build -- GitLab From e9094552d1a1b8730cc660f670605d1e09c65c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 11:38:43 +0100 Subject: [PATCH 17/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f88e72cc..271801dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ -image: docker:stable +image: docker:19.03.0 services: - - docker:dind + - docker:19.03.0-dind variables: DOCKER_DRIVER: overlay -- GitLab From c066850a7dc43643c2bc9ff53eb0f390d2e71323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 12:11:35 +0100 Subject: [PATCH 18/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 271801dc..be800b23 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,9 @@ variables: stages: - build + +before-build: + - docker info docker-build: stage: build -- GitLab From ba369d46e5003227823fdf17de8948d3aa71737d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 12:13:07 +0100 Subject: [PATCH 19/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be800b23..00e6a260 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,10 +9,10 @@ variables: stages: - build -before-build: +before_script: - docker info -docker-build: +docker_build: stage: build script: - apk add --no-cache curl -- GitLab From d76eb3d181d6cf21e058970af8f5bc4606c2da11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 12:38:03 +0100 Subject: [PATCH 20/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00e6a260..2d6137b5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,8 @@ services: - docker:19.03.0-dind variables: - DOCKER_DRIVER: overlay + DOCKER_HOST: tcp://docker:2375 + DOCKER_TLS_CERTDIR: "" stages: - build -- GitLab From f85f7a97091633cad163c5c0e1c06a89d2217cb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 12:40:40 +0100 Subject: [PATCH 21/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d6137b5..68ebfbd3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ services: - docker:19.03.0-dind variables: - DOCKER_HOST: tcp://docker:2375 + DOCKER_HOST: tcp://docker:9090 DOCKER_TLS_CERTDIR: "" stages: -- GitLab From cfdac5d96dd6e713404177a2909e9ac98a17e260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 12:43:05 +0100 Subject: [PATCH 22/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68ebfbd3..a623af6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ services: - docker:19.03.0-dind variables: - DOCKER_HOST: tcp://docker:9090 + DOCKER_HOST: tcp://docker:3000 DOCKER_TLS_CERTDIR: "" stages: -- GitLab From 5a94ae1ecfa9e830c7d04ffa87076be927079e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 12:47:53 +0100 Subject: [PATCH 23/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a623af6b..00e6a260 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,8 +4,7 @@ services: - docker:19.03.0-dind variables: - DOCKER_HOST: tcp://docker:3000 - DOCKER_TLS_CERTDIR: "" + DOCKER_DRIVER: overlay stages: - build -- GitLab From 0500760d735d58046b5f113aad6cda6088bf57f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 18:03:55 +0100 Subject: [PATCH 24/28] Delete .gitlab-ci.yaml --- frontend/.gitlab-ci.yaml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 frontend/.gitlab-ci.yaml diff --git a/frontend/.gitlab-ci.yaml b/frontend/.gitlab-ci.yaml deleted file mode 100644 index bd99a6bf..00000000 --- a/frontend/.gitlab-ci.yaml +++ /dev/null @@ -1,16 +0,0 @@ -image: docker:latest -services: - - docker:dind - -variables: - DOCKER_DRIVER: overlay - -stages: - - build - -docker-build: - stage: build - script: - - docker build -t registry.gitlab.com/vegarms/tdt4242-base . - - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com - - docker push registry.gitlab.com/vegarms/tdt4242-base -- GitLab From 8d8d12a1c2ab4fbfc931de613c851139474d875a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 18:12:03 +0100 Subject: [PATCH 25/28] Add new file --- backend/secfit/.gitlab-ci.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 backend/secfit/.gitlab-ci.yml diff --git a/backend/secfit/.gitlab-ci.yml b/backend/secfit/.gitlab-ci.yml new file mode 100644 index 00000000..8036d9cf --- /dev/null +++ b/backend/secfit/.gitlab-ci.yml @@ -0,0 +1,24 @@ +image: python:stable + +stages: + - test + - production + +before_script: + - apt-get update -qy + - apt-get install -y ruby-dev + - gem install dpl + +test-job1: + stage: test + script: + - echo "This job tests something" + +production: + type: deploy + stage: production + image: ruby:latest + script: + - dpl --provider=heroku --app=$HEROKU_APP --api-key=$HEROKU_API_KEY + only: + - master -- GitLab From 77d9304d46887bd45fd753d6b6216198f7182740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 18:14:45 +0100 Subject: [PATCH 26/28] Delete .gitlab-ci.yml --- backend/secfit/.gitlab-ci.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 backend/secfit/.gitlab-ci.yml diff --git a/backend/secfit/.gitlab-ci.yml b/backend/secfit/.gitlab-ci.yml deleted file mode 100644 index 8036d9cf..00000000 --- a/backend/secfit/.gitlab-ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -image: python:stable - -stages: - - test - - production - -before_script: - - apt-get update -qy - - apt-get install -y ruby-dev - - gem install dpl - -test-job1: - stage: test - script: - - echo "This job tests something" - -production: - type: deploy - stage: production - image: ruby:latest - script: - - dpl --provider=heroku --app=$HEROKU_APP --api-key=$HEROKU_API_KEY - only: - - master -- GitLab From 2a5a0a9732109d0d2577911033997029861901ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vegard=20Murvold=20Sporst=C3=B8l?= Date: Tue, 23 Feb 2021 18:15:41 +0100 Subject: [PATCH 27/28] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00e6a260..71bd5dff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,6 +5,9 @@ services: variables: DOCKER_DRIVER: overlay + DOCKER_HOST: tcp://docker:3000 + DOCKER_TLS_CERTDIR: "" + stages: - build -- GitLab From 98a849078b86f13a0ce7d09e523c0f867c40125e Mon Sep 17 00:00:00 2001 From: Irina Kera Gundersen Date: Fri, 26 Feb 2021 18:30:43 +0100 Subject: [PATCH 28/28] Delete variables --- .gitlab-ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 71bd5dff..c5933ced 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,12 +3,6 @@ image: docker:19.03.0 services: - docker:19.03.0-dind -variables: - DOCKER_DRIVER: overlay - DOCKER_HOST: tcp://docker:3000 - DOCKER_TLS_CERTDIR: "" - - stages: - build @@ -20,7 +14,7 @@ docker_build: script: - apk add --no-cache curl - docker login -u _ -p $HEROKU_TOKEN registry.heroku.com - - docker pull registry.heroku.com/secfit-group15/web || true + - docker pull registry.heroku.com/secfit-group15/web - docker build --cache-from registry.heroku.com/secfit-group15/web --tag registry.heroku.com/secfit-group15/web -- GitLab