Skip to content

Commit

Permalink
fix: test purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Sep 21, 2023
1 parent 1d2f14c commit 0b3e202
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-hotfix-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
name: Create New Hotfix Branch
runs-on: ubuntu-latest

# Only allow these users to create new hotfix branch from 'master'
if: github.ref == 'refs/heads/master' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'utsabc' || github.actor == 'shrouti1507') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'utsabc')
# Only allow these users to create new hotfix branch from 'testci-master'
if: github.ref == 'refs/heads/testci-master' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'utsabc' || github.actor == 'shrouti1507') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'utsabc')
steps:
- name: Create Branch
uses: peterjgrainger/[email protected]
Expand Down
47 changes: 42 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
name: Docker Image CI for shopify-tracker
on:
push:
branches: [ master ]
branches: [ testci-master ]
pull_request:
types:
- closed
branches:
- testci-master

permissions: read-all

Expand All @@ -26,14 +31,46 @@ jobs:
- name: Get image version
id: get-version
run: |
VERSION=$(echo "${{ github.event.pull_request.head.ref }}" | sed 's/^release\///;s/^hotfix-release\///')
echo $VERSION
VERSION=$(jq -r .version package.json)
echo "Version: $VERSION"
echo "::set-output name=version::$VERSION"
- name: Build the Docker image and push
run: |
docker build -f Dockerfile -t rudderstack/rudder-shopify-tracker:${{steps.get-version.outputs.version}} .
- name: Push the image to Dockerhub
run: |
docker push rudderstack/rudder-shopify-tracker:${{steps.get-version.outputs.version}}
docker push rudderstack/rudder-shopify-tracker:${{steps.get-version.outputs.version}}
- name: Clone Devops Repo
run: |
git clone https://${{secrets.PAT}}@github.com/rudderlabs/rudder-devops.git
- name: Extract branch name
id: extract_branch_name
run: |
cd rudder-devops
branch_name=$(git rev-parse --abbrev-ref HEAD)
echo "branch_name=$branch_name"
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
- name: Update Helm Chart and Raise Pull Request For Shopify Tracker
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
SP_IMAGE_REPOSITORY: rudderstack/rudder-shopify-tracker
VERSION: ${{steps.get-version.outputs.version}}
run: |
cd rudder-devops
git checkout -b shopify-tracker-$VERSION ${{steps.extract_branch_name.outputs.branch_name}}
cd helm-charts/helm/shopify-tracking
yq eval -i ".image.tag=\"$VERSION\"" values.yaml
yq eval -i ".image.repository=\"$SP_IMAGE_REPOSITORY\"" values.yaml
git add values.yaml
git commit -m "chore: upgrade shopify tracker to $VERSION"
git push -u origin shopify-tracker-$VERSION
hub pull-request -m "chore: upgrade shopify tracker to $VERSION"
6 changes: 3 additions & 3 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types:
- closed
branches:
- master
- testci-master

jobs:
release:
Expand Down Expand Up @@ -64,8 +64,8 @@ jobs:
- name: Pull Changes Into develop Branch
uses: repo-sync/[email protected]
with:
source_branch: 'master'
destination_branch: 'develop'
source_branch: 'testci-master'
destination_branch: 'testci-develop'
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_title: 'chore(release): pull main into develop post release v${{ steps.extract-version.outputs.release_version }}'
pr_body: ':crown: *An automated PR*'
Expand Down

0 comments on commit 0b3e202

Please sign in to comment.