[WIP] Add multi-platform docker support in scripts #371
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Teraslice CI Tests | |
# this will technically run again on merge to master, should limit it | |
on: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
# verify-build: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Setup Node | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: 18.18.2 | |
# cache: 'yarn' | |
# - name: Install and build packages | |
# run: yarn setup | |
# env: | |
# YARN_SETUP_ARGS: "--prod=false --silent" | |
# - name: Lint codebase | |
# run: yarn lint | |
# - name: Sync codebase | |
# run: yarn sync --verify | |
# linux-unit-tests: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# node-version: [16.20.2, 18.18.2] | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Setup Node ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'yarn' | |
# - name: Install and build packages | |
# run: yarn setup | |
# env: | |
# YARN_SETUP_ARGS: "--prod=false --silent" | |
# - name: Test | |
# run: yarn --silent test -- --suite unit -- | |
# teraslice-elasticsearch-tests: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# # opensearch is finiky, keep testing others if it fails | |
# fail-fast: false | |
# matrix: | |
# node-version: [16.20.2, 18.18.2] | |
# search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2] | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Setup Node ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'yarn' | |
# # we login to docker to avoid docker pull limit rates | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v2 | |
# with: | |
# username: ${{ secrets.DOCKER_USERNAME }} | |
# password: ${{ secrets.DOCKER_PASSWORD }} | |
# - name: Install and build packages | |
# run: yarn setup | |
# env: | |
# YARN_SETUP_ARGS: "--prod=false --silent" | |
# - name: Test ${{ matrix.search-version }} | |
# run: yarn --silent test:${{ matrix.search-version }} | |
# working-directory: ./packages/teraslice | |
# elasticsearch-store-tests: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# # opensearch is finiky, keep testing others if it fails | |
# fail-fast: false | |
# matrix: | |
# node-version: [16.20.2, 18.18.2] | |
# search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2] | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Setup Node ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'yarn' | |
# # we login to docker to avoid docker pull limit rates | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v2 | |
# with: | |
# username: ${{ secrets.DOCKER_USERNAME }} | |
# password: ${{ secrets.DOCKER_PASSWORD }} | |
# - name: Install and build packages | |
# run: yarn setup | |
# env: | |
# YARN_SETUP_ARGS: "--prod=false --silent" | |
# - name: Test ${{ matrix.search-version }} | |
# run: yarn --silent test:${{ matrix.search-version }} | |
# working-directory: ./packages/elasticsearch-store | |
# # This is for backwards compatability, should be removed in the future | |
# elasticsearch-store-legacy: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Setup Node | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: 18.18.2 | |
# cache: 'yarn' | |
# # we login to docker to avoid docker pull limit rates | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v2 | |
# with: | |
# username: ${{ secrets.DOCKER_USERNAME }} | |
# password: ${{ secrets.DOCKER_PASSWORD }} | |
# - name: Install and build packages | |
# run: yarn setup | |
# env: | |
# YARN_SETUP_ARGS: "--prod=false --silent" | |
# - name: Test | |
# run: yarn --silent test:legacy | |
# working-directory: ./packages/elasticsearch-store | |
# elasticsearch-api-tests: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# # opensearch is finiky, keep testing others if it fails | |
# fail-fast: false | |
# matrix: | |
# node-version: [16.20.2, 18.18.2] | |
# search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2] | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Setup Node ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'yarn' | |
# # we login to docker to avoid docker pull limit rates | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v2 | |
# with: | |
# username: ${{ secrets.DOCKER_USERNAME }} | |
# password: ${{ secrets.DOCKER_PASSWORD }} | |
# - name: Install and build packages | |
# run: yarn setup | |
# env: | |
# YARN_SETUP_ARGS: "--prod=false --silent" | |
# - name: Test ${{ matrix.search-version }} | |
# run: yarn --silent test:${{ matrix.search-version }} | |
# working-directory: ./packages/elasticsearch-api | |
# # This is for backwards compatability, should be removed in the future | |
# elasticsearch-api-legacy: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Setup Node | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: 18.18.2 | |
# cache: 'yarn' | |
# # we login to docker to avoid docker pull limit rates | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v2 | |
# with: | |
# username: ${{ secrets.DOCKER_USERNAME }} | |
# password: ${{ secrets.DOCKER_PASSWORD }} | |
# - name: Install and build packages | |
# run: yarn setup | |
# env: | |
# YARN_SETUP_ARGS: "--prod=false --silent" | |
# - name: Test | |
# run: yarn --silent test:legacy | |
# working-directory: ./packages/elasticsearch-api | |
# e2e-tests: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# # opensearch is finiky, keep testing others if it fails | |
# fail-fast: false | |
# matrix: | |
# node-version: [16.20.2, 18.18.2] | |
# search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2] | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Setup Node ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'yarn' | |
# # we login to docker to avoid docker pull limit rates | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v2 | |
# with: | |
# username: ${{ secrets.DOCKER_USERNAME }} | |
# password: ${{ secrets.DOCKER_PASSWORD }} | |
# - name: Install and build packages | |
# run: yarn setup | |
# env: | |
# YARN_SETUP_ARGS: "--prod=false --silent" | |
# - name: Test ${{ matrix.search-version }} | |
# run: yarn --silent test:${{ matrix.search-version }} --node-version ${{ matrix.node-version }} | |
# working-directory: ./e2e | |
# e2e-k8s-tests: | |
# runs-on: ubuntu-latest | |
# strategy: | |
# # opensearch is finiky, keep testing others if it fails | |
# fail-fast: false | |
# matrix: | |
# node-version: [16.20.2, 18.18.2] | |
# steps: | |
# - name: Check out code | |
# uses: actions/checkout@v3 | |
# - name: Setup Node ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'yarn' | |
# # we login to docker to avoid docker pull limit rates | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v2 | |
# with: | |
# username: ${{ secrets.DOCKER_USERNAME }} | |
# password: ${{ secrets.DOCKER_PASSWORD }} | |
# - name: Install and build packages | |
# run: yarn setup | |
# env: | |
# YARN_SETUP_ARGS: "--prod=false --silent" | |
# - name: Install Kind and Kubectl | |
# uses: helm/kind-action@v1.8.0 | |
# with: | |
# install_only: "true" | |
# - name: Test k8s elasticsearch7 | |
# run: yarn --silent test:k8s --node-version ${{ matrix.node-version }} | |
# working-directory: ./e2e | |
test-docker-build-publish-J: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.20.2, 18.18.2] | |
steps: | |
# we login to docker to publish new teraslice image | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- name: Install and build packages | |
run: yarn setup | |
env: | |
YARN_SETUP_ARGS: "--prod=false --silent --network-timeout 1000000" | |
- name: Publish to docker | |
run: yarn ts-scripts publish -t tag -n ${{ matrix.node-version }} docker | |
- name: Publish to docker Dev | |
run: yarn ts-scripts publish -t dev docker |