-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #217 from katalon-studio/quidl-patch-1
Update publish_agent.yml
- Loading branch information
Showing
1 changed file
with
70 additions
and
70 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 |
---|---|---|
|
@@ -216,74 +216,74 @@ jobs: | |
run: npm run release | ||
|
||
### DEPLOY ### | ||
# deploy: | ||
# name: Deploy cloud agent | ||
# environment: ${{ needs.set_env.outputs.ENV }} | ||
# env: | ||
# AGENT_VERSION: ${{ inputs.agent_version }} | ||
# needs: [set_env, build] | ||
|
||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v4 | ||
|
||
# - name: Setup Node.js ${{ matrix.node-version }} | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
|
||
# - name: Install packages | ||
# run: npm install --only dev | ||
|
||
# - name: Configure AWS credentials | ||
# uses: aws-actions/configure-aws-credentials@v4 | ||
# with: | ||
# role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/katalon-github-oidc-federation | ||
# role-session-name: github-actions | ||
# aws-region: ${{ vars.AWS_REGION }} | ||
# mask-aws-account-id: 'no' | ||
|
||
# - name: Download artifacts | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# path: . | ||
|
||
# - name: Add execute permission to downloaded artifacts | ||
# run: chmod +x katalon-agent-linux-*/* katalon-agent-macos-*/* | ||
|
||
|
||
# - name: Deploy to s3 prod | ||
# if: ${{ needs.set_env.outputs.ENV == 'prod' }} | ||
# run: | | ||
# ls -laR | ||
# aws s3 cp katalon-agent-linux-x64-*/cli-linux-x64 s3://${{ secrets.AWS_S3_BUCKET }}/katalon-agent/$AGENT_VERSION/cli-linux-x64 | ||
|
||
# commit: | ||
# runs-on: ubuntu-latest | ||
# needs: [set_env, build, deploy, release] | ||
# name: Commit Code | ||
# env: | ||
# AGENT_VERSION: ${{ inputs.agent_version }} | ||
# environment: ${{ needs.set_env.outputs.ENV }} | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# with: | ||
# token: ${{ secrets.GH_TOKEN }} | ||
|
||
# - name: Set BUILD_VERSION environment variable | ||
# run: echo "BUILD_VERSION=$(node -p "require('./package').version")" >> $GITHUB_ENV | ||
|
||
# - name: Change Package.json version for release | ||
# run: sed -i "s/$BUILD_VERSION/$AGENT_VERSION/g" package.json | ||
deploy: | ||
name: Deploy cloud agent | ||
environment: ${{ needs.set_env.outputs.ENV }} | ||
env: | ||
AGENT_VERSION: ${{ inputs.agent_version }} | ||
needs: [set_env, build] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install packages | ||
run: npm install --only dev | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/katalon-github-oidc-federation | ||
role-session-name: github-actions | ||
aws-region: ${{ vars.AWS_REGION }} | ||
mask-aws-account-id: 'no' | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: . | ||
|
||
- name: Add execute permission to downloaded artifacts | ||
run: chmod +x katalon-agent-linux-*/* katalon-agent-macos-*/* | ||
|
||
|
||
- name: Deploy to s3 prod | ||
if: ${{ needs.set_env.outputs.ENV == 'prod' }} | ||
run: | | ||
ls -laR | ||
aws s3 cp katalon-agent-linux-x64-*/cli-linux-x64 s3://${{ secrets.AWS_S3_BUCKET }}/katalon-agent/$AGENT_VERSION/cli-linux-x64 | ||
commit: | ||
runs-on: ubuntu-latest | ||
needs: [set_env, build, deploy, release] | ||
name: Commit Code | ||
env: | ||
AGENT_VERSION: ${{ inputs.agent_version }} | ||
environment: ${{ needs.set_env.outputs.ENV }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Set BUILD_VERSION environment variable | ||
run: echo "BUILD_VERSION=$(node -p "require('./package').version")" >> $GITHUB_ENV | ||
|
||
- name: Change Package.json version for release | ||
run: sed -i "s/$BUILD_VERSION/$AGENT_VERSION/g" package.json | ||
|
||
# ### Commit code | ||
# - name: Deploy to GitOps | ||
# uses: stefanzweifel/git-auto-commit-action@v5 | ||
# with: | ||
# commit_message: Update version to ${{ env.AGENT_VERSION }} | ||
# # Optional commit user and author settings | ||
# commit_user_name: github-cloudops-bot # defaults to "github-actions[bot]" | ||
# commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com" | ||
# commit_author: Author <[email protected]> # defaults to author of the commit that triggered the run | ||
### Commit code | ||
- name: Deploy to GitOps | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Update version to ${{ env.AGENT_VERSION }} | ||
# Optional commit user and author settings | ||
commit_user_name: github-cloudops-bot # defaults to "github-actions[bot]" | ||
commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com" | ||
commit_author: Author <[email protected]> # defaults to author of the commit that triggered the run |