diff --git a/.github/workflows/api-gateway.release.yml b/.github/workflows/api-gateway.release.yml index 22af93941..e800ff2b8 100644 --- a/.github/workflows/api-gateway.release.yml +++ b/.github/workflows/api-gateway.release.yml @@ -16,13 +16,42 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set up Node uses: actions/setup-node@v3 with: registry-url: 'https://registry.npmjs.org' node-version-file: '.nvmrc' - - run: yarn build - - run: yarn lint:api-gateway + + - name: Build + run: yarn build + + - name: Lint + run: yarn lint:api-gateway + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Publish Docker image for E2E testing + run: | + yarn docker build @standardnotes/api-gateway -t standardnotes/api-gateway:${{ github.sha }} + docker push standardnotes/api-gateway:${{ github.sha }} + + - name: Run E2E test suite + uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: standardnotes + repo: e2e + github_token: ${{ secrets.CI_PAT_TOKEN }} + workflow_file_name: testing-with-stable-client.yml + wait_interval: 30 + client_payload: '{"api_gateway_image_tag": "${{ github.sha }}"}' + propagate_failure: true + trigger_workflow: true + wait_workflow: true publish-aws-ecr: needs: test @@ -68,10 +97,8 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build, tag, and push image to Docker Hub + - name: Publish Docker image as stable run: | - yarn docker build @standardnotes/api-gateway -t standardnotes/api-gateway:${{ github.sha }} - docker push standardnotes/api-gateway:${{ github.sha }} docker tag standardnotes/api-gateway:${{ github.sha }} standardnotes/api-gateway:latest docker push standardnotes/api-gateway:latest diff --git a/.github/workflows/auth.release.yml b/.github/workflows/auth.release.yml index 85fba769a..8706ba404 100644 --- a/.github/workflows/auth.release.yml +++ b/.github/workflows/auth.release.yml @@ -16,14 +16,45 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set up Node uses: actions/setup-node@v3 with: registry-url: 'https://registry.npmjs.org' node-version-file: '.nvmrc' - - run: yarn build - - run: yarn lint:auth - - run: yarn test:auth + + - name: Build + run: yarn build + + - name: Lint + run: yarn lint:auth + + - name: Test + run: yarn test:auth + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Publish Docker image for E2E testing + run: | + yarn docker build @standardnotes/auth-server -t standardnotes/auth:${{ github.sha }} + docker push standardnotes/auth:${{ github.sha }} + + - name: Run E2E test suite + uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: standardnotes + repo: e2e + github_token: ${{ secrets.CI_PAT_TOKEN }} + workflow_file_name: testing-with-stable-client.yml + wait_interval: 30 + client_payload: '{"auth_image_tag": "${{ github.sha }}"}' + propagate_failure: true + trigger_workflow: true + wait_workflow: true publish-aws-ecr: needs: test @@ -69,10 +100,8 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build, tag, and push image to Docker Hub + - name: Publish Docker image as stable run: | - yarn docker build @standardnotes/auth-server -t standardnotes/auth:${{ github.sha }} - docker push standardnotes/auth:${{ github.sha }} docker tag standardnotes/auth:${{ github.sha }} standardnotes/auth:latest docker push standardnotes/auth:latest diff --git a/.github/workflows/files.release.yml b/.github/workflows/files.release.yml index b91b9c66a..53f174023 100644 --- a/.github/workflows/files.release.yml +++ b/.github/workflows/files.release.yml @@ -16,14 +16,45 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set up Node uses: actions/setup-node@v3 with: registry-url: 'https://registry.npmjs.org' node-version-file: '.nvmrc' - - run: yarn build - - run: yarn lint:files - - run: yarn test:files + + - name: Build + run: yarn build + + - name: Lint + run: yarn lint:files + + - name: Test + run: yarn test:files + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Publish Docker image for E2E testing + run: | + yarn docker build @standardnotes/files-server -t standardnotes/files:${{ github.sha }} + docker push standardnotes/files:${{ github.sha }} + + - name: Run E2E test suite + uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: standardnotes + repo: e2e + github_token: ${{ secrets.CI_PAT_TOKEN }} + workflow_file_name: testing-with-stable-client.yml + wait_interval: 30 + client_payload: '{"files_image_tag": "${{ github.sha }}"}' + propagate_failure: true + trigger_workflow: true + wait_workflow: true publish-aws-ecr: needs: test @@ -71,8 +102,6 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build, tag, and push image to Docker Hub run: | - yarn docker build @standardnotes/files-server -t standardnotes/files:${{ github.sha }} - docker push standardnotes/files:${{ github.sha }} docker tag standardnotes/files:${{ github.sha }} standardnotes/files:latest docker push standardnotes/files:latest diff --git a/.github/workflows/syncing-server.release.yml b/.github/workflows/syncing-server.release.yml index 97772b94c..3165c26c3 100644 --- a/.github/workflows/syncing-server.release.yml +++ b/.github/workflows/syncing-server.release.yml @@ -16,14 +16,45 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set up Node uses: actions/setup-node@v3 with: registry-url: 'https://registry.npmjs.org' node-version-file: '.nvmrc' - - run: yarn build - - run: yarn lint:syncing-server - - run: yarn test:syncing-server + + - name: Build + run: yarn build + + - name: Lint + run: yarn lint:syncing-server + + - name: Test + run: yarn test:syncing-server + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Publish Docker image for E2E testing + run: | + yarn docker build @standardnotes/syncing-server -t standardnotes/syncing-server-js:${{ github.sha }} + docker push standardnotes/syncing-server-js:${{ github.sha }} + + - name: Run E2E test suite + uses: convictional/trigger-workflow-and-wait@v1.6.1 + with: + owner: standardnotes + repo: e2e + github_token: ${{ secrets.CI_PAT_TOKEN }} + workflow_file_name: testing-with-stable-client.yml + wait_interval: 30 + client_payload: '{"syncing_server_js_image_tag": "${{ github.sha }}"}' + propagate_failure: true + trigger_workflow: true + wait_workflow: true publish-aws-ecr: needs: test @@ -71,8 +102,6 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build, tag, and push image to Docker Hub run: | - yarn docker build @standardnotes/syncing-server -t standardnotes/syncing-server-js:${{ github.sha }} - docker push standardnotes/syncing-server-js:${{ github.sha }} docker tag standardnotes/syncing-server-js:${{ github.sha }} standardnotes/syncing-server-js:latest docker push standardnotes/syncing-server-js:latest