-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated support for CI/CD * fixed url * added remote triggers * added support for wf_patch release * updated conditions * removed artifacts from release * improvement cicd * updated ci/cd
- Loading branch information
Showing
6 changed files
with
328 additions
and
90 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Release to Environment Nucleus | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to Deploy' | ||
required: true | ||
type: choice | ||
options: | ||
- beta | ||
- prod | ||
version: | ||
description: 'Version to be Published' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
env-release: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Docker Login | ||
uses: docker/login-action@v1.13.0 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
logout: true | ||
|
||
- name: Setup Environment | ||
run: | | ||
echo "BOTNAME=Test-at-Scale Nucleus Promoted: Version ${ENVIRONMENT} to ${VERSION}" >> $GITHUB_ENV | ||
if [ ${ENVIRONMENT} == "prod" ] ; then | ||
echo "IMAGE_TAG=latest-base" >> $GITHUB_ENV | ||
else | ||
echo "IMAGE_TAG=${ENVIRONMENT}-base" >> $GITHUB_ENV | ||
fi | ||
env: | ||
ENVIRONMENT: ${{ github.event.inputs.environment }} | ||
VERSION: ${{ github.event.inputs.version }} | ||
|
||
- name: Promote Docker Image | ||
run: | | ||
docker pull lambdatest/nucleus:${VERSION}-base | ||
docker tag lambdatest/nucleus:${VERSION}-base lambdatest/nucleus:${{ env.IMAGE_TAG }} | ||
docker push lambdatest/nucleus:${{ env.IMAGE_TAG }} | ||
env: | ||
VERSION: ${{ github.event.inputs.version }} | ||
|
||
- if: startsWith(matrix.label, 'release:') | ||
name: Build Cloud Runners | ||
run: | | ||
gh workflow run -R ${{ secrets.WF_REPO }} ${{ secrets.WF_NAME }} -r main -f environment=${ENVIRONMENT} -f version=${{ steps.tag_version.outputs.new_tag }} | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GH_API_TOKEN}} | ||
ENVIRONMENT: ${{ github.event.inputs.environment }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Release to Environment Synapse | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to Deploy' | ||
required: true | ||
type: choice | ||
options: | ||
- beta | ||
- prod | ||
version: | ||
description: 'Version to be Published' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
env-release: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Docker Login | ||
uses: docker/login-action@v1.13.0 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
logout: true | ||
|
||
- name: Setup Environment | ||
run: | | ||
echo "BOTNAME=Test-at-Scale Synapse Promoted: Version ${ENVIRONMENT} to ${VERSION}" >> $GITHUB_ENV | ||
if [ ${ENVIRONMENT} == "prod" ] ; then | ||
echo "IMAGE_TAG=latest" >> $GITHUB_ENV | ||
else | ||
echo "IMAGE_TAG=${ENVIRONMENT}" >> $GITHUB_ENV | ||
fi | ||
env: | ||
ENVIRONMENT: ${{ github.event.inputs.environment }} | ||
VERSION: ${{ github.event.inputs.version }} | ||
|
||
- name: Promote Docker Image | ||
run: | | ||
docker pull lambdatest/synapse:${VERSION} | ||
docker tag lambdatest/synapse:${VERSION} lambdatest/synapse:${{ env.IMAGE_TAG }} | ||
docker push lambdatest/synapse:${{ env.IMAGE_TAG }} | ||
env: | ||
ENVIRONMENT: ${{ github.event.inputs.environment }} | ||
VERSION: ${{ github.event.inputs.version }} |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# This workflow will release a new patch version of nucleus and synapse | ||
name: Release Patch Version | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
Release: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Retrieving Release Type | ||
run: | | ||
echo "RELEASE_TYPE=patch" >> $GITHUB_ENV | ||
echo "Releasing: ${release_type}" | ||
- name: Inject slug/short variables | ||
uses: rlespinasse/github-slug-action@v3.x | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.4.0 | ||
|
||
- name: Bump version and push tag | ||
id: tag_version | ||
uses: mathieudutour/github-tag-action@v6.0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
default_bump: ${{ env.RELEASE_TYPE }} | ||
|
||
- if: startsWith(matrix.label, 'release:') | ||
name: Build Cloud Runners | ||
run: | | ||
gh workflow run -R ${{ secrets.WF_REPO }} ${{ secrets.WF_NAME }} -r main -f environment=dev -f version=${{ steps.tag_version.outputs.new_tag }} | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GH_API_TOKEN}} | ||
|
||
- name: Setup Environment | ||
run: | | ||
echo "BOTNAME=Test-at-Scale Deployment Status: Version ${{ steps.tag_version.outputs.new_tag }} to dev" >> $GITHUB_ENV | ||
- name: Setup Docker Image Tags | ||
run: | | ||
echo "NUCLEUS_TAGS=lambdatest/nucleus:dev-base","lambdatest/nucleus:${{ steps.tag_version.outputs.new_tag }}-base" >> $GITHUB_ENV | ||
echo "SYNAPSE_TAGS=lambdatest/synapse:dev","lambdatest/synapse:${{ steps.tag_version.outputs.new_tag }}" >> $GITHUB_ENV | ||
- name: Docker Login | ||
uses: docker/login-action@v1.13.0 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
logout: true | ||
|
||
- name: Build and push Nucleus images | ||
uses: docker/build-push-action@v2.9.0 | ||
with: | ||
context: . | ||
tags: ${{ env.NUCLEUS_TAGS }} | ||
file: build/nucleus/Dockerfile | ||
push: true | ||
|
||
- name: Build and push Synapse images | ||
uses: docker/build-push-action@v2.9.0 | ||
with: | ||
context: . | ||
tags: ${{ env.SYNAPSE_TAGS }} | ||
file: build/synapse/Dockerfile | ||
push: true |
Oops, something went wrong.