website: node18 (#2842)

* website: node18

* remove ci-link-checker image

* Update .circleci/config.yml
This commit is contained in:
Ken Kaizu
2022-12-21 07:45:09 +09:00
committed by GitHub
parent b94575ac88
commit ce8c89b566
5 changed files with 20 additions and 66 deletions

View File

@@ -28,25 +28,33 @@ jobs:
# muffet (https://github.com/raviqqe/muffet) to perform the link check.
website_link_check:
docker:
# This image's Dockerfile is at runatlantis.io/Dockerfile
- image: ghcr.io/runatlantis/ci-link-checker:2021.06.22
- image: cimg/node:18.12.1
environment:
# renovate: datasource=github-releases depName=raviqqe/muffet
MUFFET_VERSION: 2.6.2
steps:
- checkout
- run: |
# http-server is used to serve the website locally as muffet checks it.
yarn global add http-server
# install raviqqe/muffet to check for broken links.
curl -L https://github.com/raviqqe/muffet/releases/download/v${MUFFET_VERSION}/muffet_${MUFFET_VERSION}_Linux_x86_64.tar.gz | tar -xz
- run: yarn install
- run: yarn website:build
- run:
name: http-server
command: http-server runatlantis.io/.vuepress/dist
background: true
# We use dockerize -wait here to wait until the server is up.
- run:
name: wait until server listened
command: curl --retry-delay 1 --retry 30 --retry-all-error http://localhost:8080
- run: |
dockerize -wait tcp://localhost:8080 -- \
muffet \
-e 'https://github\.com/runatlantis/atlantis/edit/main/.*' \
-e 'https://github.com/runatlantis/helm-charts#customization' \
--header 'Accept-Encoding:deflate, gzip' \
--buffer-size 8192 \
http://localhost:8080/
./muffet \
-e 'https://github\.com/runatlantis/atlantis/edit/main/.*' \
-e 'https://github.com/runatlantis/helm-charts#customization' \
--header 'Accept-Encoding:deflate, gzip' \
--buffer-size 8192 \
http://localhost:8080/
workflows:
version: 2

View File

@@ -1,16 +0,0 @@
# This Dockerfile builds runatlantis/ci-link-checker.
# It is used in CircleCI to check if the website has any broken links.
FROM node:14
ENV DOCKERIZE_VERSION v0.6.1
# Muffet is used to check for broken links.
COPY --from=raviqqe/muffet:2.6.2 muffet /usr/local/bin/muffet
# http-server is used to serve the website locally as muffet checks it.
RUN yarn global add http-server
# Dockerize is used to wait until the server is up and running before running
# muffet.
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz

View File

@@ -1,38 +0,0 @@
name: ci-link-checker-image
on:
push:
paths:
- '.github/website_link_checker/**'
branches:
- "main"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
defaults:
run:
working-directory: .github/website_link_checker
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Login to Packages Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: echo "TODAY=$(date +"%Y.%m.%d")" >> $GITHUB_ENV
- name: build ci-link-checker:${{env.TODAY}} image
run: |
docker build -t ghcr.io/runatlantis/ci-link-checker:${{env.TODAY}} .
- name: publish ci-link-checker:${{env.TODAY}} image
run: |
docker push ghcr.io/runatlantis/ci-link-checker:${{env.TODAY}}
docker tag ghcr.io/runatlantis/ci-link-checker:${{env.TODAY}} ghcr.io/runatlantis/ci-link-checker:latest
docker push ghcr.io/runatlantis/ci-link-checker:latest

View File

@@ -1 +1 @@
14.21.2
18.12.1

View File

@@ -5,6 +5,6 @@
},
"scripts": {
"website:dev": "vuepress dev runatlantis.io",
"website:build": "vuepress build runatlantis.io"
"website:build": "NODE_OPTIONS=--openssl-legacy-provider vuepress build runatlantis.io"
}
}