diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 001f28f175ff32f8e8b1e5f311b03e21ec3461ad..c5e63f3b160e732b43dac21d5c3b5db440a589cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,44 +1,12 @@ - - -variables: - release_branch: "release" - target_branche: "main" - -stages: # List of stages for jobs, and their order of execution - - setup +stages: - linting - - build - - publish - -#publish-job: # This job runs in the build stage, which runs first. -# stage: publish -# script: -# - cd geant -# - ansible-galaxy collection publish ops_ansible --api-key $ANSIBLE_VARIABLE_API_KEY -# tags: -# - ansible -# - lab -# rules: -# - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^feature/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" - - -#build-job: # This job runs in the build stage, which runs first. -# stage: build -# script: -# - cd geant -# - ansible-galaxy collection build ops_ansible -# tags: -# - ansible -# - lab -# artifacts: -# paths: -# - ./*.tar.gz -# only: -# - main ansible-lint: stage: linting image: registry.gitlab.com/pipeline-components/ansible-lint:latest + before_script: + - python -m pip install jmespath + - ansible-galaxy role install Juniper.junos script: - ansible-lint -f codeclimate | python -m json.tool | tee "${CI_PROJECT_DIR}/codeclimate-results.json" artifacts: @@ -50,12 +18,3 @@ ansible-lint: - "${CI_PROJECT_DIR}/codeclimate-results.json" tags: - docker-executor - -install-dependencies: - stage: setup - script: - - pip install jmespath - - ansible-galaxy role install Juniper.junos - tags: - - ansible - - lab