Skip to content
Snippets Groups Projects
Commit c3f00d7f authored by Nico Vermaas's avatar Nico Vermaas
Browse files

Revert "updating ci/cd pipeline with stages"

This reverts commit a1f55d1a.
parent a1f55d1a
No related branches found
No related tags found
1 merge request!261updating ci/cd pipeline with stages and do it as user 'sdc' instead of 'vermaas'
stages:
- build
- deploy
- deploy_to_test
- deploy_to_production
docker-build-master:
# Official docker image.
......@@ -20,21 +18,21 @@ docker-build-master:
- acceptance
- release
docker-build-branch:
#docker-build-branch:
# Official docker image.
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" atdb
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master
- acceptance
- release
# image: docker:latest
# stage: build
# services:
# - docker:dind
# before_script:
# - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
# script:
# - docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" atdb
# - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
# except:
# - master
# - acceptance
# - release
# deploy test/dev version on 'sdc-dev.astron.nl'
docker-deploy-master:
......@@ -55,7 +53,6 @@ docker-deploy-master:
only:
- master
# deploy acceptance version on 'dop457.astron.nl'
docker-deploy-acceptance:
image: docker:latest
......@@ -94,43 +91,3 @@ docker-deploy-release:
when: manual
only:
- release
\ No newline at end of file
# deploy master branch to 'sdc-dev.astron.nl'
docker-deploy-to-test:
image: docker:latest
stage: deploy-to-test
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan dop814.astron.nl >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker pull "$CI_REGISTRY_IMAGE""
- ssh -o StrictHostKeyChecking=no vermaas@dop814.astron.nl "docker-compose -p atdb -f /docker_compose/atdb-ldv/docker-compose-dev-cd.yml up -d"
when: manual
# only:
# - master
# deploy master branch to 'sdc.astron.nl'
docker-deploy-to-production:
image: docker:latest
stage: deploy-to-production
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan dop821.astron.nl >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
script:
- ssh -o StrictHostKeyChecking=no sdco@dop821.astron.nl "echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY"
- ssh -o StrictHostKeyChecking=no sdco@dop821.astron.nl "docker pull "$CI_REGISTRY_IMAGE""
- ssh -o StrictHostKeyChecking=no sdco@dop821.astron.nl "docker-compose -p atdb -f /opt/dockercompose/atdb-ldv-compose/docker-compose-production-cd.yml up -d"
when: manual
only:
- release
\ No newline at end of file
......@@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.10 (atdb-ldv)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.7 (atdb-ldv) (2)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (atdb-ldv)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (atdb-ldv) (2)" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" />
</component>
......
......@@ -34,7 +34,7 @@
{% include 'taskdatabase/pagination.html' %}
</div>
</div>
<p class="footer"> Version 1.0.0 (20 oct 2022 - 10:00)
<p class="footer"> Version 1.0.0 (11 jul 2022 - 9:00)
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment