diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..5f4486cc2ee7c0296e89b72d0a2f13dccdcc40a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/atdb/logs/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14f5c66142e362730ce988714c5b390ab457d413..993ad346ff394be6fda94fef4b6af20c4f6afd90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,9 @@ stages: - build - - deploy + - deploy_to_test + - deploy_to_production -docker-build-master: +docker-build: # Official docker image. image: docker:latest stage: build @@ -13,69 +14,34 @@ docker-build-master: script: - docker build --pull -t "$CI_REGISTRY_IMAGE" atdb - docker push "$CI_REGISTRY_IMAGE" - only: - - master - - acceptance - - release - -#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: +# only: # - master -# - acceptance -# - release -# deploy test/dev version on 'sdc-dev.astron.nl' -docker-deploy-master: - image: docker:latest - stage: deploy - 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 acceptance version on 'dop457.astron.nl' -docker-deploy-acceptance: +# deploy master or branch to 'sdc-dev.astron.nl' +docker-deploy-to-test: image: docker:latest - stage: deploy + 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 dop457.astron.nl >> ~/.ssh/known_hosts + - ssh-keyscan dop814.astron.nl >> ~/.ssh/known_hosts - chmod 644 ~/.ssh/known_hosts script: - - ssh -o StrictHostKeyChecking=no vermaas@dop457.astron.nl "docker pull "$CI_REGISTRY_IMAGE"" - - ssh -o StrictHostKeyChecking=no vermaas@dop457.astron.nl "docker-compose -p atdb -f /data/docker_compose/docker-compose-atdb-ldv-acc-cd.yml up -d" + - ssh -o StrictHostKeyChecking=no sdc@dop814.astron.nl "echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY" + - ssh -o StrictHostKeyChecking=no sdc@dop814.astron.nl "docker pull "$CI_REGISTRY_IMAGE"" + - ssh -o StrictHostKeyChecking=no sdc@dop814.astron.nl "docker-compose -p atdb -f /docker_compose/atdb-ldv/docker-compose-dev-cd.yml up -d" when: manual - only: - - acceptance +# only: +# - master -# deploy release version on 'sdc.astron.nl' -docker-deploy-release: +# deploy master branch to 'sdc.astron.nl' +docker-deploy-master-to-production: image: docker:latest - stage: deploy + 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) @@ -90,4 +56,4 @@ docker-deploy-release: - 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 + - master \ No newline at end of file diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index 55ba5dde0dbe3250425f0f89094702fa5129e0b0..f9759a5f1c0032f8405af881963e820c7af3c41d 100644 --- a/atdb/taskdatabase/templates/taskdatabase/index.html +++ b/atdb/taskdatabase/templates/taskdatabase/index.html @@ -34,7 +34,7 @@ {% include 'taskdatabase/pagination.html' %} </div> </div> - <p class="footer"> Version 1.0.0 (11 jul 2022 - 9:00) + <p class="footer"> Version 1.0.0 (20 oct 2022 - 14:00) </div>