Skip to content

Commit

Permalink
chore(release): pull release/v1.20.0 into main (#2014)
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs authored Mar 28, 2023
2 parents a7ebcaa + 1d3dc5f commit 2e661a3
Show file tree
Hide file tree
Showing 74 changed files with 7,533 additions and 7,920 deletions.
18 changes: 9 additions & 9 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
node_modules
npm-debug.log
Dockerfile
.dockerignore
.git
.gitignore
docker-compose.yml
buildspec.yml
appspec.yml
*
!src
!features.json
!Makefile
!jest*.js
!benchmark
!package*.json
# to be removed later
!test
83 changes: 58 additions & 25 deletions .github/workflows/build-pr-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,47 @@ jobs:
env:
TAG_NAME: ${{ needs.generate-tag-name.outputs.tag_name }}

# Skip for the release pull requests
if: startsWith(github.event.pull_request.head.ref, 'release/') != true && startsWith(github.event.pull_request.head.ref, 'hotfix-release/') != true
# Skip for the release pull requests as staging artifacts will be generated
# Skip main to develop sync pull requests
if: startsWith(github.event.pull_request.head.ref, 'release/') != true && startsWith(github.event.pull_request.head.ref, 'hotfix-release/') != true && github.event.pull_request.head.ref != 'main'
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 1

- name: Setup Docker Buildx
uses: docker/[email protected]

- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Build Docker Image
- name: Cache Docker Layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker Image for Tests
uses: docker/[email protected]
with:
context: .
file: Dockerfile
load: true
tags: |
${{ env.REPO_NAME }}:${{ env.TAG_NAME }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Run Tests
run: |
docker run ${{ env.REPO_NAME }}:${{ env.TAG_NAME }} npm run test:ci
- name: Setup Docker Buildx
uses: docker/[email protected]
with:
platforms: |
linux/amd64
linux/arm64
- name: Build and Push Multi-platform Images
uses: docker/[email protected]
with:
Expand All @@ -79,50 +86,66 @@ jobs:
linux/amd64
linux/arm64
build-args: |
VERSION=${{ env.TAG_NAME }}
COMMIT_HASH=${{ github.sha }}
version=${{ env.TAG_NAME }}
GIT_COMMIT_SHA=${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move Cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-user-transformer-image:
name: Build User Transformer Docker Image - PR
runs-on: ubuntu-latest
needs: [generate-tag-name]
env:
TAG_NAME: ${{ needs.generate-tag-name.outputs.tag_name }}

# Skip for the release pull requests
if: startsWith(github.event.pull_request.head.ref, 'release/') != true && startsWith(github.event.pull_request.head.ref, 'hotfix-release/') != true
# Skip for the release pull requests as staging artifacts will be generated
if: startsWith(github.event.pull_request.head.ref, 'release/') != true && startsWith(github.event.pull_request.head.ref, 'hotfix-release/') != true && github.event.pull_request.head.ref != 'main'
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 1

- name: Setup Docker Buildx
uses: docker/[email protected]

- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Build Docker Image
- name: Cache Docker Layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker Image for Tests
uses: docker/[email protected]
with:
context: .
file: Dockerfile-ut-func
load: true
tags: |
${{ env.REPO_NAME }}:${{ env.TAG_NAME }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Run Tests
run: |
docker run ${{ env.REPO_NAME }}:${{ env.TAG_NAME }} npm run test:ci
- name: Setup Docker Buildx
uses: docker/[email protected]
with:
platforms: |
linux/amd64
linux/arm64
- name: Build and Push Multi-platform Images
uses: docker/[email protected]
with:
Expand All @@ -136,5 +159,15 @@ jobs:
linux/amd64
linux/arm64
build-args: |
VERSION=${{ env.TAG_NAME }}
COMMIT_HASH=${{ github.sha }}
version=${{ env.TAG_NAME }}
GIT_COMMIT_SHA=${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move Cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
2 changes: 1 addition & 1 deletion .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
new_version=$(jq -r .version package.json)
git reset --hard
branch_name="${release_type}/${new_version}"
branch_name="${release_type}/v${new_version}"
echo "Source branch for new release is $source_branch_name"
echo "Current version is $current_version"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/prepare-for-dev-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ jobs:
linux/amd64
linux/arm64
build-args: |
VERSION=${{ steps.gen_tag_name.outputs.tag_name }}
COMMIT_HASH=${{ github.sha }}
version=${{ steps.gen_tag_name.outputs.tag_name }}
GIT_COMMIT_SHA=${{ github.sha }}
build-user-transformer-image:
name: Build User Transformer Docker Image - Dev
Expand Down Expand Up @@ -139,6 +139,6 @@ jobs:
linux/amd64
linux/arm64
build-args: |
VERSION=${{ steps.gen_tag_name.outputs.tag_name }}
COMMIT_HASH=${{ github.sha }}
version=${{ steps.gen_tag_name.outputs.tag_name }}
GIT_COMMIT_SHA=${{ github.sha }}
70 changes: 52 additions & 18 deletions .github/workflows/prepare-for-prod-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,23 @@ jobs:
echo $tag_name
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT
- name: Setup Docker Buildx
uses: docker/[email protected]

- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Cache Docker Layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker Image
uses: docker/[email protected]
with:
Expand All @@ -54,18 +65,13 @@ jobs:
load: true
tags: |
${{ env.REPO_NAME }}:${{ steps.gen_tag_name.outputs.tag_name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Run Tests
run: |
docker run ${{ env.REPO_NAME }}:${{ steps.gen_tag_name.outputs.tag_name }} npm run test:ci
- name: Setup Docker Buildx
uses: docker/[email protected]
with:
platforms: |
linux/amd64
linux/arm64
- name: Build and Push Multi-platform Images
uses: docker/[email protected]
with:
Expand All @@ -81,8 +87,18 @@ jobs:
linux/amd64
linux/arm64
build-args: |
VERSION=${{ steps.gen_tag_name.outputs.tag_name }}
COMMIT_HASH=${{ github.sha }}
version=${{ steps.gen_tag_name.outputs.tag_name }}
GIT_COMMIT_SHA=${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move Cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-user-transformer-image:
name: Build User Transformer Docker Image - Prod
Expand All @@ -104,12 +120,23 @@ jobs:
echo $tag_name
echo "tag_name=$tag_name" >> $GITHUB_OUTPUT
- name: Setup Docker Buildx
uses: docker/[email protected]

- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PROD_TOKEN }}

- name: Cache Docker Layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker Image
uses: docker/[email protected]
with:
Expand All @@ -118,18 +145,13 @@ jobs:
load: true
tags: |
${{ env.REPO_NAME }}:${{ steps.gen_tag_name.outputs.tag_name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

- name: Run Tests
run: |
docker run ${{ env.REPO_NAME }}:${{ steps.gen_tag_name.outputs.tag_name }} npm run test:ci
- name: Setup Docker Buildx
uses: docker/[email protected]
with:
platforms: |
linux/amd64
linux/arm64
- name: Build and Push Multi-platform Images
uses: docker/[email protected]
with:
Expand All @@ -145,8 +167,18 @@ jobs:
linux/amd64
linux/arm64
build-args: |
VERSION=${{ steps.gen_tag_name.outputs.tag_name }}
COMMIT_HASH=${{ github.sha }}
version=${{ steps.gen_tag_name.outputs.tag_name }}
GIT_COMMIT_SHA=${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move Cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
create-pull-request:
name: Update Helm Charts For Production and Create Pull Request
Expand Down Expand Up @@ -174,6 +206,8 @@ jobs:
echo "User Transformer: $UT_TAG_NAME"
- name: Update Helm Charts and Raise Pull Request
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
git clone https://${{secrets.PAT}}@github.com/rudderlabs/rudder-devops.git
cd rudder-devops
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/prepare-for-prod-rollback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
git config --global user.email "[email protected]"
- name: Update Helm Charts and Raise Pull Request
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: |
git clone https://${{secrets.PAT}}@github.com/rudderlabs/rudder-devops.git
cd rudder-devops
Expand All @@ -43,8 +45,8 @@ jobs:
git add values.enterprise.yaml
yq eval -i ".rudder-transformer.image.tag=\"${{ steps.target-version.outputs.tag_name }}\"" values.multi-tenant.yaml
yq eval -i ".user-transformer.image.tag=\"${{ steps.target-version.outputs.tag_name }}\"" values.enterprise.yaml
git add values.enterprise.yaml
yq eval -i ".user-transformer.image.tag=\"${{ steps.target-version.outputs.tag_name }}\"" values.multi-tenant.yaml
git add values.multi-tenant.yaml
cd ../../config-be-rudder-transformer
yq eval -i ".config-be-rudder-transformer.image.tag=\"${{ steps.target-version.outputs.tag_name }}\"" values.prod.yaml
Expand Down
Loading

0 comments on commit 2e661a3

Please sign in to comment.