Use a locally built docker image for the CI #20
3 changed files with 27 additions and 11 deletions
14
.drone.yml
14
.drone.yml
|
@ -4,17 +4,9 @@ type: docker
|
||||||
name: check
|
name: check
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: yamllint
|
- name: ansible and yaml linting
|
||||||
image: python:3.9-alpine
|
pull: never
|
||||||
|
image: aurore-ansible-lint-image
|
||||||
commands:
|
commands:
|
||||||
- pip install "yamllint>=1.26.0,<2.0"
|
|
||||||
- yamllint -c .yamllint.yml .
|
|
||||||
|
|
||||||
- name: ansible-lint
|
|
||||||
image: python:3.9-alpine
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache gcc musl-dev python3-dev libffi-dev openssl-dev cargo
|
|
||||||
- pip install "ansible-lint==5.0.0"
|
|
||||||
- pip install "ansible>=2.10,<2.11"
|
|
||||||
- ansible-lint
|
- ansible-lint
|
||||||
...
|
...
|
||||||
|
|
6
docker-ansible-lint/Dockefile
Normal file
6
docker-ansible-lint/Dockefile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
FROM python:3.9-alpine
|
||||||
|
|
||||||
|
RUN apk add --no-cache gcc musl-dev python3-dev libffi-dev openssl-dev cargo
|
||||||
|
RUN pip install "yamllint>=1.26.0,<2.0"
|
||||||
|
RUN pip install "ansible-lint==5.0.0"
|
||||||
|
RUN pip install "ansible>=2.10,<2.11"
|
18
docker-ansible-lint/README.md
Normal file
18
docker-ansible-lint/README.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Ansible-lint image
|
||||||
|
|
||||||
|
In order to build this image when a new version comes out, you need to
|
||||||
|
1. ssh into the drone.adm.auro.re server
|
||||||
|
2. git pull this repo to the lastest version
|
||||||
|
3. optionnally make the changes if it has not been done yet
|
||||||
|
4. `sudo docker build -t aurore-ansible-lint-image docker-ansible-lint/`
|
||||||
|
5. ???
|
||||||
|
6. enjoy
|
||||||
|
|
||||||
|
You can verify that the image was correclty built by running
|
||||||
|
```
|
||||||
|
# list the images present
|
||||||
|
sudo docker image
|
||||||
|
|
||||||
|
# run your image with an interactive shell
|
||||||
|
sudo docker run -it --rm aurore-ansible-lint-image
|
||||||
|
```
|
Loading…
Reference in a new issue