This project is a sample project for the Sofware AG IUG 2024 showcasing how easy it is to make a CI/CD workflow and deploying your own application.
To recreate this demo you need to:
- Create a new Angular 16 project:
npx @angular/cli@v16-lts new my-app-name --defaults --style=less --routing
- Add the @c8y/websdk (following the prompts to decide which kind of application to use. Best use the blueprint-package)
cd my-app-name
ng add @c8y/websdk
- Build your solution by running it locally:
ng serve -u http://yourtenant.cumulocity.com
- Create a github workflow file to (this example using github workflows, it should be easy to use align it to anything else). Remember to create
c8y_password
secret adm align username and password.
name: Angular C8Y Deployment
on:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install Dependencies
run: |
npm ci
- name: Deploy to C8Y
env:
C8Y_PASSWORD: ${{ secrets.c8y_password }}
run: |
ng deploy -U jan -P $C8Y_PASSWORD -T t81796392 -u http://jan.latest.stage.c8y.io
- Add the repo to github
git remote add origin git@github.com:{{username}}/iug.git
git branch -M main
git push -u origin main
đź‘€ check your tenant how it is automatically deployed.