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
4b919c8a
Commit
4b919c8a
authored
6 months ago
by
fejao
Browse files
Options
Downloads
Patches
Plain Diff
Adding .gitlab-ci.yml file
parent
875b69cf
No related branches found
No related tags found
1 merge request
!6
Setting ansible lint 01
Pipeline
#37371
failed
6 months ago
Stage: debug
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+119
-0
119 additions, 0 deletions
.gitlab-ci.yml
with
119 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
119
−
0
View file @
4b919c8a
# image: python:3.10.15-bullseye
image
:
ansible:latest
variables
:
TEST_VAR_BUILD
:
"
Building
the
application..."
DOC_PATH_TMP
:
tmp_docs
DOC_NAME
:
c3InfoDesk Printing
DOC_AUTHOR
:
fejao
DOC_VERSION
:
1.0.0
DOC_LANGUAGE
:
english
# DOC_RETENTION: 1 day # <--- DON'T WORK :(
#####
#####
#####
PLAYBOOK_NAME_FOR_ROLE_TEST
:
"
playbook_example_01_test.yml"
stages
:
-
debug
-
build
-
test
-
docs
-
deploy
###
### DEBUG
###
runner-debug
:
stage
:
debug
script
:
-
echo "Testing local gitlab-runner config..."
-
echo $PWD
-
echo "list local folder..."
-
ls -hal
###
### BUILD
###
build
:
stage
:
build
script
:
-
echo "Here should be the images build and pushed"
###
### TESTS
###
ansible-lint-test
:
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
-
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
# ###
# ### DEPLOY
# ###
# deploy:
# stage: deploy
# script:
# - echo "Deploying the application..."
# - echo "TODO --> where to deploy this?"
# only:
# - main
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