Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link checker job #4116

Merged

Conversation

Mixaster995
Copy link
Contributor

@Mixaster995 Mixaster995 commented Dec 20, 2021

Signed-off-by: Mikhail Avramenko [email protected]

Issue

closes #4053

@Mixaster995 Mixaster995 force-pushed the enhancement/link-checker branch 2 times, most recently from 7035d0c to 8dcb0a8 Compare December 21, 2021 08:05
Signed-off-by: Mikhail Avramenko <[email protected]>
@Mixaster995 Mixaster995 force-pushed the enhancement/link-checker branch from 9b6661f to 747fb91 Compare December 21, 2021 11:19
@Mixaster995 Mixaster995 marked this pull request as ready for review December 21, 2021 11:20
@Mixaster995 Mixaster995 changed the title test link checker Add link checker job Dec 21, 2021
@Mixaster995 Mixaster995 self-assigned this Dec 22, 2021
linkChecker:
runs-on: ubuntu-latest
container:
image: lycheeverse/lychee:latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the fixed version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, fixed

Comment on lines 79 to 93
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check external links using lychee
run: |
REF=$(grep --include=\*.md -r . -e '?ref=' | head -1 | cut -d '=' -f2)
grep --include=\*.md -r . -e '?ref=' | while IFS= read -r line ; do
NEW_FILENAME=$(echo "$line" | cut -d ':' -f1)
if [ "$FILENAME" = "$NEW_FILENAME" ]; then
continue
fi
FILENAME="$NEW_FILENAME"
sed -i -e "s/github.com\/networkservicemesh\/deployments-k8s/github.com\/networkservicemesh\/deployments-k8s\/tree\/$REF/g" "$FILENAME"
sed -i -e "s/?ref=$REF//g" "$FILENAME"
done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check external links using lychee
run: |
REF=$(grep --include=\*.md -r . -e '?ref=' | head -1 | cut -d '=' -f2)
grep --include=\*.md -r . -e '?ref=' | while IFS= read -r line ; do
NEW_FILENAME=$(echo "$line" | cut -d ':' -f1)
if [ "$FILENAME" = "$NEW_FILENAME" ]; then
continue
fi
FILENAME="$NEW_FILENAME"
sed -i -e "s/github.com\/networkservicemesh\/deployments-k8s/github.com\/networkservicemesh\/deployments-k8s\/tree\/$REF/g" "$FILENAME"
sed -i -e "s/?ref=$REF//g" "$FILENAME"
done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, fixed

sed -i -e "s/github.com\/networkservicemesh\/deployments-k8s/github.com\/networkservicemesh\/deployments-k8s\/tree\/$REF/g" "$FILENAME"
sed -i -e "s/?ref=$REF//g" "$FILENAME"
done
lychee -v '**/*.md' --exclude-mail
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lychee -v '**/*.md' --exclude-mail
lychee -v '**/*.md' --exclude-mail --exclude '.*?ref\=?.*'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, fixed

Copy link
Member

@denis-tingaikin denis-tingaikin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks overcomplicated.

@Mixaster995 Mixaster995 force-pushed the enhancement/link-checker branch from 8e85491 to cb594bd Compare December 23, 2021 09:20
Signed-off-by: Mikhail Avramenko <[email protected]>
@Mixaster995 Mixaster995 force-pushed the enhancement/link-checker branch from cb594bd to 7b5cd9e Compare December 23, 2021 09:20
@denis-tingaikin denis-tingaikin merged commit 7481bbe into networkservicemesh:main Dec 23, 2021
nsmbot pushed a commit to networkservicemesh/integration-tests that referenced this pull request Dec 23, 2021
…ployments-k8s@main

PR link: networkservicemesh/deployments-k8s#4116

Commit: eb73616
Author: Denis Tingaikin
Date: 2021-12-23 11:57:16 +0300
Message:
  - Merge pull request #1241 from glazychev-art/describe_prefetch
Signed-off-by: NSMBot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add links checker job for deployments-k8s
2 participants