Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-app-crm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# This workflow contains a single job called "build-ci-crm"
build-ci-crm:
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-app-lob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ on:
- '!projects/app-crm/**'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# This workflow contains a single job called "build-ci-lob"
build-ci-lob:
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This is a basic workflow to help you get started with Actions

name: App Main CI

permissions:
contents: read

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master, vnext ]
paths:
- '**'
- '!projects/**'
pull_request:
branches: [ master, vnext ]
paths:
- '**'
- '!projects/**'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build-ci"
build-ci:
# The type of runner that the job will run on
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x, 22.x]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Npm add registry
run: npm config set @infragistics:registry https://${{secrets.IG_SCOPE}}

- name: Npm config auth
run: npm config set ${{secrets.IG_SCOPE}}:_auth=${{secrets.IG_TOKEN}}

- name: Install dependencies
run: npm install

- name: Run lint
run: npm run lint

- name: 'Generate live editing and build samples'
run: npm run build
env:
NODE_OPTIONS: "--max_old_space_size=4096"
65 changes: 34 additions & 31 deletions .github/workflows/cd-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- master
- vnext
workflow_dispatch:
workflow_dispatch:
inputs:
branch:
description: 'Input a branch name (e.g., vnext)'
Expand All @@ -27,23 +26,23 @@ jobs:
- name: app
custom_command: run generate-live-editing
submodule_dir: angular-demos
base_href: /angular-demos/
base_href: angular-demos
target_folder: dist/app
npm_build_command: run build-ci
repositoryfy: true
repositoryfy_command: repositoryfyAngularDemos
- name: app-crm
custom_command: run generate-live-editing:app-crm
submodule_dir: angular-demos-crm
base_href: /angular-demos-grid-crm/
base_href: angular-demos-grid-crm
target_folder: dist/app-crm
npm_build_command: run build-ci:app-crm --loglevel verbose
repositoryfy: false
repositoryfy_command: ''
- name: app-lob
custom_command: run generate-live-editing:app-lob
submodule_dir: angular-demos-lob
base_href: /angular-demos-lob/
base_href: angular-demos-lob
target_folder: dist/app-lob
npm_build_command: run build-ci:app-lob
repositoryfy: true
Expand All @@ -54,6 +53,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ env.BRANCH_REF }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
Expand All @@ -76,36 +76,41 @@ jobs:
}

- name: Create .npmrc file
run: touch .npmrc
run: |
if [ -f ".npmrc" ]; then
rm .npmrc
fi
touch .npmrc


- name: Configure npm registry
run: |
echo "@infragistics:registry=https://packages.infragistics.com/npm/js-licensed/" >> .npmrc
echo "//packages.infragistics.com/npm/js-licensed/:_authToken=${{ secrets.INFRAGISTICS_NPM_TOKEN }}" >> .npmrc
echo "//packages.infragistics.com/npm/js-licensed/:username=${{ secrets.INFRAGISTICS_NPM_USER }}" >> .npmrc
echo "//packages.infragistics.com/npm/js-licensed/:_auth=${{ secrets.INFRAGISTICS_NPM_TOKEN }}" >> .npmrc
# echo "//packages.infragistics.com/npm/js-licensed/:_authToken=${{ secrets.INFRAGISTICS_NPM_TOKEN }}" >> .npmrc

- name: Install dependencies
run: npm install --legacy-peer-deps
env:
GITHUB_ACTIONS: true
run: npm install

- name: Clone submodule
run: git clone --recurse-submodules https://github.com/IgniteUI/igniteui-live-editing-samples igniteui-live-editing-samples

- name: Checkout branch in submodule (vNext)
if: env.BRANCH_REF == 'refs/heads/vnext'
if: ${{ env.BRANCH_REF == 'refs/heads/vnext' }}
run: |
cd igniteui-live-editing-samples
git checkout vNext

- name: Checkout branch in submodule (master)
if: env.BRANCH_REF == 'refs/heads/master'
if: ${{ env.BRANCH_REF == 'refs/heads/master' }}
run: |
cd igniteui-live-editing-samples
git checkout master

- name: Update package.json with base href
run: |
sed -i 's/--configuration production/--base-href=${{ matrix.base_href }} --configuration production/g' package.json
sed -i 's|--configuration production|--base-href=${{ matrix.base_href }} --configuration production|g' package.json

- name: Generate live-editing
run: npm ${{ matrix.custom_command }}
Expand All @@ -115,9 +120,7 @@ jobs:
npx --userconfig=./.npmrc ng g @igniteui/angular-schematics:upgrade-packages --skip-install

- name: Install dependencies after schematics
run: npm install --legacy-peer-deps
env:
GITHUB_ACTIONS: true
run: npm install

- name: Build application
run: npm ${{ matrix.npm_build_command }} --userconfig=./.npmrc
Expand All @@ -144,35 +147,32 @@ jobs:
- name: Create zip artifact
run: |
cd ${{ matrix.target_folder }}/browser
zip -r ../../${{ matrix.submodule_dir }}-artifact.zip ./
zip -r ${{ github.workspace }}/${{ matrix.base_href }}-artifact.zip ./

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.submodule_dir }}-artifact
path: ${{ matrix.submodule_dir }}-artifact.zip
name: ${{ matrix.base_href }}-artifact
path: ${{ matrix.base_href }}-artifact.zip
retention-days: 1

- name: Repositorify (vNext)
if: env.BRANCH_REF == 'refs/heads/vnext' && matrix.repositoryfy == true
if: ${{ env.BRANCH_REF == 'refs/heads/vnext' && matrix.repositoryfy == true }}
run: npm run ${{ matrix.repositoryfy_command }}

- name: Repositorify (Production)
if: env.BRANCH_REF == 'refs/heads/master' && matrix.repositoryfy == true
if: ${{ env.BRANCH_REF == 'refs/heads/master' && matrix.repositoryfy == true }}
run: npm run ${{ matrix.repositoryfy_command }}:prod

- name: Stage changes
if: matrix.repositoryfy == true
run: |
cd igniteui-live-editing-samples/${{ matrix.submodule_dir }}
git add .

- name: Check for changes
if: matrix.repositoryfy == true
id: check_changes
run: |
cd igniteui-live-editing-samples/${{ matrix.submodule_dir }}
if [ -n "$(git status --porcelain)" ]; then
if [ -n "$(git status --porcelain .)" ]; then
echo "changes_detected=true" >> $GITHUB_OUTPUT
echo "Changed files:"
git status --porcelain .
else
echo "changes_detected=false" >> $GITHUB_OUTPUT
echo "No changes to commit."
Expand All @@ -184,32 +184,35 @@ jobs:
cd igniteui-live-editing-samples/${{ matrix.submodule_dir }}
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Automated repository update"
continue-on-error: true

- name: Push changes
if: matrix.repositoryfy == true && steps.check_changes.outputs.changes_detected == 'true'
run: |
cd igniteui-live-editing-samples/${{ matrix.submodule_dir }}
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/IgniteUI/igniteui-live-editing-samples.git
git push https://x-access-token:${{ secrets.CLASSIC_PAT_GITHUB }}@github.com/IgniteUI/igniteui-live-editing-samples.git
continue-on-error: true

- name: Trigger Deploy Workflow in IgniteUI Actions
uses: actions/github-script@v8
with:
github-token: ${{ secrets.CLASSIC_PATKA }}
github-token: ${{ secrets.CLASSIC_PAT_GITHUB }}
script: |
await github.rest.repos.createDispatchEvent({
owner: 'IgniteUI',
repo: 'igniteui-actions',
event_type: 'igniteui-angular-samples-cd',
client_payload: {
calling_branch: "${{ env.BRANCH_REF }}",
repository: "${{ github.repository }}",
run_id: "${{ github.run_id }}",
artifact_name: "${{ matrix.submodule_dir }}-artifact",
base_href: "${{ matrix.base_href }}",
submodule_dir: "${{ matrix.submodule_dir }}",
ref: "${{ github.ref }}",
sha: "${{ github.sha }}",
branch: '${{ github.ref_name }}',
unit: false,
integration: true
}
});
88 changes: 0 additions & 88 deletions .github/workflows/deploy-trigger.yml

This file was deleted.

6 changes: 1 addition & 5 deletions azure-devops/app-cd.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
trigger:
branches:
include:
- master
- vnext
trigger: none

# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. Ensure that this pipeline is reserved for deployment purposes.
pr: none
Expand Down
6 changes: 1 addition & 5 deletions azure-devops/app-crm-cd.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
trigger:
branches:
include:
- master
- vnext
trigger: none

# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. Ensure that this pipeline is reserved for deployment purposes.
pr: none
Expand Down
6 changes: 1 addition & 5 deletions azure-devops/app-lob-cd.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
trigger:
branches:
include:
- master
- vnext
trigger: none

# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation. Ensure that this pipeline is reserved for deployment purposes.
pr: none
Expand Down
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
trigger: none

pool:
vmImage: 'ubuntu-latest'

Expand Down