Skip to content

Commit

Permalink
Add source code
Browse files Browse the repository at this point in the history
  • Loading branch information
ektx07 committed Dec 6, 2022
1 parent b2c500c commit f7246f3
Show file tree
Hide file tree
Showing 3 changed files with 332 additions and 2 deletions.
329 changes: 329 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,329 @@
# Refer to the memo SRDS-383 for details on how to use this template.
variables:
# Specify the code example version. This version is used for tagging the staging repository.
CE_REL_VERSION: 4.0.0

# Specify the code example author's Cypress initials/username. This will be used in CX survey URL generation and to automatically assign regression JIRA tickets.
CE_AUTHOR_NAME: "SMRX"

# Specify the code example author's Infineon username. This will be used in to automatically assign regression JIRA tickets.
CE_AUTHOR_USERNAME: "MShriram"

# Specify the code example author's Infineon email address. This will be used in CX survey URL generation.
CE_AUTHOR_EMAIL: "[email protected]"

# Specify the code example Spec/ECN category - Division. E.g. MCD, MS
CE_SPEC_DIVISION: "MCD"

# Specify the code example Spec/ECN category - Business Unit. E.g. ICW, WIRED, AUTO
CE_SPEC_BIZ_UNIT: "ICW"

# Specify the code example Spec/ECN category - Product Family. E.g. PSOC, WIFI, BTABLE
CE_SPEC_PROD_FAMILY: "PSOC"

# Specify the toolchain, separated by spaces. E.g. GCC_ARM IAR ARM
CE_TOOLCHAIN_LIST: GCC_ARM IAR ARM

# Specify the build configuration, separated by spaces. E.g. Release Debug
CE_CONFIG_LIST: Release Debug

# Specify the additional build parameters, like verbose output. Leave it empty if not needed.
CE_BUILD_PARAM: ""

# Specify the ModusToolbox version using which this CE will be tested by the CI script. When the value is empty, the script will use the latest version of the tool.
MTB_INSTALL_VER: ""

# Specify the Secure Boot policy (.json file name) only if you want to override the default policy.
CE_SECURE_POLICY: ""

### DO NOT EDIT THE SECTIONS BELOW ###

GIT_SUBMODULE_STRATEGY: recursive # Fetch the Git submodules

stages:
- format
- build
- preview
- test
- coverage
- deploy

# Check whether the YML job configurations are matching the template repo
validate-yml-config:
stage: format
tags:
- L2APPS-Regression
only:
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- tags
- schedules
variables:
- $REGRESSION == "true"
allow_failure: true
script:
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/ce_modus_git.sh --check-yml

# Check whether the CE structure is as expected
test-ce-structure:
stage: format
tags:
- L2APPS-Regression
only:
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- tags
- schedules
variables:
- $REGRESSION == "true"
allow_failure: true
script:
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/ce_modus_git.sh --format

# Push the preview/under development version of CE to the staging repository and promote the tags
deploy-ce-preview:
stage: preview
tags:
- devops-assets
only:
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- develop
- tags
- schedules
variables:
- $REGRESSION == "true"
when: manual
script:
# Push the CE to staging repo and update the CE manifest
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/ce_modus_git.sh --stage
- bash ci/ce_modus_git.sh --manifest
# Promote the CE to add release tags (on staging repo)
- bash -c 'rm -rf ci $CI_PROJECT_NAME'
- git clone -b develop https://devops-git.aus.cypress.com/repo-staging/ci.git
- bash -c 'env PROMOTE_ASSET=$CI_PROJECT_NAME STAGING_REVISION=preview-v$CE_REL_VERSION.$CI_PIPELINE_IID ci/job_promote_asset.sh'

# Build the CE with the default configuration/settings
build-ce-default-config:
stage: build
tags:
- L2APPS-Regression
only:
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- tags
- schedules
variables:
- $REGRESSION == "true"
artifacts:
when: always
expire_in: 1 week
paths:
- artifacts_collection.zip
script:
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/ce_modus_git.sh --default-build

# Template job definition for sanity test
.test-ce-sanity:
stage: test
only:
changes:
- "**/*.{c,h,lib,mtb,mk,modus,cycapsense,cyqspi,cyusbdev,cybt,cyseglcd,mtbezpd,mtbml}"
- "**/[Mm]akefile"
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- tags
- schedules
variables:
- $REGRESSION == "true"
script:
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/ce_modus_git.sh --test

# Run code example sanity test on Windows
test-ce-sanity-windows:
extends: .test-ce-sanity
tags:
- L2APPS-Windows
artifacts:
when: always
expire_in: 1 week
paths:
- artifacts_windows.zip

# Run code example sanity test on Linux
test-ce-sanity-linux:
extends: .test-ce-sanity
tags:
- L2APPS-Linux
artifacts:
when: always
expire_in: 1 week
paths:
- artifacts_linux.zip

# Run code example sanity test on macOS
test-ce-sanity-macos:
extends: .test-ce-sanity
tags:
- L2APPS-macOS
artifacts:
when: always
expire_in: 1 week
paths:
- artifacts_macos.zip

# Run Coverity analysis on the code example
analyze-ce-code:
stage: coverage
tags:
- devops-linux
only:
changes:
- "**/*.{c,h,mk,modus,cycapsense,cyqspi,cyusbdev,cybt,cyseglcd,mtbezpd,mtbml}"
- "**/[Mm]akefile"
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- tags
- schedules
variables:
- $REGRESSION == "true"
allow_failure: true
script:
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/package_setup_env.sh --ce-mcu-boot
- bash ci/package_setup_env.sh --ce-secure-boot CY8CKIT-064B0S2-4343W # Change the target as needed
- bash ci/ce_modus_git.sh --analyze

# Build the CE with GitHub assets
build-ce-github-assets:
stage: coverage
tags:
- L2APPS-Regression
only:
changes:
- "**/*.{c,h,lib,mtb,mk,modus,cycapsense,cyqspi,cyusbdev,cybt,cyseglcd,mtbezpd,mtbml}"
- "**/[Mm]akefile"
refs:
- develop
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- tags
- schedules
variables:
- $REGRESSION == "true"
allow_failure: true
variables:
BUILD_WITH_GITHUB_ASSETS: "1"
script:
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/ce_modus_git.sh --build

# Build the CE with minimum version of ModusToolbox
build-ce-mtb-min-version:
stage: coverage
tags:
- devops-linux
only:
changes:
- "**/*.{c,h,lib,mtb,mk,modus,cycapsense,cyqspi,cyusbdev,cybt,cyseglcd,mtbezpd,mtbml}"
- "**/[Mm]akefile"
refs:
- develop
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- tags
- schedules
variables:
- $REGRESSION == "true"
allow_failure: true
script:
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/package_setup_env.sh --ce-mcu-boot
- bash ci/package_setup_env.sh --ce-secure-boot
- bash ci/ce_modus_git.sh --build

# Build the CE with matching targets/BSPs
build-ce-matching-bsps:
stage: coverage
tags:
- L2APPS-Regression
only:
changes:
- "**/*.{c,h,lib,mtb,mk,modus,cycapsense,cyqspi,cyusbdev,cybt,cyseglcd,mtbezpd,mtbml}"
- "**/[Mm]akefile"
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- tags
- schedules
variables:
- $REGRESSION == "true"
allow_failure: true
variables:
BUILD_WITH_NEW_BSP: "1"
script:
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/ce_modus_git.sh --build

# Push the code example to staging repository and promote the tags
promote-ce-staging:
stage: deploy
tags:
- devops-assets
only:
refs:
- develop
variables:
- $CI_PROJECT_NAMESPACE == "wpp/ce/mtb"
except:
refs:
- tags
- schedules
variables:
- $REGRESSION == "true"
script:
# Push the CE to staging repo and update the CE manifest
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/ce_modus_git.sh --stage
- bash ci/ce_modus_git.sh --manifest
# Promote the CE to add release tags (on staging repo)
- bash -c 'rm -rf ci $CI_PROJECT_NAME'
- git clone -b develop https://devops-git.aus.cypress.com/repo-staging/ci.git
- bash -c 'env PROMOTE_ASSET=$CI_PROJECT_NAME STAGING_REVISION=$CE_REL_VERSION.$CI_PIPELINE_IID ci/job_promote_asset.sh'

# Run scheduled regression test on the code example
test-ce-regression:
stage: test
tags:
- L2APPS-Interface
only:
refs:
- develop
- schedules
variables:
- $REGRESSION == "true"
script:
- git clone -b develop https://devops-git.aus.cypress.com/wpp/ce/ci.git
- bash ci/ce_modus_git.sh --regress
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ Document title: *CCE236075* - *mtb-mqtt-client-over-lte*
Version | Description of change
------- | ---------------------
1.0.0 | New community code example
1.0.1 | Minor edit in dependency


<br>
Expand All @@ -573,4 +574,4 @@ Document title: *CCE236075* - *mtb-mqtt-client-over-lte*
<br>
TO THE EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS DOCUMENT OR ANY SOFTWARE OR ACCOMPANYING HARDWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. No computing device can be absolutely secure. Therefore, despite security measures implemented in Cypress hardware or software products, Cypress shall have no liability arising out of any security breach, such as unauthorized access to or use of a Cypress product. CYPRESS DOES NOT REPRESENT, WARRANT, OR GUARANTEE THAT CYPRESS PRODUCTS, OR SYSTEMS CREATED USING CYPRESS PRODUCTS, WILL BE FREE FROM CORRUPTION, ATTACK, VIRUSES, INTERFERENCE, HACKING, DATA LOSS OR THEFT, OR OTHER SECURITY INTRUSION (collectively, "Security Breach"). Cypress disclaims any liability relating to any Security Breach, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from any Security Breach. In addition, the products described in these materials may contain design defects or errors known as errata which may cause the product to deviate from published specifications. To the extent permitted by applicable law, Cypress reserves the right to make changes to this document without further notice. Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document. Any information provided in this document, including any sample design information or programming code, is provided only for reference purposes. It is the responsibility of the user of this document to properly design, program, and test the functionality and safety of any application made of this information and any resulting product. "High-Risk Device" means any device or system whose failure could cause personal injury, death, or property damage. Examples of High-Risk Devices are weapons, nuclear installations, surgical implants, and other medical devices. "Critical Component" means any component of a High-Risk Device whose failure to perform can be reasonably expected to cause, directly or indirectly, the failure of the High-Risk Device, or to affect its safety or effectiveness. Cypress is not liable, in whole or in part, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from any use of a Cypress product as a Critical Component in a High-Risk Device. You shall indemnify and hold Cypress, including its affiliates, and its directors, officers, employees, agents, distributors, and assigns harmless from and against all claims, costs, damages, and expenses, arising out of any claim, including claims for product liability, personal injury or death, or property damage arising from any use of a Cypress product as a Critical Component in a High-Risk Device. Cypress products are not intended or authorized for use as a Critical Component in any High-Risk Device except to the limited extent that (i) Cypress’s published data sheet for the product explicitly states Cypress has qualified the product for use in a specific High-Risk Device, or (ii) Cypress has given you advance written authorization to use the product as a Critical Component in the specific High-Risk Device and you have signed a separate indemnification agreement.
<br>
Cypress, the Cypress logo, and combinations thereof, WICED, ModusToolbox, PSoC, CapSense, EZ-USB, F-RAM, and Traveo are trademarks or registered trademarks of Cypress or a subsidiary of Cypress in the United States or in other countries. For a more complete list of Cypress trademarks, visit Infineon.com. Other names and brands may be claimed as property of their respec
Cypress, the Cypress logo, and combinations thereof, WICED, ModusToolbox, PSoC, CapSense, EZ-USB, F-RAM, and Traveo are trademarks or registered trademarks of Cypress or a subsidiary of Cypress in the United States or in other countries. For a more complete list of Cypress trademarks, visit Infineon.com. Other names and brands may be claimed as property of their respective owners.
2 changes: 1 addition & 1 deletion deps/cy-mbedtls-acceleration.mtb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/Infineon/cy-mbedtls-acceleration#release-v1.4.0#$$ASSET_REPO$$/cy-mbedtls-acceleration/release-v1.4.0
https://github.com/cypresssemiconductorco/cy-mbedtls-acceleration#release-v1.4.0#$$ASSET_REPO$$/cy-mbedtls-acceleration/release-v1.4.0

0 comments on commit f7246f3

Please sign in to comment.