diff --git a/src/ztp/.gitlab-ci.yml b/src/ztp/.gitlab-ci.yml index 0dc6284a4086253e64138343a989055581eccdda..a40a14f495b46da55f47d1bbb851fc62e261b32c 100644 --- a/src/ztp/.gitlab-ci.yml +++ b/src/ztp/.gitlab-ci.yml @@ -13,12 +13,12 @@ # limitations under the License. variables: - IMAGE_NAME: 'automation' + IMAGE_NAME: 'ztp' REPORTS_PATH: "src/${IMAGE_NAME}/reports" BUILD_ENV: build.env # Package application needed to run tests & build the image on next stage -build automation: +build ztp: stage: build script: - export IMAGE_TAG=$(grep -m1 '<version>' ./src/$IMAGE_NAME/pom.xml | grep -oP '(?<=>).*(?=<)') @@ -39,12 +39,12 @@ build automation: - .gitlab-ci.yml # Run tests, build & push the image -unit_test automation: +unit_test ztp: variables: REPORTS_CONTAINER: "${IMAGE_NAME}-reports" stage: unit_test needs: - - build automation + - build ztp before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker rm ${REPORTS_CONTAINER} || true @@ -79,18 +79,18 @@ unit_test automation: - manifests/${IMAGE_NAME}service.yaml - .gitlab-ci.yml -## Deployment of automation service in Kubernetes Cluster -#deploy automation: +## Deployment of ztp service in Kubernetes Cluster +#deploy ztp: # stage: deploy # needs: -# - build automation -# - unit_test automation +# - build ztp +# - unit_test ztp # script: # - kubectl version # - kubectl get all -# - kubectl delete --ignore-not-found=true -f "manifests/automationservice.yaml" -# - kubectl apply -f "manifests/automationservice.yaml" -# - kubectl delete pods --selector app=automationservice +# - kubectl delete --ignore-not-found=true -f "manifests/ztpservice.yaml" +# - kubectl apply -f "manifests/ztpservice.yaml" +# - kubectl delete pods --selector app=ztpservice # - kubectl get all # rules: # - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'