From 29adbb262ff08cda691e06bf1128fd78179d43ec Mon Sep 17 00:00:00 2001 From: Steffen Graber Date: Fri, 9 Feb 2024 12:27:14 +0000 Subject: [PATCH] Merge build and deploy to fix deploy problems --- ci-templates/000_3.6.gitlab-ci.yml | 16 +++++----------- ci-templates/000_dev.gitlab-ci.yml | 14 ++++---------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/ci-templates/000_3.6.gitlab-ci.yml b/ci-templates/000_3.6.gitlab-ci.yml index 8023a68..5422946 100644 --- a/ci-templates/000_3.6.gitlab-ci.yml +++ b/ci-templates/000_3.6.gitlab-ci.yml @@ -8,23 +8,16 @@ Build_36: rules: - when: always script: + # Build - docker pull nest/nest-simulator:3.6 || true - docker build --cache-from nest/nest-simulator:3.6 --tag nest/nest-simulator:3.6 ./src/3.6 - # Simple test + # Test - docker run -i --rm nest/nest-simulator:3.6 bash /opt/test-nest.sh - tags: - - shell-runner - -Deploy_36: - stage: deploy - needs: ["Build_36"] - rules: - - when: on_success - script: - - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin + # Deploy + - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin - docker push nest/nest-simulator:3.6 - docker tag nest/nest-simulator:3.6 $DOCKER_REGISTRY_IMAGE:3.6 - docker push $DOCKER_REGISTRY_IMAGE:3.6 @@ -32,3 +25,4 @@ Deploy_36: - docker logout $DOCKER_REGISTRY tags: - shell-runner + diff --git a/ci-templates/000_dev.gitlab-ci.yml b/ci-templates/000_dev.gitlab-ci.yml index 45c983a..af666ff 100644 --- a/ci-templates/000_dev.gitlab-ci.yml +++ b/ci-templates/000_dev.gitlab-ci.yml @@ -8,24 +8,18 @@ Build_Dev: rules: - when: always script: + # Build - docker pull push nest/nest-simulator:dev || true - docker build --cache-from nest/nest-simulator:dev --tag nest/nest-simulator:dev ./src/dev - # Simple test + # Test - docker run -i --rm nest/nest-simulator:dev bash /opt/test-nest.sh - tags: - - shell-runner - -Deploy_Dev: - stage: deploy - needs: ["Build_Dev"] - rules: - - when: on_success - script: + # Deploy - echo -n $DOCKERHUB_REGISTRY_TOKEN | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin - docker push nest/nest-simulator:dev - docker logout $DOCKERHUB_REGISTRY tags: - shell-runner +