Skip to content

Commit

Permalink
Update requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rolljee committed Nov 29, 2023
1 parent 071d688 commit da25978
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/core-dev.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
jobs:
build-and-push:
name: Build and push core-dev image
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/elasticsearch.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
build-and-push:
name: Build and push elasticsearch image
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

Expand Down
74 changes: 9 additions & 65 deletions .github/workflows/kuzzle-runner.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,17 @@ on:

env:
DOCKER_PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7"
NODE_LTS_MAINTENANCE_VERSION: "16"
NODE_LTS_ACTIVE_VERSION: "18"
NODE_LTS_CURRENT_VERSION: "20"

jobs:
publish-runner:
name: Build and push image embedding Node.js
runs-on: ubuntu-22.04

maintenance:
name: Build and deploy image embedding Node.js maintenance LTS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./kuzzle-runner
file: ./kuzzle-runner/Dockerfile
push: true
build-args: NODE_LTS_VERSION=${{ env.NODE_LTS_MAINTENANCE_VERSION }}
platforms: ${{ env.DOCKER_PLATFORMS }}
tags: kuzzleio/kuzzle-runner:${{ env.NODE_LTS_MAINTENANCE_VERSION }},kuzzleio/kuzzle-runner:maintenance

active:
name: Build and deploy image embedding Node.js active LTS version
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
matrix:
node-version: [16, 18, 20]
steps:
- uses: actions/checkout@v3

Expand All @@ -66,36 +40,6 @@ jobs:
context: ./kuzzle-runner
file: ./kuzzle-runner/Dockerfile
push: true
build-args: NODE_LTS_VERSION=${{ env.NODE_LTS_ACTIVE_VERSION }}
build-args: NODE_LTS_VERSION=${{ matrix.node-version }}
platforms: ${{ env.DOCKER_PLATFORMS }}
tags: kuzzleio/kuzzle-runner:${{ env.NODE_LTS_ACTIVE_VERSION }},kuzzleio/kuzzle-runner:active,kuzzleio/kuzzle-runner:latest

# Node 20 is not currently supported, this will be uncommented in a upcomming PR
# current:
# name: Build and deploy image embedding Node.js latest LTS version
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3

# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v3

# - name: Login to DockerHub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}

# - name: Build and push
# uses: docker/build-push-action@v3
# with:
# context: ./kuzzle-runner
# file: ./kuzzle-runner/Dockerfile
# push: true
# build-args: NODE_LTS_VERSION=${{ env.NODE_LTS_CURRENT_VERSION }}
# platforms: ${{ env.DOCKER_PLATFORMS }}
# tags: kuzzleio/kuzzle-runner:${{ env.NODE_LTS_CURRENT_VERSION }},kuzzleio/kuzzle-runner:current
tags: kuzzleio/kuzzle-runner:${{ matrix.node-version }}
6 changes: 3 additions & 3 deletions .github/workflows/workflow-deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
doc-deploy:
name: Documentation - Deploy
if: ${{ (github.event_name != 'workflow_dispatch' || inputs.doc_deploy) && (github.ref_name == 'master' || github.ref_name == '2-dev') }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All @@ -102,7 +102,7 @@ jobs:
dockerhub-deploy:
name: Build and deploy images to Dockerhub
if: ${{ (github.event_name != 'workflow_dispatch' || inputs.dockerhub_deploy) && github.ref_name == 'master' }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
npm-deploy:
name: Build and deploy release on NPM.js
if: ${{ (github.event_name != 'workflow_dispatch' || inputs.npm_deploy) && github.ref_name == 'master' }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ env:
jobs:
prepare-matrix:
name: Forge Node LTS Matrix
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- id: set-matrix
run: |
echo "matrix={\"node-version\": [\"$NODE_LTS_MAINTENANCE_VERSION\", \"$NODE_LTS_ACTIVE_VERSION\"]}" >> $GITHUB_OUTPUT
echo 'node-version=["$NODE_LTS_MAINTENANCE_VERSION", "$NODE_LTS_ACTIVE_VERSION"]' >> $GITHUB_OUTPUT
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
node_lts_maintenance_version: ${{ env.NODE_LTS_MAINTENANCE_VERSION }}
Expand All @@ -30,7 +30,7 @@ jobs:

error-codes-check:
name: Documentation - Error codes check
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All @@ -52,11 +52,11 @@ jobs:

lint:
name: Lint - Node.js LTS ${{ matrix.node-version }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [prepare-matrix]
strategy:
matrix:
node-version: ${{ fromJson(needs.prepare-matrix.outputs.matrix).node-version }}
node-version: ${{ needs.prepare-matrix.outputs.node-version }}
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All @@ -78,8 +78,8 @@ jobs:
needs: [lint, prepare-matrix]
strategy:
matrix:
node-version: ${{ fromJson(needs.prepare-matrix.outputs.matrix).node-version }}
runs-on: ubuntu-latest
node-version: ${{ needs.prepare-matrix.outputs.node-version }}
runs-on: ubuntu-22.04
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All @@ -105,10 +105,10 @@ jobs:
build-and-run-kuzzle:
needs: [unit-tests, prepare-matrix]
name: Build and Run
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: ${{ fromJson(needs.prepare-matrix.outputs.matrix).node-version }}
node-version: ${{ needs.prepare-matrix.outputs.node-version }}
kuzzle-image: ["kuzzle"]
steps:
- name: Checkout project
Expand Down Expand Up @@ -142,8 +142,8 @@ jobs:
"legacy:http",
"legacy:websocket",
]
node-version: ${{ fromJson(needs.prepare-matrix.outputs.matrix).node-version }}
runs-on: ubuntu-latest
node-version: ${{ needs.prepare-matrix.outputs.node-version }}
runs-on: ubuntu-22.04
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand All @@ -156,10 +156,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Install depedencies
run: npm ci

- name: Build kuzzle
run: npm run build

Expand All @@ -174,10 +174,10 @@ jobs:
cluster-monkey-tests:
name: Cluster Monkey Tests
needs: [functional-tests, build-and-run-kuzzle, prepare-matrix]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: ${{ fromJson(needs.prepare-matrix.outputs.matrix).node-version }}
node-version: ${{ needs.prepare-matrix.outputs.node-version }}
steps:
- name: Checkout project
uses: actions/checkout@v3
Expand Down

0 comments on commit da25978

Please sign in to comment.