Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
c3infodesk-deployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fejao
c3infodesk-deployment
Commits
3e0d1527
Commit
3e0d1527
authored
6 months ago
by
fejao
Browse files
Options
Downloads
Patches
Plain Diff
Updated the .gitlab-ci.yml file
parent
12ec4711
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!6
Setting ansible lint 01
Pipeline
#37373
failed
6 months ago
Stage: debug
Stage: build
Stage: lint-tests
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+22
-65
22 additions, 65 deletions
.gitlab-ci.yml
with
22 additions
and
65 deletions
.gitlab-ci.yml
+
22
−
65
View file @
3e0d1527
...
...
@@ -13,11 +13,14 @@ variables:
#####
#####
PLAYBOOK_NAME_FOR_ROLE_TEST
:
"
playbook_example_01_test.yml"
PLAYBOOK_NAME_FOR_ROLE_DEPENDENCIES
:
"
playbook_example_02_dependencies.yml"
PLAYBOOK_NAME_FOR_ROLE_CLONE_REPOSITORIES
:
"
playbook_example_03_clone_repositories.yml"
stages
:
-
debug
-
build
-
test
-
lint-tests
-
docs
-
deploy
...
...
@@ -44,77 +47,31 @@ build:
### TESTS
###
ansible-lint-test
:
stage
:
test
stage
:
lint-
test
s
before_script
:
# - apt-get update && apt-get install -y python3-pip libcups2-dev && apt-get clean && rm -rf /var/lib/apt/lists/*
-
apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/*
# - pip3 install -r ci-cd/requirements.txt
-
pip3 install -r requirements.txt
script
:
-
echo "Running ansible-lint tests at the role-> 'test'"
# - pycodestyle -v --config=./src/pycodestyle.cfg src/
# - ansible-lint playbook_example_01_dependencies.yml
-
ansible-lint $PLAYBOOK_NAME_FOR_ROLE_TEST
allow_failure
:
false
# pylint:
# stage: test
# before_script:
# - apt-get update && apt-get install -y python3-pip libcups2-dev && apt-get clean && rm -rf /var/lib/apt/lists/*
# - pip3 install -r ci-cd/requirements.txt
# script:
# - echo "Running pylint tests..."
# ### Fix pylint 'import-error' --> hardcode init-hook on .pylintrc :(
# - cat .pylintrc | grep init-hook
# - rm .pylintrc
# - cp ci-cd/.pylintrc .
# - cat .pylintrc | grep init-hook
# ### RUN
# - pylint src/
# allow_failure: false
# unit-tests:
# stage: test
# before_script:
# - apt-get update && apt-get install -y python3-pip libcups2-dev && apt-get clean && rm -rf /var/lib/apt/lists/*
# - pip3 install -r ci-cd/requirements.txt
# script:
# - echo "Running pep8 tests..."
# - python3 -m pytest
# allow_failure: false
# ###
# ### DOCS
# ###
# sphinx-docs:
# stage: docs
# before_script:
# - pip3 install sphinx sphinx-rtd-theme
# script:
# - echo "Running sphinx-docs..."
# - mkdir -vp $DOC_PATH_TMP
# - cd $DOC_PATH_TMP
# - sphinx-quickstart -p '$DOC_NAME' -a '$DOC_AUTHOR' -v '$DOC_VERSION' -l '$DOC_LANGUAGE' -q
# - cd ..
# - sphinx-apidoc -o $DOC_PATH_TMP .
# - cd $DOC_PATH_TMP
# - make html
# artifacts:
# paths:
# - $DOC_PATH_TMP/*
# # expire_in: '$DOC_RETENTION' # <--- DON'T WORK :(
# expire_in: 1 day
# allow_failure: false
# only:
# - main
ansible-lint-dependencies
:
stage
:
lint-tests
before_script
:
-
apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/*
-
pip3 install -r requirements.txt
script
:
-
echo "Running ansible-lint tests at the role-> 'dependencies'"
-
ansible-lint $PLAYBOOK_NAME_FOR_ROLE_DEPENDENCIES
allow_failure
:
false
# ###
# ### DEPLOY
# ###
# deploy:
# stage: deploy
# script:
# - echo "Deploying the application..."
# - echo "TODO --> where to deploy this?"
# only:
# - main
ansible-lint-clone-repositories
:
stage
:
lint-tests
before_script
:
-
apt-get update && apt-get install -y python3-pip && apt-get clean && rm -rf /var/lib/apt/lists/*
-
pip3 install -r requirements.txt
script
:
-
echo "Running ansible-lint tests at the role-> 'clone_repositories'"
-
ansible-lint $PLAYBOOK_NAME_FOR_ROLE_CLONE_REPOSITORIES
allow_failure
:
false
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment