From 58068e9cd80b5b1874bf14cd0e69eaee370a0b29 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 16:39:27 +0100 Subject: [PATCH 1/4] Docker image to be built for the CI --- docker-ansible-lint/Dockefile | 6 ++++++ docker-ansible-lint/README.md | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 docker-ansible-lint/Dockefile create mode 100644 docker-ansible-lint/README.md diff --git a/docker-ansible-lint/Dockefile b/docker-ansible-lint/Dockefile new file mode 100644 index 0000000..c34f38a --- /dev/null +++ b/docker-ansible-lint/Dockefile @@ -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" diff --git a/docker-ansible-lint/README.md b/docker-ansible-lint/README.md new file mode 100644 index 0000000..c2fb0f7 --- /dev/null +++ b/docker-ansible-lint/README.md @@ -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 +``` -- 2.45.2 From 42074b31c50842dc66a87578be37d7905a7d2590 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 16:40:27 +0100 Subject: [PATCH 2/4] simplify the drone config wiht the newly built image --- .drone.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index ab5b271..680b5c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,16 +5,7 @@ name: check steps: - name: yamllint - image: python:3.9-alpine + image: aurore-ansible-lint-image 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 ... -- 2.45.2 From 414e80a7c4bdc5e621753cea06122de22552a9f5 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 16:42:10 +0100 Subject: [PATCH 3/4] never try to pull this image --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 680b5c6..96588b3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,6 +5,7 @@ name: check steps: - name: yamllint + pull: never image: aurore-ansible-lint-image commands: - ansible-lint -- 2.45.2 From d650e77b23f854e1d871b41b939e33942e0a9ae5 Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 16:43:11 +0100 Subject: [PATCH 4/4] rename ci task --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 96588b3..eb6ce40 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ type: docker name: check steps: - - name: yamllint + - name: ansible and yaml linting pull: never image: aurore-ansible-lint-image commands: -- 2.45.2