Skip to content

Commit

Permalink
ci: remove standalone commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrarimarco committed Oct 19, 2024
1 parent 21a0da9 commit bfaf29d
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 1,017 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ updates:
- /config/ansible/roles/ferrarimarco_home_lab_node/files/config/dependency-updates-helper
- /config/ansible/roles/ferrarimarco_home_lab_node/files/config/restic
- /docker/ansible
- /docker/release-please-commitlint
- /docker/ci-cd-tools
commit-message:
prefix: "deps"
package-ecosystem: "docker"
Expand All @@ -80,7 +80,7 @@ updates:
- node
- python
- directories:
- /docker/release-please-commitlint
- /docker/ci-cd-tools
commit-message:
prefix: "deps"
package-ecosystem: "npm"
Expand Down
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"matchFileNames": [
"config/pre-commit/**",
".github/**",
"docker/release-please-commitlint/**",
"docker/ci-cd-tools/**",
"scripts/run-renovate.sh"
],
"groupName": "ci"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-container-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ jobs:
context-directory: config/ansible/roles/ferrarimarco_home_lab_node/files/config/restic
- name: cd-container
build-contexts: null
context-directory: docker/release-please-commitlint
context-directory: docker/ci-cd-tools
37 changes: 0 additions & 37 deletions .github/workflows/lint-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,40 +35,3 @@ jobs:
else
echo "This pull request contains ${commit_count} commit."
fi
- name: Set commit metadata
run: |
SET_INTERVAL_VALUES="true"
if [[ ${{ github.event_name }} == 'push' ]] || [[ ${{ github.event_name }} == 'merge_group' ]]; then
echo "Using default commit metadata"
SET_INTERVAL_VALUES="false"
elif [[ ${{ github.event_name }} == 'pull_request' ]]; then
FROM_INTERVAL_COMMITLINT=${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }}
TO_INTERVAL_COMMITLINT=${{ github.event.pull_request.head.sha }}
else
echo "[ERROR] Event not supported when setting commit metadata"
exit 1
fi
if [ "${SET_INTERVAL_VALUES}" == "true" ]; then
if [ -z "${FROM_INTERVAL_COMMITLINT}" ]; then
echo "[ERROR] FROM_INTERVAL_COMMITLINT is empty"
exit 1
fi
if [ -z "${TO_INTERVAL_COMMITLINT}" ]; then
echo "[ERROR] TO_INTERVAL_COMMITLINT is empty"
exit 1
fi
{
echo "FROM_INTERVAL_COMMITLINT=${FROM_INTERVAL_COMMITLINT}"
echo "TO_INTERVAL_COMMITLINT=${TO_INTERVAL_COMMITLINT}"
} >> "${GITHUB_ENV}"
else
echo "Skip updating GITHUB_ENV. SET_INTERVAL_VALUES: ${SET_INTERVAL_VALUES}"
fi
- name: Validate commits
run: |
scripts/lint-commits.sh
File renamed without changes.
4 changes: 2 additions & 2 deletions config/lint/.checkov.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
]
},
{
"file": "/docker/release-please-commitlint/Dockerfile",
"file": "/docker/ci-cd-tools/Dockerfile",
"findings": [
{
"resource": "/docker/release-please-commitlint/Dockerfile.",
"resource": "/docker/ci-cd-tools/Dockerfile.",
"check_ids": [
"CKV_DOCKER_2"
]
Expand Down
2 changes: 2 additions & 0 deletions config/lint/super-linter.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ANSIBLE_DIRECTORY=docker/ansible/etc/ansible
CREATE_LOG_FILE=true
ENABLE_COMMITLINT_STRICT_MODE=true
ENFORCE_COMMITLINT_CONFIGURATION_CHECK=true
GITLEAKS_LOG_LEVEL=warn
IGNORE_GITIGNORED_FILES=true
LINTER_RULES_PATH=config/lint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ WORKDIR "${APP_DIR}"
COPY package.json package-lock.json ./

RUN npm ci \
&& npm audit \
&& rm -rf ~/.npm

ENV NODE_PATH="${APP_DIR}/node_modules"
ENV PATH="${NODE_PATH}/.bin:${PATH}"

RUN commitlint --version \
&& release-please --version

ARG USERNAME=home-lab-dev
ARG UID=1000
ARG GID=1000
Expand Down
Loading

0 comments on commit bfaf29d

Please sign in to comment.