Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Commit

Permalink
Make dockerfile dependabot compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jan 21, 2024
1 parent ca6394d commit 16f988f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .config/Containerfile → .config/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ FROM quay.io/ansible/creator-ee:v0.21.0 as DEFAULT_EE
# version of creator-ee we are supposed to use for testing execution
# environments but also to dynamically retrieve the same set of constraints
# for testing outside execution environments.
#
# Do not rename this file to Containerfile due to
# https://github.com/dependabot/dependabot-core/issues/6067
4 changes: 3 additions & 1 deletion .config/dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Ansible
CFLAGS
Containerfile
Dpkg
FQCN
Expand Down Expand Up @@ -58,8 +59,10 @@ lineinfile
linkcheck
linkify
loglevel
lssh
lxml
markdownlint
mkdocs
monospace
mycollection
mymodule
Expand Down Expand Up @@ -118,7 +121,6 @@ wordwrap
workdir
xvfb
yammlint
mkdocs

# names and usernames:
Ganesh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
${{ runner.os }}-${{ matrix.task-name }}-${{ hashFiles(
'package.json',
'package-lock.json',
'.config/Containerfile'
'.config/Dockerfile'
) }}
- name: Enable caching for podman-machine
Expand All @@ -130,7 +130,7 @@ jobs:
path: |
~/.local/share/containers
~/.config/containers
key: ${{ runner.os }}-${{ matrix.task-name }}-${{ hashFiles('package.json', 'yarn.lock', '.config/Containerfile', '**/Taskfile.yml', 'tools/*.*') }}
key: ${{ runner.os }}-${{ matrix.task-name }}-${{ hashFiles('package.json', 'yarn.lock', '.config/Dockerfile', '**/Taskfile.yml', 'tools/*.*') }}

- name: Install Task
if: "!contains(matrix.shell, 'wsl')"
Expand Down
6 changes: 4 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ repos:
- id: shellcheck
args:
- --color=always
- -e
- SC1091
- repo: local
hooks:
- id: npm-ci
Expand Down Expand Up @@ -52,7 +54,7 @@ repos:
files: "codecov.yml"
pass_filenames: false
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.2.1
rev: v8.3.0
hooks:
- id: cspell
name: Spell check with cspell
Expand Down Expand Up @@ -103,7 +105,7 @@ repos:
docs/settings.md
$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.0.0-alpha.0
rev: v9.0.0-alpha.1
hooks:
- id: eslint
args:
Expand Down
2 changes: 1 addition & 1 deletion tools/get-image-version
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
version = "latest"
# read image version from dockerfile
with open(".config/Containerfile", "r") as f:
with open(".config/Dockerfile", "r") as f:
for line in f:
if line.startswith("FROM"):
version = line.split()[1].split()[0].split(":")[1]
Expand Down
4 changes: 2 additions & 2 deletions tools/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ if [[ ! -d "${VIRTUAL_ENV}" ]]; then
log notice "Creating virtualenv ..."
python3 -m venv "${VIRTUAL_ENV}"
fi
# shellcheck disable=SC1091
# shellcheck source=/dev/null
. "${VIRTUAL_ENV}/bin/activate"

if [[ "$(which python3)" != ${VIRTUAL_ENV}/bin/python3 ]]; then
Expand All @@ -192,7 +192,7 @@ python3 -m pip install -q -U pip
EE_VERSION=$(./tools/get-image-version)
if [[ $(uname || true) != MINGW* ]]; then # if we are not on pure Windows
URL="https://raw.githubusercontent.com/ansible/creator-ee/${EE_VERSION}/_build/requirements.txt"
log notice "Installing dependencies from .config/requirements.in and ${URL} loaded from .config/Containerfile ..."
log notice "Installing dependencies from .config/requirements.in and ${URL} loaded from .config/Dockerfile ..."

if [[ "${OS:-}" == "darwin" ]]; then
log notice "MacOS detected, altering CFLAGS to avoid potential build failure due to https://github.com/ansible/pylibssh/issues/207 ..."
Expand Down

0 comments on commit 16f988f

Please sign in to comment.