├── ch10 ├── apps │ ├── frontend │ │ ├── src │ │ │ ├── assets │ │ │ │ ├── .gitkeep │ │ │ │ └── config │ │ │ │ │ ├── app.config.template.json │ │ │ │ │ └── app.config.json │ │ │ ├── app │ │ │ │ ├── checkout │ │ │ │ │ └── checkout.component.css │ │ │ │ ├── cart-indicator │ │ │ │ │ └── cart-indicator.component.css │ │ │ │ ├── order-response.ts │ │ │ │ ├── cart.ts │ │ │ │ ├── product.ts │ │ │ │ ├── app-config.ts │ │ │ │ ├── cart-item.ts │ │ │ │ ├── cart │ │ │ │ │ └── cart.component.css │ │ │ │ ├── order-request.ts │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.css │ │ │ │ ├── app.module.ts │ │ │ │ ├── product │ │ │ │ │ └── product.component.css │ │ │ │ ├── app-routing.module.ts │ │ │ │ ├── home │ │ │ │ │ └── home.component.css │ │ │ │ ├── config.service.ts │ │ │ │ └── product.service.ts │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ ├── styles.css │ │ │ └── main.ts │ │ ├── .vscode │ │ │ ├── extensions.json │ │ │ ├── launch.json │ │ │ └── tasks.json │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ ├── .editorconfig │ │ ├── Dockerfile │ │ ├── .gitignore │ │ ├── tsconfig.json │ │ ├── README.md │ │ └── package.json │ ├── catalog │ │ ├── requirements.txt │ │ └── Dockerfile │ ├── checkout │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── checkout.csproj │ │ ├── Dockerfile │ │ └── Properties │ │ │ └── launchSettings.json │ └── cart │ │ ├── Dockerfile │ │ ├── .dockerignore │ │ ├── models.js │ │ └── package.json └── iac │ ├── aws │ └── cart │ │ ├── private-registry-access.json │ │ ├── ecr-policy-template.json │ │ ├── deployment-template.json │ │ └── template.json │ └── helm-charts │ └── catalog │ ├── .kube-linter.yml │ ├── Chart.yaml │ ├── templates │ ├── service.yaml │ └── hpa.yaml │ ├── .helmignore │ └── values.yaml ├── ch11 └── hello_world │ ├── linux │ ├── .gitignore │ ├── main.cc │ ├── flutter │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ └── my_application.h │ ├── ios │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ ├── AppDelegate.swift │ │ └── ExportOptions.plist │ ├── Runner.xcodeproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── RunnerTests │ │ └── RunnerTests.swift │ └── .gitignore │ ├── macos │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ ├── Flutter-Release.xcconfig │ │ └── GeneratedPluginRegistrant.swift │ ├── Runner │ │ ├── Configs │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ ├── Warnings.xcconfig │ │ │ └── AppInfo.xcconfig │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_64.png │ │ │ │ ├── app_icon_1024.png │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_256.png │ │ │ │ └── app_icon_512.png │ │ ├── AppDelegate.swift │ │ ├── Release.entitlements │ │ ├── DebugProfile.entitlements │ │ ├── MainFlutterWindow.swift │ │ └── Info.plist │ ├── .gitignore │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner.xcodeproj │ │ └── project.xcworkspace │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── RunnerTests │ │ └── RunnerTests.swift │ ├── android │ ├── gradle.properties │ ├── app │ │ └── src │ │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ └── kotlin │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── hello_world │ │ │ │ └── MainActivity.kt │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── settings.gradle │ ├── build.gradle │ └── google-services.json │ ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ └── manifest.json │ ├── windows │ ├── runner │ │ ├── resources │ │ │ └── app_icon.ico │ │ ├── resource.h │ │ ├── utils.h │ │ ├── runner.exe.manifest │ │ └── flutter_window.h │ ├── flutter │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ └── .gitignore │ ├── README.md │ ├── .gitignore │ └── test │ └── widget_test.dart ├── .vs ├── ProjectSettings.json ├── Implementing-CI-CD-Using-Azure-Pipelines │ ├── FileContentIndex │ │ ├── read.lock │ │ └── aa85fc19-f9a9-4ca3-beed-67ddecd5e617.vsidx │ └── v17 │ │ ├── TestStore │ │ └── 0 │ │ │ ├── 000.testlog │ │ │ └── testlog.manifest │ │ └── .wsuo ├── VSWorkspaceState.json └── slnx.sqlite ├── ch07 ├── CalculusService.Tests │ ├── Usings.cs │ ├── AdditionsTests.cs │ └── CalculusService.Tests.csproj ├── CalculusService │ ├── Additions.cs │ └── CalculusService.csproj ├── README.md └── azure-pipelines.yml ├── ch06 ├── PartsUnlimitedWebsite │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── Orders │ │ │ ├── Index.cshtml │ │ │ └── Details.cshtml │ │ ├── Shared │ │ │ ├── _Recommendations.cshtml │ │ │ ├── _CategoryMenu.cshtml │ │ │ ├── Error.cshtml │ │ │ ├── _CartSummary.cshtml │ │ │ ├── Lockout.cshtml │ │ │ ├── _Announcement.cshtml │ │ │ ├── DemoLinkDisplay.cshtml │ │ │ ├── _AdminMenu.cshtml │ │ │ └── _OrderCostSummary.cshtml │ │ ├── Search │ │ │ └── Index.cshtml │ │ ├── Store │ │ │ └── Browse.cshtml │ │ ├── Account │ │ │ ├── ExternalLoginFailure.cshtml │ │ │ ├── ConfirmEmail.cshtml │ │ │ ├── ResetPasswordConfirmation.cshtml │ │ │ ├── ForgotPasswordConfirmation.cshtml │ │ │ ├── RegisterConfirmation.cshtml │ │ │ ├── _ExternalLoginsListPartial.cshtml │ │ │ └── SendCode.cshtml │ │ ├── Home │ │ │ └── Recomendations.cshtml │ │ └── Checkout │ │ │ └── Complete.cshtml │ ├── Areas │ │ └── Admin │ │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ ├── Orders │ │ │ │ ├── Index.cshtml │ │ │ │ └── Details.cshtml │ │ │ ├── StoreManager │ │ │ │ └── RemoveProduct.cshtml │ │ │ └── Customer │ │ │ │ ├── Index.cshtml │ │ │ │ └── Find.cshtml │ │ │ ├── Controllers │ │ │ ├── AdminController.cs │ │ │ └── RaincheckController.cs │ │ │ ├── AdminConstants.cs │ │ │ └── AdminAreaRegistration.cs │ ├── Global.asax │ ├── favicon.ico │ ├── Models │ │ ├── Store.cs │ │ ├── ApplicationUser.cs │ │ ├── Manufacturer.cs │ │ ├── ILineItem.cs │ │ ├── OrderCostSummary.cs │ │ ├── CommunityPost.cs │ │ ├── Category.cs │ │ ├── OrderDetail.cs │ │ ├── Raincheck.cs │ │ ├── CartItem.cs │ │ ├── IPartsUnlimitedContext.cs │ │ └── project.json │ ├── Scripts │ │ ├── UI-Initialization.js │ │ ├── Recommendations.js │ │ ├── NewStoreArrivals.js │ │ └── AppInsights.js │ ├── Images │ │ ├── admin_icon.png │ │ ├── cart_icon.png │ │ ├── home_icon.png │ │ ├── cart_mo_icon.png │ │ ├── community_1.png │ │ ├── community_2.png │ │ ├── community_3.png │ │ ├── community_4.png │ │ ├── hero_image1.jpg │ │ ├── hero_image2.jpg │ │ ├── hero_image3.jpg │ │ ├── home_mo_icon.png │ │ ├── profile_icon.png │ │ ├── remove_icon.png │ │ ├── search_icon.png │ │ ├── admin_mo_icon.png │ │ ├── deploy_button.png │ │ ├── facebook_icon.jpg │ │ ├── login_safe_icon.png │ │ ├── profile_mo_icon.png │ │ ├── search_mo_icon.png │ │ ├── shopnow_button.png │ │ ├── submenu_image1.jpg │ │ ├── submenu_image2.jpg │ │ ├── submenu_image3.jpg │ │ ├── submenu_image4.jpg │ │ ├── unlimited_logo.png │ │ ├── product_wheel_rim.jpg │ │ ├── login_profile_icon.png │ │ ├── mobile_search_icon.png │ │ ├── product_brakes_disc.jpg │ │ ├── product_oil_filters.jpg │ │ ├── social_placeholder.png │ │ ├── product_wheel_rim-blue.jpg │ │ ├── product_wheel_rim-red.jpg │ │ ├── product_oil_premium-oil.jpg │ │ ├── product_lighting_headlight.jpg │ │ ├── product_lighting_lightbulb.jpg │ │ ├── product_batteries_jumper-leads.jpg │ │ ├── product_brakes_disk-pad-combo.jpg │ │ ├── product_oil_oil-filter-combo.jpg │ │ ├── product_wheel_tyre-wheel-combo.jpg │ │ ├── product_batteries_basic-battery.jpg │ │ ├── product_brakes_disc-calipers-red.jpg │ │ ├── product_batteries_premium-battery.jpg │ │ ├── product_lighting_bugeye-headlight.jpg │ │ ├── product_wheel_tyre-rim-chrome-combo.jpg │ │ └── product_wheel_tyre-wheel-combo-pack.jpg │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── Utils │ │ ├── IHttpClient.cs │ │ ├── IShippingTaxCalculator.cs │ │ ├── IRaincheckQuery.cs │ │ ├── IOrdersQuery.cs │ │ ├── ITelemetryProvider.cs │ │ ├── HttpClientWrapper.cs │ │ ├── EmptyTelemetryProvider.cs │ │ ├── PartsUnlimitedTelemetryInitializer.cs │ │ ├── HtmlHelperExtensions.cs │ │ └── SignalRDependencyResolver.cs │ ├── Content │ │ ├── themes │ │ │ └── base │ │ │ │ ├── images │ │ │ │ ├── ui-icons_222222_256x240.png │ │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ │ ├── ui-icons_444444_256x240.png │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ ├── ui-icons_555555_256x240.png │ │ │ │ ├── ui-icons_777620_256x240.png │ │ │ │ ├── ui-icons_777777_256x240.png │ │ │ │ ├── ui-icons_888888_256x240.png │ │ │ │ ├── ui-icons_cc0000_256x240.png │ │ │ │ ├── ui-icons_cd0a0a_256x240.png │ │ │ │ ├── ui-icons_ffffff_256x240.png │ │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ │ ├── sortable.css │ │ │ │ ├── draggable.css │ │ │ │ ├── all.css │ │ │ │ ├── autocomplete.css │ │ │ │ ├── selectable.css │ │ │ │ ├── tooltip.css │ │ │ │ ├── base.css │ │ │ │ └── accordion.css │ │ ├── _Settings.scss │ │ ├── Store.css.map │ │ ├── Account.css.map │ │ ├── ShoppingCart.css.map │ │ └── Store.min.css │ ├── Security │ │ ├── ILoginProviderCredentials.cs │ │ ├── ILoginProviders.cs │ │ ├── ConfigurationLoginProviderCredentials.cs │ │ └── ConfigurationLoginProviders.cs │ ├── ViewModels │ │ ├── AlbumData.cs │ │ ├── ProductViewModel.cs │ │ ├── OrderDetailsViewModel.cs │ │ ├── EditProductViewModel.cs │ │ ├── HomeViewModel.cs │ │ ├── ShoppingCartViewModel.cs │ │ ├── ShoppingCartRemoveViewModel.cs │ │ └── OrdersModel.cs │ ├── Hubs │ │ └── AnnouncementHub.cs │ ├── ProductSearch │ │ └── IProductSearch.cs │ ├── Recommendations │ │ ├── IRecommendationEngine.cs │ │ └── NaiveRecommendationEngine.cs │ ├── App_Start │ │ ├── FilterConfig.cs │ │ ├── IdentityConfig.cs │ │ ├── RouteConfig.cs │ │ ├── UnityConfig.cs │ │ └── WebApiConfig.cs │ ├── Controllers │ │ └── SearchController.cs │ ├── Startup.cs │ ├── Bootstrapper.cs │ ├── Unity.Mvc4.README.txt │ ├── Global.asax.cs │ └── api │ │ └── RaincheckController.cs ├── Environments │ ├── DSC │ │ ├── SqlSrvDscConfig.zip │ │ ├── WebSrvDscConfig.zip │ │ └── SqlSrvDscConfig.ps1 │ ├── nestedtemplates │ │ ├── WebSrv.parameters.json │ │ ├── vNet.parameters.json │ │ ├── SqlSrv.parameters.json │ │ ├── VsDevWorkstation.parameters.json │ │ └── vNet.json │ ├── WorkshopEnv.parameters.json │ └── CustomScripts │ │ └── InstallWebServerModules.ps1 ├── PartsUnlimitedDatabase │ └── Pre-Deployment │ │ └── 01_Create_Database.sql ├── README.md └── azure-pipelines-with-sonarqube.yml ├── ch08 ├── terraform │ ├── outputs.tf │ ├── main.tf │ ├── variables.tf │ ├── providers.tf │ ├── azure-pipelines-validate.yml │ └── azure-pipelines-deploy.yml ├── azure │ ├── README.md │ ├── azure-pipelines-deploy.yml │ └── azure-pipelines-validate.yml └── aws │ ├── azure-pipelines-validate.yml │ ├── azure-pipelines-deploy.yml │ └── template.json ├── .gitignore ├── ch09 ├── aws │ ├── private-registry-access.json │ ├── ecr-policy-template.json │ ├── deployment-template.json │ └── template.json └── azure │ ├── .kube-linter.yml │ ├── Chart.yaml │ ├── .helmignore │ └── values.yaml ├── README.md ├── docker-compose.debug.yml ├── .dockerignore ├── .vscode └── settings.json ├── azure-pipeline-for-github.yml ├── ch01 └── azure-pipelines.yaml └── LICENSE /ch10/apps/frontend/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/checkout/checkout.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ch11/hello_world/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /.vs/ProjectSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "CurrentProjectSetting": null 3 | } -------------------------------------------------------------------------------- /ch07/CalculusService.Tests/Usings.cs: -------------------------------------------------------------------------------- 1 | global using NUnit.Framework; -------------------------------------------------------------------------------- /.vs/Implementing-CI-CD-Using-Azure-Pipelines/FileContentIndex/read.lock: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /.vs/Implementing-CI-CD-Using-Azure-Pipelines/v17/TestStore/0/000.testlog: -------------------------------------------------------------------------------- 1 | !!tItseT -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /ch08/terraform/outputs.tf: -------------------------------------------------------------------------------- 1 | output "resource_group_name" { 2 | value = azurerm_resource_group.rg.name 3 | } -------------------------------------------------------------------------------- /ch11/hello_world/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Terraform 2 | .terraform* 3 | *.tfplan* 4 | *.tfstate* 5 | *b64 6 | *.jks 7 | *GoogleService*.plist -------------------------------------------------------------------------------- /ch09/aws/private-registry-access.json: -------------------------------------------------------------------------------- 1 | { 2 | "ecrImagePullerRole": { 3 | "isActive": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/cart-indicator/cart-indicator.component.css: -------------------------------------------------------------------------------- 1 | .value { 2 | font-weight: bold; 3 | } -------------------------------------------------------------------------------- /.vs/VSWorkspaceState.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExpandedNodes": [ 3 | "" 4 | ], 5 | "PreviewInSolutionExplorer": false 6 | } -------------------------------------------------------------------------------- /.vs/slnx.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/.vs/slnx.sqlite -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Implementing-CI-CD-Using-Azure-Pipelines 2 | Implementing CI/CD Using Azure Pipelines, published by Packt 3 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /ch10/iac/aws/cart/private-registry-access.json: -------------------------------------------------------------------------------- 1 | { 2 | "ecrImagePullerRole": { 3 | "isActive": true 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /ch09/azure/.kube-linter.yml: -------------------------------------------------------------------------------- 1 | checks: 2 | exclude: 3 | - "latest-tag" 4 | - "no-read-only-root-fs" 5 | - "run-as-non-root" 6 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/order-response.ts: -------------------------------------------------------------------------------- 1 | export interface OrderResponse { 2 | orderId: string; 3 | message: string; 4 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="PartsUnlimited.Global" Language="C#" %> 2 | -------------------------------------------------------------------------------- /ch11/hello_world/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /ch10/iac/helm-charts/catalog/.kube-linter.yml: -------------------------------------------------------------------------------- 1 | checks: 2 | exclude: 3 | - "latest-tag" 4 | - "no-read-only-root-fs" 5 | - "run-as-non-root" 6 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /ch11/hello_world/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/web/favicon.png -------------------------------------------------------------------------------- /ch10/apps/catalog/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch10/apps/catalog/requirements.txt -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/cart.ts: -------------------------------------------------------------------------------- 1 | import { CartItem } from './cart-item'; 2 | 3 | export interface Cart { 4 | id: string; 5 | items: CartItem[]; 6 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/product.ts: -------------------------------------------------------------------------------- 1 | export interface Product { 2 | sku: string; 3 | name: string; 4 | price: number; 5 | quantity: number; 6 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch10/apps/frontend/src/favicon.ico -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/favicon.ico -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/app-config.ts: -------------------------------------------------------------------------------- 1 | export interface AppConfig { 2 | catalogApiUrl?: string; 3 | cartApiUrl?: string; 4 | checkoutApiUrl?: string; 5 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/cart-item.ts: -------------------------------------------------------------------------------- 1 | export interface CartItem { 2 | sku: string; 3 | name: string; 4 | price: number; 5 | quantity: number; 6 | } 7 | -------------------------------------------------------------------------------- /ch11/hello_world/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/web/icons/Icon-192.png -------------------------------------------------------------------------------- /ch11/hello_world/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/web/icons/Icon-512.png -------------------------------------------------------------------------------- /ch06/Environments/DSC/SqlSrvDscConfig.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/Environments/DSC/SqlSrvDscConfig.zip -------------------------------------------------------------------------------- /ch06/Environments/DSC/WebSrvDscConfig.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/Environments/DSC/WebSrvDscConfig.zip -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/Store.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Models/Store.cs -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Scripts/UI-Initialization.js: -------------------------------------------------------------------------------- 1 | // Initialize any jquery-ui-datepicker elements 2 | $(function () { 3 | $(".jquery-ui-datepicker").datepicker(); 4 | }); -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/admin_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/admin_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/cart_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/cart_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/home_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/home_icon.png -------------------------------------------------------------------------------- /ch10/apps/frontend/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 3 | "recommendations": ["angular.ng-template"] 4 | } 5 | -------------------------------------------------------------------------------- /ch11/hello_world/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /ch11/hello_world/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/cart_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/cart_mo_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/community_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/community_1.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/community_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/community_2.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/community_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/community_3.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/community_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/community_4.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/hero_image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/hero_image1.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/hero_image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/hero_image2.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/hero_image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/hero_image3.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/home_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/home_mo_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/profile_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/profile_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/remove_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/remove_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/search_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/search_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/admin_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/admin_mo_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/deploy_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/deploy_button.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/facebook_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/facebook_icon.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/login_safe_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/login_safe_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/profile_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/profile_mo_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/search_mo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/search_mo_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/shopnow_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/shopnow_button.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/submenu_image1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/submenu_image1.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/submenu_image2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/submenu_image2.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/submenu_image3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/submenu_image3.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/submenu_image4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/submenu_image4.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/unlimited_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/unlimited_logo.png -------------------------------------------------------------------------------- /ch10/apps/checkout/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/assets/config/app.config.template.json: -------------------------------------------------------------------------------- 1 | { 2 | "catalogApiUrl": "$CATALOG_API_URL", 3 | "cartApiUrl": "$CART_API_URL", 4 | "checkoutApiUrl": "$CHECKOUT_API_URL" 5 | } 6 | -------------------------------------------------------------------------------- /.vs/Implementing-CI-CD-Using-Azure-Pipelines/v17/.wsuo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/.vs/Implementing-CI-CD-Using-Azure-Pipelines/v17/.wsuo -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_wheel_rim.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_wheel_rim.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Orders/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.ViewModels.OrdersModel 2 | 3 | @{ 4 | ViewBag.Title = "Order History"; 5 | } 6 | 7 | @Html.Partial("_OrdersSearch", Model) -------------------------------------------------------------------------------- /ch11/hello_world/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/login_profile_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/login_profile_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/mobile_search_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/mobile_search_icon.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_brakes_disc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_brakes_disc.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_oil_filters.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_oil_filters.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/social_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/social_placeholder.png -------------------------------------------------------------------------------- /ch10/apps/frontend/src/assets/config/app.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "catalogApiUrl": "http://localhost:5050/", 3 | "cartApiUrl": "http://localhost:5075/", 4 | "checkoutApiUrl": "http://localhost:5015/" 5 | } 6 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_wheel_rim-blue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_wheel_rim-blue.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_wheel_rim-red.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_wheel_rim-red.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/Views/Orders/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.ViewModels.OrdersModel 2 | 3 | @{ 4 | ViewBag.Title = "Order History"; 5 | } 6 | 7 | @Html.Partial("_OrdersSearch", Model) -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_oil_premium-oil.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_oil_premium-oil.jpg -------------------------------------------------------------------------------- /ch09/azure/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: packt-store-catalog 3 | description: A Helm chart for Kubernetes deployment of packt-store-catalog 4 | type: application 5 | version: 1.0.0 6 | appVersion: "1.0.0" 7 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_lighting_headlight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_lighting_headlight.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_lighting_lightbulb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_lighting_lightbulb.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /ch10/apps/checkout/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_batteries_jumper-leads.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_batteries_jumper-leads.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_brakes_disk-pad-combo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_brakes_disk-pad-combo.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_oil_oil-filter-combo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_oil_oil-filter-combo.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_wheel_tyre-wheel-combo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_wheel_tyre-wheel-combo.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_batteries_basic-battery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_batteries_basic-battery.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_brakes_disc-calipers-red.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_brakes_disc-calipers-red.jpg -------------------------------------------------------------------------------- /ch10/iac/helm-charts/catalog/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: packt-store-catalog 3 | description: A Helm chart for Kubernetes deployment of packt-store-catalog 4 | type: application 5 | version: 1.0.0 6 | appVersion: "1.0.0" 7 | -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_batteries_premium-battery.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_batteries_premium-battery.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_lighting_bugeye-headlight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_lighting_bugeye-headlight.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_wheel_tyre-rim-chrome-combo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_wheel_tyre-rim-chrome-combo.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Images/product_wheel_tyre-wheel-combo-pack.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Images/product_wheel_tyre-wheel-combo-pack.jpg -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/IHttpClient.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | 3 | namespace PartsUnlimited.Utils 4 | { 5 | public interface IHttpClient 6 | { 7 | Task GetStringAsync(string uri); 8 | } 9 | } -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/kotlin/com/example/hello_world/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.company.flutter 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ch06/Environments/nestedtemplates/WebSrv.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Shared/_Recommendations.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 | @if (Model.Any()) 4 | { 5 |

You may also consider

6 | @Html.Partial("_ProductList", Model) 7 | } 8 | -------------------------------------------------------------------------------- /ch11/hello_world/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /.vs/Implementing-CI-CD-Using-Azure-Pipelines/v17/TestStore/0/testlog.manifest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/.vs/Implementing-CI-CD-Using-Azure-Pipelines/v17/TestStore/0/testlog.manifest -------------------------------------------------------------------------------- /ch08/terraform/main.tf: -------------------------------------------------------------------------------- 1 | resource "random_pet" "rg_name" { 2 | prefix = var.resource_group_name_prefix 3 | } 4 | 5 | resource "azurerm_resource_group" "rg" { 6 | location = var.resource_group_location 7 | name = random_pet.rg_name.id 8 | } -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /ch07/CalculusService/Additions.cs: -------------------------------------------------------------------------------- 1 | namespace CalculusService 2 | { 3 | public class Additions 4 | { 5 | public int Add(int number1, int number2) 6 | { 7 | return number1 + number2; 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Search/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | 3 |
4 |

Search results

5 | 6 | @Html.Partial("_ProductList", Model) 7 |
8 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ch11/hello_world/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch11/hello_world/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/ApplicationUser.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity.EntityFramework; 2 | 3 | namespace PartsUnlimited.Models 4 | { 5 | public class ApplicationUser : IdentityUser 6 | { 7 | public string Name { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Security/ILoginProviderCredentials.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Security 2 | { 3 | public interface ILoginProviderCredentials 4 | { 5 | string Key { get; } 6 | string Secret { get; } 7 | bool Use { get; } 8 | } 9 | } -------------------------------------------------------------------------------- /ch11/hello_world/linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/ch06/PartsUnlimitedWebsite/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/ViewModels/AlbumData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PartsUnlimited.ViewModels 4 | { 5 | public class ProductData 6 | { 7 | public string Title { get; set; } 8 | 9 | public string Url { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /ch11/hello_world/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/Controllers/AdminController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace PartsUnlimited.Areas.Admin.Controllers 4 | { 5 | [Authorize(Roles = AdminConstants.Role)] 6 | public abstract class AdminController : Controller 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Hubs/AnnouncementHub.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.SignalR; 2 | using Microsoft.AspNet.SignalR.Hubs; 3 | 4 | namespace PartsUnlimited.Hubs 5 | { 6 | [HubName("Announcement")] 7 | public class AnnouncementHub : Hub 8 | { 9 | 10 | } 11 | } -------------------------------------------------------------------------------- /ch08/azure/README.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | Deploying a Simple Linux Web App using Azure Resource Manager Templates 3 | 4 | ## Credits 5 | Based on [webbapp-basic-linux quickstart template](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.web/webapp-basic-linux) -------------------------------------------------------------------------------- /ch11/hello_world/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Store/Browse.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.Category 2 | @{ 3 | ViewBag.Title = "Browse Products"; 4 | } 5 | 6 |
7 |

@Model.Name

8 | @Html.Partial("_ProductList", Model.Products) 9 |
10 | -------------------------------------------------------------------------------- /ch07/CalculusService/CalculusService.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.vs/Implementing-CI-CD-Using-Azure-Pipelines/FileContentIndex/aa85fc19-f9a9-4ca3-beed-67ddecd5e617.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Implementing-CI-CD-Using-Azure-Pipelines/HEAD/.vs/Implementing-CI-CD-Using-Azure-Pipelines/FileContentIndex/aa85fc19-f9a9-4ca3-beed-67ddecd5e617.vsidx -------------------------------------------------------------------------------- /ch06/Environments/nestedtemplates/vNet.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "vNetName": { 6 | "value": "WorkshopVnet" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/ViewModels/ProductViewModel.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | 3 | namespace PartsUnlimited.ViewModels 4 | { 5 | public class ProductViewModel 6 | { 7 | public Product Product { get; set; } 8 | public bool ShowRecommendations { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/IShippingTaxCalculator.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using PartsUnlimited.Models; 3 | 4 | namespace PartsUnlimited.Utils 5 | { 6 | public interface IShippingTaxCalculator 7 | { 8 | OrderCostSummary CalculateCost(IEnumerable items, string orderZip); 9 | } 10 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/ViewModels/OrderDetailsViewModel.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | 3 | namespace PartsUnlimited.ViewModels 4 | { 5 | public class OrderDetailsViewModel 6 | { 7 | public OrderCostSummary OrderCostSummary { get; set; } 8 | public Order Order { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/Manufacturer.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace PartsUnlimited.Models 4 | { 5 | public class Manufacturer 6 | { 7 | public int ManufacturerId { get; set; } 8 | 9 | [Required] 10 | public string Name { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedDatabase/Pre-Deployment/01_Create_Database.sql: -------------------------------------------------------------------------------- 1 | IF (DB_ID(N'$(DatabaseName)') IS NULL) 2 | BEGIN 3 | PRINT N'Creating $(DatabaseName)...'; 4 | END 5 | GO 6 | IF (DB_ID(N'$(DatabaseName)') IS NULL) 7 | BEGIN 8 | CREATE DATABASE [$(DatabaseName)]; -- MODIFY THIS STATEMENT TO SPECIFY A COLLATION FOR YOUR DATABASE 9 | END 10 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/cart/cart.component.css: -------------------------------------------------------------------------------- 1 | tr.mat-mdc-footer-row td { 2 | border-top: 1px solid #000000; 3 | font-weight: bold; 4 | } 5 | 6 | .mat-form-field { 7 | margin-right: 15px; 8 | } 9 | 10 | .checkoutForm { 11 | width: 100%; 12 | } 13 | 14 | .checkoutForm mat-form-field { 15 | margin-right: 5px; 16 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/ILineItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace PartsUnlimited.Models 8 | { 9 | public interface ILineItem 10 | { 11 | int Count { get; } 12 | 13 | Product Product { get; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/ProductSearch/IProductSearch.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using PartsUnlimited.Models; 4 | 5 | namespace PartsUnlimited.ProductSearch 6 | { 7 | public interface IProductSearch 8 | { 9 | Task> Search(string query); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Recommendations/IRecommendationEngine.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | 4 | namespace PartsUnlimited.Recommendations 5 | { 6 | public interface IRecommendationEngine 7 | { 8 | Task> GetRecommendationsAsync(string productId); 9 | } 10 | } -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/OrderCostSummary.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Models 2 | { 3 | public class OrderCostSummary 4 | { 5 | public string CartSubTotal { get; set; } 6 | public string CartShipping { get; set; } 7 | public string CartTax { get; set; } 8 | public string CartTotal { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /ch08/terraform/variables.tf: -------------------------------------------------------------------------------- 1 | variable "resource_group_location" { 2 | default = "eastus" 3 | description = "Location of the resource group." 4 | } 5 | 6 | variable "resource_group_name_prefix" { 7 | default = "rg" 8 | description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription." 9 | } -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docker-compose.debug.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | cart: 5 | image: cart 6 | build: 7 | context: e2e/apps/cart 8 | dockerfile: ./Dockerfile 9 | environment: 10 | NODE_ENV: development 11 | ports: 12 | - 3000:3000 13 | - 9229:9229 14 | command: ["node", "--inspect=0.0.0.0:9229", "app.js"] 15 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/sortable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Sortable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-sortable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /ch10/apps/frontend/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/draggable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Draggable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-draggable-handle { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Shared/_CategoryMenu.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @foreach (var genre in Model) 3 | { 4 |
  • @Html.ActionLink(genre.Name, "Browse", "Store", new { CategoryId = genre.CategoryId, Area = string.Empty }, null)
  • 5 | } 6 |
  • @Html.ActionLink("More", "Index", "Store", new {Area = string.Empty }, null)
  • -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ch09/aws/ecr-policy-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2008-10-17", 3 | "Statement": [ 4 | { 5 | "Sid": "AllowLightsailPull-ecr-private-repo-demo", 6 | "Effect": "Allow", 7 | "Principal": { 8 | "AWS": "IamRolePrincipalArn" 9 | }, 10 | "Action": ["ecr:BatchGetImage", "ecr:GetDownloadUrlForLayer"] 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /ch10/apps/frontend/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "include": [ 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /ch06/Environments/WorkshopEnv.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "AdminUserName": { 6 | "value": "sysadmin" 7 | }, 8 | "AdminUserPassword": { 9 | "value": "Password$123" 10 | } 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Error"; 3 | } 4 |
    5 |

    Error

    6 |
    7 |
    8 |

    An error occurred while processing your request.

    9 |
    10 |
    11 |
    12 |
    -------------------------------------------------------------------------------- /ch10/apps/frontend/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/order-request.ts: -------------------------------------------------------------------------------- 1 | export interface OrderItem { 2 | sku: string; 3 | name: string; 4 | price: number; 5 | quantity: number; 6 | } 7 | 8 | export interface OrderRequest { 9 | customer: { 10 | firstName: string; 11 | lastName: string; 12 | email: string; 13 | }; 14 | items: OrderItem[]; 15 | } 16 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import "base.css"; 12 | @import "theme.css"; 13 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Security/ILoginProviders.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Security 2 | { 3 | public interface ILoginProviders 4 | { 5 | ILoginProviderCredentials Facebook { get; } 6 | ILoginProviderCredentials Google { get; } 7 | ILoginProviderCredentials Microsoft { get; } 8 | ILoginProviderCredentials Twitter { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /ch10/apps/cart/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:lts-alpine 2 | RUN apk --no-cache add curl 3 | ENV NODE_ENV=production 4 | WORKDIR /usr/src/app 5 | COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] 6 | RUN npm install --production --silent && mv node_modules ../ 7 | COPY . . 8 | EXPOSE 5075 9 | RUN chown -R node /usr/src/app 10 | USER node 11 | CMD ["npm", "start"] 12 | -------------------------------------------------------------------------------- /ch10/iac/aws/cart/ecr-policy-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2008-10-17", 3 | "Statement": [ 4 | { 5 | "Sid": "AllowLightsailPull-ecr-private-repo-demo", 6 | "Effect": "Allow", 7 | "Principal": { 8 | "AWS": "IamRolePrincipalArn" 9 | }, 10 | "Action": ["ecr:BatchGetImage", "ecr:GetDownloadUrlForLayer"] 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Orders/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.ViewModels.OrderDetailsViewModel 2 | @{ 3 | if (Model == null) 4 | { 5 | ViewBag.Title = "Unknown order"; 6 | } 7 | else 8 | { 9 | ViewBag.Title = string.Format("Order history for {0}", Model.Order.OrderId); 10 | } 11 | } 12 | 13 | @Html.Partial("_Order", Model) 14 | -------------------------------------------------------------------------------- /ch08/aws/azure-pipelines-validate.yml: -------------------------------------------------------------------------------- 1 | # AWS Cloud Formation Validation 2 | trigger: 3 | - main 4 | pool: 5 | vmImage: ubuntu-latest 6 | steps: 7 | - task: AWSCLI@1 8 | inputs: 9 | awsCredentials: 'aws-packt' 10 | regionName: 'us-east-1' 11 | awsCommand: 'cloudformation' 12 | awsSubCommand: 'validate-template' 13 | awsArguments: '--template-body file://template.json' -------------------------------------------------------------------------------- /ch11/hello_world/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/ViewModels/EditProductViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web.Mvc; 3 | using PartsUnlimited.Models; 4 | 5 | namespace PartsUnlimited.ViewModels 6 | { 7 | public class EditProductViewModel 8 | { 9 | public Product Product { get; set; } 10 | public IEnumerable Categories { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Shared/_CartSummary.cshtml: -------------------------------------------------------------------------------- 1 |
  • 2 | 3 | 4 |
    Cart
    5 | @if (ViewBag.CartCount > 0) 6 | { 7 | 8 | } 9 |
    10 |
  • -------------------------------------------------------------------------------- /ch11/hello_world/ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/Views/Orders/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.ViewModels.OrderDetailsViewModel 2 | 3 | @{ 4 | if (Model == null) 5 | { 6 | ViewBag.Title = "Unknown order"; 7 | } 8 | else 9 | { 10 | ViewBag.Title = string.Format("Order history for {0}", Model.Order.OrderId); 11 | } 12 | } 13 | 14 | @Html.Partial("_Order", Model) 15 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |
    6 |

    @ViewBag.Title

    7 |
    8 |
    9 |

    Unsuccessful login with service.

    10 |
    11 |
    12 |
    13 |
    14 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Shared/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Locked Out"; 3 | } 4 |
    5 |

    Locked out

    6 |
    7 |
    8 |

    This account has been locked out, please try again later.

    9 |
    10 |
    11 |
    12 |
    13 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ch08/terraform/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_version = ">=1.4.6" 3 | 4 | backend "azurerm" {} 5 | 6 | required_providers { 7 | azurerm = { 8 | source = "hashicorp/azurerm" 9 | version = "~>3.56.0" 10 | } 11 | random = { 12 | source = "hashicorp/random" 13 | version = "~>3.5.1" 14 | } 15 | } 16 | } 17 | 18 | provider "azurerm" { 19 | features {} 20 | } 21 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ch11/hello_world/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/ViewModels/HomeViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using PartsUnlimited.Models; 3 | 4 | namespace PartsUnlimited.ViewModels 5 | { 6 | public class HomeViewModel 7 | { 8 | public List NewProducts { get; set; } 9 | public List TopSellingProducts { get; set; } 10 | public List CommunityPosts { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/ViewModels/ShoppingCartViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using PartsUnlimited.Models; 3 | 4 | namespace PartsUnlimited.ViewModels 5 | { 6 | public class ShoppingCartViewModel 7 | { 8 | public List CartItems { get; set; } 9 | public int CartCount { get; set; } 10 | public OrderCostSummary OrderCostSummary { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/IRaincheckQuery.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | using PartsUnlimited.Models; 4 | 5 | namespace PartsUnlimited.Utils 6 | { 7 | public interface IRaincheckQuery 8 | { 9 | Task AddAsync(Raincheck raincheck); 10 | Task FindAsync(int id); 11 | Task> GetAllAsync(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Home/Recomendations.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @using PartsUnlimited.Utils 3 | @{ 4 | ViewBag.Title = "Home Page"; 5 | } 6 |
    7 |

    Parts Unlimited Online Store Recommenations

    8 | Your Recommentations 9 |

    Your recomendations are:

    10 | Brembo Brakes 11 | Tires 12 |
    13 | 14 | -------------------------------------------------------------------------------- /ch11/hello_world/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /ch11/hello_world/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using PartsUnlimited.Utils; 3 | 4 | namespace PartsUnlimited 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | filters.Add(new LayoutDataAttribute()); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/bin 15 | **/charts 16 | **/docker-compose* 17 | **/compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md 26 | -------------------------------------------------------------------------------- /ch10/apps/cart/.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/charts 15 | **/docker-compose* 16 | **/compose* 17 | **/Dockerfile* 18 | **/node_modules 19 | **/npm-debug.log 20 | **/obj 21 | **/secrets.dev.yaml 22 | **/values.dev.yaml 23 | LICENSE 24 | README.md 25 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/autocomplete.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Autocomplete 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/autocomplete/#theming 10 | */ 11 | .ui-autocomplete { 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | cursor: default; 16 | } 17 | -------------------------------------------------------------------------------- /ch06/Environments/DSC/SqlSrvDscConfig.ps1: -------------------------------------------------------------------------------- 1 | Configuration Main 2 | { 3 | Param ( [string] $nodeName ) 4 | 5 | Import-DscResource -ModuleName PSDesiredStateConfiguration 6 | Import-DscResource -ModuleName xSqlServer 7 | 8 | Node $nodeName 9 | { 10 | xSqlServerFirewall($nodeName) 11 | { 12 | SourcePath = "C:\SQLServerFull" 13 | InstanceName = "MSSQLSERVER" 14 | Features = "SQLENGINE" 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ch08/aws/azure-pipelines-deploy.yml: -------------------------------------------------------------------------------- 1 | # AWS Cloud Formation Deployment 2 | trigger: 3 | - main 4 | pool: 5 | vmImage: ubuntu-latest 6 | steps: 7 | - task: CloudFormationCreateOrUpdateStack@1 8 | inputs: 9 | awsCredentials: 'aws-packt' 10 | regionName: 'us-east-1' 11 | stackName: 'packt' 12 | templateSource: 'file' 13 | templateFile: 'template.json' 14 | capabilityIAM: false 15 | capabilityNamedIAM: false 16 | onFailure: 'DELETE' -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/selectable.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Selectable 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | */ 9 | .ui-selectable { 10 | -ms-touch-action: none; 11 | touch-action: none; 12 | } 13 | .ui-selectable-helper { 14 | position: absolute; 15 | z-index: 100; 16 | border: 1px dotted black; 17 | } 18 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Scripts/Recommendations.js: -------------------------------------------------------------------------------- 1 | function getRecommendations(productId) { 2 | $.ajax({ 3 | url: "/Recommendations/GetRecommendations", 4 | type: "GET", 5 | data: { productId: productId }, 6 | success: function (data) { 7 | $("#recommendations-panel").html(data); 8 | }, 9 | error: function (error) { 10 | alert("Failed to get recommendations..."); 11 | }, 12 | }) 13 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/IOrdersQuery.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | using PartsUnlimited.Models; 4 | using PartsUnlimited.ViewModels; 5 | 6 | namespace PartsUnlimited.Utils 7 | { 8 | public interface IOrdersQuery 9 | { 10 | Task FindOrderAsync(int id); 11 | Task IndexHelperAsync(string username, DateTime? start, DateTime? end, string invalidOrderSearch, bool isAdminSearch); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ch07/README.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | A sample project demonstrating how to implement Unit Tests in NUnit for a Class Library written in C# .Net in Visual Studio and executing the tests automatically in an Azure Pipeline. 3 | 4 | ## Getting Started 5 | 1. Clone the repo 6 | 2. Inspect the code 7 | 3. Import the azure-pipelines.yaml in Azure Pipelines 8 | 9 | ## Build and Test 10 | Execute the pipeline and you will be able to see the unit tests execute and resulting report. 11 | -------------------------------------------------------------------------------- /ch09/azure/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /ch10/iac/helm-charts/catalog/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "catalog.fullname" . }} 5 | labels: 6 | {{- include "catalog.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "catalog.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/CommunityPost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PartsUnlimited.Models 4 | { 5 | 6 | public class CommunityPost 7 | { 8 | public string Image { get; set; } 9 | public string Content { get; set; } 10 | public DateTime DatePosted { get; set; } 11 | public CommunitySource Source { get; set; } 12 | } 13 | 14 | public enum CommunitySource 15 | { 16 | Facebook, 17 | Twitter 18 | } 19 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Recommendations/NaiveRecommendationEngine.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading.Tasks; 3 | 4 | namespace PartsUnlimited.Recommendations 5 | { 6 | public class NaiveRecommendationEngine : IRecommendationEngine 7 | { 8 | public Task> GetRecommendationsAsync(string productId) 9 | { 10 | return Task.FromResult>(new[] { productId }); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/ITelemetryProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace PartsUnlimited.Utils 5 | { 6 | public interface ITelemetryProvider 7 | { 8 | void TrackTrace(string message); 9 | void TrackEvent(string message); 10 | void TrackEvent(string message, Dictionary properties, Dictionary measurements); 11 | void TrackException(Exception exception); 12 | } 13 | } -------------------------------------------------------------------------------- /ch10/apps/checkout/checkout.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net7.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /ch10/iac/helm-charts/catalog/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | 4 |
    5 | 6 |
    7 | 10 | Pack Store 11 |
    12 |
    13 |
    14 | 15 |
    16 |
    -------------------------------------------------------------------------------- /ch10/apps/cart/models.js: -------------------------------------------------------------------------------- 1 | // models.js 2 | 'use strict'; 3 | 4 | class Cart { 5 | constructor() { 6 | this.id = Math.floor(Math.random() * 1000000).toString(); 7 | this.items = []; 8 | } 9 | } 10 | 11 | class CartItem { 12 | constructor(sku, name, quantity, price) { 13 | this.sku = sku; 14 | this.name = name; 15 | this.quantity = quantity; 16 | this.price = price; 17 | } 18 | } 19 | 20 | //export default class { Cart } 21 | export { Cart, CartItem } -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | :host { 2 | --content-padding: 10px; 3 | } 4 | 5 | header { 6 | display: block; 7 | height: 60px; 8 | padding: var(--content-padding); 9 | box-shadow: 0px 5px 25px var(--shadow-color); 10 | } 11 | 12 | header.brand-name { 13 | font-size: 26pt; 14 | font-weight: bold; 15 | color: var(--primary-color); 16 | } 17 | 18 | .content { 19 | padding: var(--content-padding); 20 | } 21 | 22 | section.cart-indicator { 23 | float: right; 24 | margin: 25px; 25 | } -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ch11/hello_world/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/Category.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace PartsUnlimited.Models 5 | { 6 | public class Category 7 | { 8 | public int CategoryId { get; set; } 9 | 10 | [Required] 11 | public string Name { get; set; } 12 | 13 | public string Description { get; set; } 14 | 15 | public string ImageUrl { get; set; } 16 | 17 | public List Products { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/OrderDetail.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Models 2 | { 3 | public class OrderDetail : ILineItem 4 | { 5 | public int OrderDetailId { get; set; } 6 | 7 | public int OrderId { get; set; } 8 | 9 | public int ProductId { get; set; } 10 | 11 | public int Count { get; set; } 12 | 13 | public decimal UnitPrice { get; set; } 14 | 15 | public virtual Product Product { get; set; } 16 | 17 | public virtual Order Order { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/AdminConstants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace PartsUnlimited.Areas.Admin 4 | { 5 | public static class AdminConstants 6 | { 7 | public const string Area = "Admin"; 8 | public const string Role = "Administrator"; 9 | 10 | public static class ManageStore 11 | { 12 | public const string Name = "ManageStore"; 13 | public const string Allowed = "Allowed"; 14 | public const string NotAllowed = "false"; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Scripts/NewStoreArrivals.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $.connection.hub.logging = true; 3 | var announcementsHub = $.connection.Announcement; 4 | 5 | announcementsHub.client.announcement = function (item) { 6 | var newArrivals = $('a#NewArrivalsPanel'); 7 | newArrivals.attr("href", item.Url); //Set the URL 8 | newArrivals.text(item.Title); //Set the title 9 | }; 10 | 11 | $.connection.hub.start().done(function () { 12 | console.log('hub connection open'); 13 | }); 14 | }); -------------------------------------------------------------------------------- /ch11/hello_world/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /ch11/hello_world/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/tooltip.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Tooltip 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/tooltip/#theming 10 | */ 11 | .ui-tooltip { 12 | padding: 8px; 13 | position: absolute; 14 | z-index: 9999; 15 | max-width: 300px; 16 | -webkit-box-shadow: 0 0 5px #aaa; 17 | box-shadow: 0 0 5px #aaa; 18 | } 19 | body .ui-tooltip { 20 | border-width: 2px; 21 | } 22 | -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/Raincheck.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Models 2 | { 3 | public class Raincheck 4 | { 5 | public int RaincheckId { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public int ProductId { get; set; } 10 | 11 | public virtual Product Product { get; set; } 12 | 13 | public int Count { get; set; } 14 | 15 | public double SalePrice { get; set; } 16 | 17 | public int StoreId { get; set; } 18 | 19 | public virtual Store IssuerStore { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/ViewModels/ShoppingCartRemoveViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.ViewModels 2 | { 3 | public class ShoppingCartRemoveViewModel 4 | { 5 | public string Message { get; set; } 6 | public string CartSubTotal { get; set; } 7 | public string CartShipping { get; set; } 8 | public string CartTax { get; set; } 9 | public string CartTotal { get; set; } 10 | public int CartCount { get; set; } 11 | public int ItemCount { get; set; } 12 | public int DeleteId { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /ch06/README.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | A sample repository of a ficticious online ecommerce store, used to demonstrate the SAST and SCA capabilities of SonarQube analysis. 3 | 4 | ## Getting Started 5 | 1. Clone the repo 6 | 2. Inspect the code 7 | 3. Import the azure-pipelines-with-sonarqube.yaml in Azure Pipelines 8 | 9 | ## Build and Test 10 | Execute the pipeline and you will be able to see the execution of SonarQube analysis and link to results. 11 | 12 | ## Credits 13 | The application code in this repository was copied from [https://github.com/karlrissland/AppWorkshop] 14 | -------------------------------------------------------------------------------- /ch08/azure/azure-pipelines-deploy.yml: -------------------------------------------------------------------------------- 1 | # ARM Template pipeline 2 | trigger: 3 | - main 4 | pool: 5 | vmImage: ubuntu-latest 6 | steps: 7 | - task: AzureResourceManagerTemplateDeployment@3 8 | inputs: 9 | deploymentScope: 'Resource Group' 10 | azureResourceManagerConnection: 'azure-packt-rg' 11 | subscriptionId: $(AzureSubscriptionId) 12 | action: 'Create Or Update Resource Group' 13 | resourceGroupName: 'packt' 14 | location: 'East US' 15 | templateLocation: 'Linked artifact' 16 | csmFile: 'azure/azuredeploy.json' 17 | deploymentMode: 'Incremental' -------------------------------------------------------------------------------- /ch08/azure/azure-pipelines-validate.yml: -------------------------------------------------------------------------------- 1 | # ARM Template pipeline 2 | trigger: 3 | - main 4 | pool: 5 | vmImage: ubuntu-latest 6 | steps: 7 | - task: AzureResourceManagerTemplateDeployment@3 8 | inputs: 9 | deploymentScope: 'Resource Group' 10 | azureResourceManagerConnection: 'azure-packt-rg' 11 | subscriptionId: $(AzureSubscriptionId) 12 | action: 'Create Or Update Resource Group' 13 | resourceGroupName: 'packt' 14 | location: 'East US' 15 | templateLocation: 'Linked artifact' 16 | csmFile: 'azure/azuredeploy.json' 17 | deploymentMode: 'Validation' -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/ExportOptions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | method 6 | app-store 7 | teamID 8 | EB7BHC445Y 9 | provisioningProfiles 10 | 11 | com.company.flutter 12 | Hello Flutter AppStore 13 | 14 | 15 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Confirm Email"; 3 | } 4 |
    5 |

    @ViewBag.Title

    6 |
    7 |
    8 |
    9 |

    10 | Thank you for confirming your email. Please @Html.ActionLink("Click here to Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 11 |

    12 |
    13 |
    14 |
    15 |
    16 |
    -------------------------------------------------------------------------------- /ch11/hello_world/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/App_Start/IdentityConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.AspNet.Identity; 3 | 4 | namespace PartsUnlimited 5 | { 6 | public class EmailService : IIdentityMessageService 7 | { 8 | public Task SendAsync(IdentityMessage message) 9 | { 10 | return Task.FromResult(0); 11 | } 12 | } 13 | 14 | public class SmsService : IIdentityMessageService 15 | { 16 | public Task SendAsync(IdentityMessage message) 17 | { 18 | return Task.FromResult(0); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 3 | "version": "0.2.0", 4 | "configurations": [ 5 | { 6 | "name": "ng serve", 7 | "type": "chrome", 8 | "request": "launch", 9 | "preLaunchTask": "npm: start", 10 | "url": "http://localhost:4200/" 11 | }, 12 | { 13 | "name": "ng test", 14 | "type": "chrome", 15 | "request": "launch", 16 | "preLaunchTask": "npm: test", 17 | "url": "http://localhost:9876/debug.html" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[python]": { 3 | "editor.defaultFormatter": "ms-python.autopep8" 4 | }, 5 | "python.formatting.provider": "none", 6 | "yaml.schemas": { 7 | "https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json": [ 8 | "file:///c%3A/Users/rmard/source/GitHub/PackPublishing/Implementing-CI-CD-Using-Azure-Pipelines/e2e/iac/azure/deploy.yml", 9 | "file:///c%3A/Users/rmard/source/GitHub/PackPublishing/Implementing-CI-CD-Using-Azure-Pipelines/e2e/pipelines/aws/deploy.yml" 10 | ] 11 | } 12 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { APP_INITIALIZER, NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { HttpClientModule } from '@angular/common/http'; 4 | 5 | import { AppRoutingModule } from './app-routing.module'; 6 | import { AppComponent } from './app.component'; 7 | import { ConfigService } from './config.service'; 8 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 9 | 10 | export function loadConfig(configService: ConfigService) { 11 | return () => configService.loadConfig(); 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/CartItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | 4 | namespace PartsUnlimited.Models 5 | { 6 | public class CartItem : ILineItem 7 | { 8 | [Key] 9 | public int CartItemId { get; set; } 10 | 11 | [Required] 12 | public string CartId { get; set; } 13 | public int ProductId { get; set; } 14 | public int Count { get; set; } 15 | 16 | [DataType(DataType.DateTime)] 17 | public DateTime DateCreated { get; set; } 18 | 19 | public virtual Product Product { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Reset password confirmation"; 3 | } 4 | 5 |
    6 |

    @ViewBag.Title

    7 |
    8 |
    9 |
    10 |

    11 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" }) 12 |

    13 |
    14 |
    15 |
    16 |
    17 |
    18 | -------------------------------------------------------------------------------- /ch07/CalculusService.Tests/AdditionsTests.cs: -------------------------------------------------------------------------------- 1 | namespace CalculusService.Tests 2 | { 3 | [TestFixture] 4 | public class AdditionsTests 5 | { 6 | private Additions additions; 7 | 8 | [SetUp] 9 | public void Setup() 10 | { 11 | additions = new Additions(); 12 | } 13 | 14 | [TestCase(1, 2, 3)] 15 | [TestCase(2, 4, 6)] 16 | [TestCase(5, -10, -5)] 17 | public void TestAdd(int number1, int number2, int result) 18 | { 19 | Assert.That(result, Is.EqualTo(additions.Add(number1, number2))); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/Dockerfile: -------------------------------------------------------------------------------- 1 | # build stage 2 | FROM node:latest as build 3 | WORKDIR /app 4 | COPY package*.json ./ 5 | RUN npm install 6 | COPY . . 7 | RUN npm run build --prod 8 | 9 | # final stage 10 | FROM nginx:alpine as final 11 | COPY --from=build /app/dist/frontend /usr/share/nginx/html 12 | ENV CATALOG_API_URL="http://localhost:5050" 13 | ENV CART_API_URL="http://localhost:5075" 14 | ENV CHECKOUT_API_URL="http://localhost:5015" 15 | WORKDIR /usr/share/nginx/html/assets/config/ 16 | CMD ["/bin/sh", "-c", "envsubst < app.config.template.json > app.config.json && rm app.config.template.json && exec nginx -g 'daemon off;'"] -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/product/product.component.css: -------------------------------------------------------------------------------- 1 | .product { 2 | background: var(--accent-color); 3 | border-radius: 30px; 4 | padding: 10px 30px 10px 30px; 5 | } 6 | 7 | .product-heading { 8 | color: var(--primary-color); 9 | padding: 10px 20px 0 20px; 10 | } 11 | 12 | .product-photo { 13 | height: 250px; 14 | width: 100%; 15 | object-fit: cover; 16 | border-radius: 30px 30px 0 0; 17 | } 18 | 19 | section.product a { 20 | text-decoration: none; 21 | color: var(--primary-color); 22 | padding-right: 20px; 23 | } 24 | 25 | section.product a::after { 26 | content: "\203A"; 27 | margin-left: 5px; 28 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/HttpClientWrapper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Net.Http.Headers; 4 | using System.Text; 5 | 6 | namespace PartsUnlimited.Utils 7 | { 8 | public class HttpClientWrapper : HttpClient, IHttpClient 9 | { 10 | public HttpClientWrapper() 11 | { 12 | var accountKey = Encoding.ASCII.GetBytes(ConfigurationHelpers.GetString("MachineLearning.AccountKey")); 13 | var header = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(accountKey)); 14 | DefaultRequestHeaders.Authorization = header; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/_Settings.scss: -------------------------------------------------------------------------------- 1 | $color-primary: #424242; 2 | $color-inverse: #1C367C; 3 | $color-white: #EEEEEE; 4 | $color-black: #222222; 5 | $color-error: #B94A48; 6 | $color-background: #E1E1E1; 7 | $color-rule: #D1D1D1; 8 | $color-inverse-background: #2A2A2A; 9 | $color-bar-background: #1C367C; 10 | $font-secondary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 11 | $font-primary: 'Segoe UI Light', $font-secondary; 12 | $font-primary-weight: 300; 13 | $font-primary-bold: 'Segoe UI SemiBold', $font-primary; 14 | $font-primary-bold-weight: 600; 15 | $size-mobile-max: 767px; 16 | $size-tablet-max: 992px; 17 | $size-desktop-max: 1200px; -------------------------------------------------------------------------------- /ch11/hello_world/README.md: -------------------------------------------------------------------------------- 1 | # hello_world 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/EmptyTelemetryProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace PartsUnlimited.Utils 5 | { 6 | public class EmptyTelemetryProvider : ITelemetryProvider 7 | { 8 | public void TrackEvent(string message) 9 | { 10 | } 11 | 12 | public void TrackEvent(string message, Dictionary properties, Dictionary measurements) 13 | { 14 | } 15 | 16 | public void TrackException(Exception exception) 17 | { 18 | } 19 | 20 | public void TrackTrace(string message) 21 | { 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Frontend 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /azure-pipeline-for-github.yml: -------------------------------------------------------------------------------- 1 | pool: 2 | vmImage: 'windows-latest' 3 | 4 | variables: 5 | solution: '**/*.sln' 6 | buildPlatform: 'Any CPU' 7 | buildConfiguration: 'Release' 8 | 9 | steps: 10 | - task: NuGetToolInstaller@1 11 | 12 | - task: NuGetCommand@2 13 | inputs: 14 | restoreSolution: '$(solution)' 15 | 16 | - task: VSBuild@1 17 | inputs: 18 | solution: '$(solution)' 19 | msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' 20 | platform: '$(buildPlatform)' 21 | configuration: '$(buildConfiguration)' 22 | 23 | -------------------------------------------------------------------------------- /ch01/azure-pipelines.yaml: -------------------------------------------------------------------------------- 1 | trigger: 2 | - master 3 | 4 | stages: 5 | - stage: stage1 6 | jobs: 7 | - job: job1 8 | pool: 9 | vmImage: 'windows-latest' 10 | steps: 11 | - task: NuGetToolInstaller@1 12 | - task: NuGetCommand@2 13 | inputs: 14 | restoreSolution: 'mysolution.sln' 15 | - script: echo Hello, world! 16 | displayName: 'Run a one-line script' 17 | - stage: stage2 18 | dependsOn: stage1 19 | jobs: 20 | - job: importantJob 21 | pool: 22 | vmImage: 'windows-latest' 23 | steps: 24 | - pwsh: 'write-host "I do nothing"' -------------------------------------------------------------------------------- /ch06/Environments/nestedtemplates/SqlSrv.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "virtualMachineName": { 6 | "value": "SqlServerVM" 7 | }, 8 | "adminUsername": { 9 | "value": "karl" 10 | }, 11 | "virtualNetworkName": { 12 | "value": "WorkshopVnet" 13 | }, 14 | "adminPassword": { 15 | "value": "P2ssw0rd" 16 | }, 17 | "virtualNetworkResourceGroup": { 18 | "value": "WorkshopTest" 19 | }, 20 | "AdminUserPassword": { 21 | "value": "P2ssw0rd" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Controllers/SearchController.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using System.Web.Mvc; 3 | using PartsUnlimited.ProductSearch; 4 | 5 | namespace PartsUnlimited.Controllers 6 | { 7 | public class SearchController : Controller 8 | { 9 | private readonly IProductSearch search; 10 | 11 | public SearchController(IProductSearch search) 12 | { 13 | this.search = search; 14 | } 15 | 16 | [HttpGet] 17 | public async Task Index(string q) 18 | { 19 | var result = await search.Search(q); 20 | 21 | return View(result); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/Controllers/RaincheckController.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Utils; 2 | using System.Threading.Tasks; 3 | using System.Web.Mvc; 4 | 5 | namespace PartsUnlimited.Areas.Admin.Controllers 6 | { 7 | public class RaincheckController : AdminController 8 | { 9 | private readonly IRaincheckQuery _query; 10 | 11 | public RaincheckController(IRaincheckQuery query) 12 | { 13 | _query = query; 14 | } 15 | 16 | public async Task Index() 17 | { 18 | var rainchecks = await _query.GetAllAsync(); 19 | 20 | return View(rainchecks); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Forgot Password Confirmation"; 3 | } 4 | 5 |
    6 |

    @ViewBag.Title

    7 |
    8 |
    9 |
    10 |

    11 | Please check your email to reset your password. 12 |

    13 |

    14 | For demo purpose only: @Html.ActionLink("Click here to reset the password", "ResetPassword", new { code = ViewBag.Code }) 15 |

    16 |
    17 |
    18 |
    19 |
    20 |
    -------------------------------------------------------------------------------- /ch06/Environments/nestedtemplates/VsDevWorkstation.parameters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "VsDevWorkstationName": { 6 | "value": "vs2017DevSrv" 7 | }, 8 | "VsDevWorkstationAdminUserName": { 9 | "value": "karl" 10 | }, 11 | "virtualNetworkName": { 12 | "value": "WorkshopVnet" 13 | }, 14 | "virtualNetworkResourceGroup": { 15 | "value": "WorkshopTest" 16 | }, 17 | "VsDevWorkstationAdminPassword": { 18 | "value": "P2ssw0rd" 19 | }, 20 | "repoUri": { 21 | "value": "" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/Views/StoreManager/RemoveProduct.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.Product 2 | 3 | @{ 4 | ViewBag.Title = "Delete"; 5 | } 6 | 7 | @if (Model != null) 8 | { 9 |

    Delete Confirmation

    10 | 11 |

    12 | Are you sure you want to delete the product titled 13 | @Model.Title? 14 |

    15 | 16 | using (Html.BeginForm()) 17 | { 18 |

    19 | 20 |

    21 |

    22 | @Html.ActionLink("Back to List", "Index") 23 |

    24 | } 25 | } 26 | else 27 | { 28 | @Html.Label(null, "Unable to locate the product") 29 | } 30 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = hello_world 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.helloWorld 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /ch09/azure/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for catalog. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | replicaCount: 2 5 | image: 6 | repository: packtadocicd.azurecr.io/packt-store-catalog 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "latest" 10 | 11 | service: 12 | type: LoadBalancer 13 | port: 5050 14 | 15 | resources: 16 | limits: 17 | cpu: 1000m 18 | memory: 2048Mi 19 | requests: 20 | cpu: 500m 21 | memory: 512Mi 22 | 23 | autoscaling: 24 | enabled: true 25 | minReplicas: 2 26 | maxReplicas: 10 27 | targetCPUUtilizationPercentage: 80 28 | targetMemoryUtilizationPercentage: 80 29 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Checkout/Complete.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.Order 2 | 3 | @{ 4 | ViewBag.Title = "Checkout Complete"; 5 | } 6 |
    7 |

    Checkout Complete

    8 | 9 |
    10 |
    11 |

    Thanks for your order!

    12 |

    Your order number is: @Model.OrderId

    13 |

    Order Date: @Model.OrderDate.ToShortDateString()

    14 |

    15 | You can @Html.ActionLink("view your order", "Details", "Orders", new{ id = @Model.OrderId}, new{ @class="action-link"}) from your account page. 16 |

    17 |
    18 |

    19 | @Html.ActionLink("Keep Shopping", "Index", "Home", null, new{ @class="btn"}) 20 |

    21 | 22 |
    23 |
    24 |
    25 | -------------------------------------------------------------------------------- /ch08/terraform/azure-pipelines-validate.yml: -------------------------------------------------------------------------------- 1 | # Terraform pipeline 2 | trigger: 3 | - main 4 | pool: 5 | vmImage: ubuntu-latest 6 | steps: 7 | - task: TerraformInstaller@0 8 | displayName: 'install' 9 | inputs: 10 | terraformVersion: 'latest' 11 | - task: TerraformTaskV4@4 12 | displayName: 'init' 13 | inputs: 14 | provider: 'azurerm' 15 | command: 'init' 16 | backendServiceArm: 'azure-packt-rg' 17 | backendAzureRmResourceGroupName: 'tfstate' 18 | backendAzureRmStorageAccountName: 'tfstate' 19 | backendAzureRmContainerName: 'tfstate' 20 | backendAzureRmKey: 'terraform.tfstate' 21 | - task: TerraformTaskV4@4 22 | displayName: 'validate' 23 | inputs: 24 | provider: 'azurerm' 25 | command: 'validate' 26 | -------------------------------------------------------------------------------- /ch10/iac/helm-charts/catalog/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for catalog. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | replicaCount: 2 5 | image: 6 | repository: packtadocicd.azurecr.io/packt-store-catalog 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "latest" 10 | 11 | service: 12 | type: LoadBalancer 13 | port: 5050 14 | 15 | resources: 16 | limits: 17 | cpu: 1000m 18 | memory: 2048Mi 19 | requests: 20 | cpu: 500m 21 | memory: 512Mi 22 | 23 | autoscaling: 24 | enabled: true 25 | minReplicas: 2 26 | maxReplicas: 10 27 | targetCPUUtilizationPercentage: 80 28 | targetMemoryUtilizationPercentage: 80 29 | -------------------------------------------------------------------------------- /ch10/apps/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # Compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | /bazel-out 8 | 9 | # Node 10 | /node_modules 11 | npm-debug.log 12 | yarn-error.log 13 | 14 | # IDEs and editors 15 | .idea/ 16 | .project 17 | .classpath 18 | .c9/ 19 | *.launch 20 | .settings/ 21 | *.sublime-workspace 22 | 23 | # Visual Studio Code 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | .history/* 30 | 31 | # Miscellaneous 32 | /.angular/cache 33 | .sass-cache/ 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | testem.log 38 | /typings 39 | 40 | # System files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/AdminAreaRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | 3 | namespace PartsUnlimited.Areas.Admin 4 | { 5 | public class AdminAreaRegistration : AreaRegistration 6 | { 7 | public override void RegisterArea(AreaRegistrationContext context) 8 | { 9 | context.MapRoute( 10 | "admin_default", 11 | "Admin/{controller}/{action}/{id}", 12 | new { action = "Index", id = UrlParameter.Optional }, 13 | namespaces: new string[] { "PartsUnlimited.Areas.Admin.Controllers" } 14 | ); 15 | } 16 | 17 | public override string AreaName 18 | { 19 | get { return AdminConstants.Area; } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Account/RegisterConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Register Confirmation"; 3 | } 4 |
    5 |

    @ViewBag.Title

    6 |
    7 |
    8 |
    9 |

    10 | Please check your email to activate your account. 11 |

    12 |

    13 | Demo/testing purposes only: The sample displays the code and user id in the page: @Html.ActionLink("Click here to confirm your email: ", "ConfirmEmail", new { code = ViewBag.Code, userId = ViewBag.UserId }) 14 |

    15 |
    16 |
    17 |
    18 |
    19 |
    -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Shared/_Announcement.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.Product 2 | 3 | 18 | -------------------------------------------------------------------------------- /ch10/apps/cart/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cart", 3 | "version": "1.0.0", 4 | "description": "Packt Store Shopping Cart", 5 | "main": "app.js", 6 | "type": "module", 7 | "scripts": { 8 | "watch": "nodemon -r dotenv/config app.js", 9 | "start": "node -r dotenv/config app.js", 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "author": "Roberto Mardeni", 13 | "license": "ISC", 14 | "dependencies": { 15 | "async": "^3.2.4", 16 | "body-parser": "^1.20.2", 17 | "cors": "^2.8.5", 18 | "dotenv": "^16.0.3", 19 | "express": "^4.18.2", 20 | "redis": "^4.6.6", 21 | "swagger-jsdoc": "^6.2.8", 22 | "swagger-ui-express": "^4.6.3" 23 | }, 24 | "devDependencies": { 25 | "nodemon": "^2.0.22" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/Store.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Store.css","sources":["Store.scss","_Settings.scss"],"sourcesContent":[],"mappings":"AAEA,AAAe,AAEb,AAAU,AACV,AAAQ,AACR,AAAS,AACT,AALF,AAAe,AAMb,AAAgB,AAEhB,AAAF,AAAe,AAAe,AAG1B,AAAY,AACZ,AAAe,AACnB,AAAe,AAAe,AAE1B,AAAW,AACX,AAAe,AAInB,AAAe,AAAiB,AAAM,AAElC,AAAa,AACb,AAAW,AAGf,AAAe,AAGb,AAAe,AAChB,AAJD,AAAe,AAKb,AAAe,AACjB,AAAe,AAAe,AAAK,AAEjC,AAAe,AAEjB,AAAe,AAGb,AAAU,AAAZ,AAAe,AAAO,AAAC,AAEpB,AAAU,AACV,AAAQ,AAKP,AAAY,AAHd,AALF,AAAe,AAAO,AAAC,AAMpB,AAAK,AAIR,AAAe,AAGb,AAAU,AACV,AAAS,AAET,AANF,AAAe,AAOZ,AAAO,AAIP,AAHH,AAAe,AAAe,AAI1B,AAAS,AACT,AAAQ,AACR,AAAQ,AACR,AAAO,AAGR,AAVH,AAAe,AAAe,AAW1B,AAAO,AAGX,AAAe,AAGb,AAAQ,AACR,AAAO,AACP,AAAS,AACT,AAAa,AAIf,AACC,AAAa,AACb,AAAgB,AAGjB,AAAe,AAAQ,AAAgB,AAAE,AAAyB,AAAQ,AAExE,AAAa","names":[]} -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Startup.cs: -------------------------------------------------------------------------------- 1 | //TODO Application Insights - Uncomment 2 | //using Microsoft.ApplicationInsights.Extensibility; 3 | using Microsoft.Owin; 4 | using Owin; 5 | using PartsUnlimited; 6 | using System.Web.Configuration; 7 | 8 | [assembly: OwinStartup(typeof(Startup))] 9 | 10 | //comment 11 | namespace PartsUnlimited 12 | { 13 | // bellevue comment!! 14 | // second commit 15 | public partial class Startup 16 | { 17 | public void Configuration(IAppBuilder app) 18 | { 19 | ConfigureAuth(app); 20 | 21 | //TODO Application Insights - Uncomment 22 | //TelemetryConfiguration.Active.InstrumentationKey = WebConfigurationManager.AppSettings["Keys:ApplicationInsights:InstrumentationKey"]; 23 | 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ch11/hello_world/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | * { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | html, body { height: 100%; } 8 | body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } 9 | :root { 10 | --primary-color: #605DC8; 11 | --secondary-color: #8a87e4; 12 | --accent-color: #e8e7fa; 13 | --shadow-color: #E8E8E8; 14 | } 15 | 16 | button.primary { 17 | padding: 10px; 18 | border: solid 1px var(--primary-color); 19 | background: var(--primary-color); 20 | color: white; 21 | border-radius: 8px; 22 | } 23 | 24 | button.secondary { 25 | padding: 10px; 26 | border: solid 1px var(--secondary-color); 27 | background: var(--secondary-color); 28 | color: white; 29 | border-radius: 8px; 30 | } 31 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | GoogleService*.* 30 | 31 | # Exceptions to above rules. 32 | !default.mode1v3 33 | !default.mode2v3 34 | !default.pbxuser 35 | !default.perspectivev3 36 | 37 | 38 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | import { HomeComponent } from './home/home.component'; 4 | import { CartComponent } from './cart/cart.component'; 5 | import { CheckoutComponent } from './checkout/checkout.component'; 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: HomeComponent, 11 | title: 'Home page' 12 | }, { 13 | path: 'cart', 14 | component: CartComponent, 15 | title: 'Shopping cart' 16 | }, { 17 | path: 'checkout', 18 | component: CheckoutComponent, 19 | title: 'checkout' 20 | } 21 | ]; 22 | 23 | @NgModule({ 24 | imports: [RouterModule.forRoot(routes)], 25 | exports: [RouterModule] 26 | }) 27 | export class AppRoutingModule { } 28 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Security/ConfigurationLoginProviderCredentials.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Utils; 2 | 3 | namespace PartsUnlimited.Security 4 | { 5 | public class ConfigurationLoginProviderCredentials : ILoginProviderCredentials 6 | { 7 | public ConfigurationLoginProviderCredentials(string providerName) 8 | { 9 | Key = ConfigurationHelpers.GetString(string.Format("Authentication.{0}.Key", providerName)); 10 | Secret = ConfigurationHelpers.GetString(string.Format("Authentication.{0}.Secret", providerName)); 11 | 12 | Use = !string.IsNullOrWhiteSpace(Key) && !string.IsNullOrWhiteSpace(Secret); 13 | } 14 | 15 | public string Key { get; set; } 16 | public string Secret { get; set; } 17 | public bool Use { get; protected set; } 18 | } 19 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/PartsUnlimitedTelemetryInitializer.cs: -------------------------------------------------------------------------------- 1 | //TODO Application Insights - Uncomment 2 | //using Microsoft.ApplicationInsights.Channel; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Web; 7 | 8 | namespace PartsUnlimited.Utils 9 | { 10 | public class PartsUnlimitedTelemetryInitializer 11 | { 12 | string appVersion = GetApplicationVersion(); 13 | 14 | private static string GetApplicationVersion() 15 | { 16 | return typeof(PartsUnlimitedTelemetryInitializer).Assembly.GetName().Version.ToString(); 17 | } 18 | //TODO Application Insights - Uncomment 19 | //public void Initialize(ITelemetry telemetry) 20 | //{ 21 | // telemetry.Context.Component.Version = appVersion; 22 | //} 23 | } 24 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/IPartsUnlimitedContext.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using System.Threading.Tasks; 3 | using System; 4 | using System.Data.Entity; 5 | using System.Data.Entity.Infrastructure; 6 | 7 | namespace PartsUnlimited.Models 8 | { 9 | public interface IPartsUnlimitedContext : IDisposable 10 | { 11 | IDbSet CartItems { get; } 12 | IDbSet Categories { get; } 13 | IDbSet OrderDetails { get; } 14 | IDbSet Orders { get; } 15 | IDbSet Products { get; } 16 | IDbSet Users { get; } 17 | IDbSet RainChecks { get; } 18 | IDbSet Stores { get; } 19 | 20 | Task SaveChangesAsync(CancellationToken requestAborted); 21 | DbEntityEntry Entry(object entity); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ch06/Environments/CustomScripts/InstallWebServerModules.ps1: -------------------------------------------------------------------------------- 1 | #use tsl 1.2 2 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 3 | 4 | # Install Nuget, needed to install DSC modules via PowerShellGet 5 | Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force 6 | 7 | # Install required PowerShell Modules 8 | Install-Module -Name cChoco -Force 9 | 10 | function Disable-InternetExplorerESC { 11 | $AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" 12 | $UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" 13 | Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 -Force 14 | Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 -Force 15 | } 16 | 17 | Disable-InternetExplorerESC -------------------------------------------------------------------------------- /ch06/azure-pipelines-with-sonarqube.yml: -------------------------------------------------------------------------------- 1 | pool: 2 | vmImage: 'windows-2019' 3 | variables: 4 | solution: '**/*.sln' 5 | buildPlatform: 'Any CPU' 6 | buildConfiguration: 'Release' 7 | steps: 8 | - task: SonarQubePrepare@5 9 | inputs: 10 | SonarQube: 'SonarQube' 11 | scannerMode: 'MSBuild' 12 | projectKey: 'PacktAzureDevOps_SonarQubeIntegration_AYdUEQCjhz43XvRRVFvc' 13 | - task: NuGetToolInstaller@1 14 | - task: NuGetCommand@2 15 | inputs: 16 | restoreSolution: '$(solution)' 17 | - task: VSBuild@1 18 | inputs: 19 | solution: '$(solution)' 20 | msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' 21 | platform: '$(buildPlatform)' 22 | configuration: '$(buildConfiguration)' 23 | - task: SonarQubeAnalyze@5 -------------------------------------------------------------------------------- /ch08/aws/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "AWSTemplateFormatVersion": "2010-09-09", 3 | "Description": "Imported key pair and EC2 instance", 4 | "Resources": { 5 | "ImportedKeyPair": { 6 | "Type": "AWS::EC2::KeyPair", 7 | "Properties": { 8 | "KeyName": "MyKeyPair", 9 | "PublicKeyMaterial": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICfp1F7DhdWZdqkYAUGCzcBsLmJeu9izpIyGpmmg7eCz example" 10 | } 11 | }, 12 | "Ec2Instance": { 13 | "Type": "AWS::EC2::Instance", 14 | "Properties": { 15 | "ImageId": "ami-0889a44b331db0194", 16 | "KeyName": { 17 | "Ref": "ImportedKeyPair" 18 | } 19 | }, 20 | "DependsOn": [ 21 | "ImportedKeyPair" 22 | ] 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/home/home.component.css: -------------------------------------------------------------------------------- 1 | .results { 2 | display: grid; 3 | column-gap: 14px; 4 | row-gap: 14px; 5 | grid-template-columns: repeat(auto-fill, minmax(300px, 200px)); 6 | margin-top: 50px; 7 | justify-content: space-around; 8 | } 9 | 10 | input[type="text"] { 11 | border: solid 1px var(--primary-color); 12 | padding: 10px; 13 | border-radius: 8px; 14 | margin-right: 4px; 15 | display: inline-block; 16 | width: 30%; 17 | } 18 | 19 | button.reset { 20 | margin-left: 5px; 21 | } 22 | 23 | @media (min-width: 500px) and (max-width: 768px) { 24 | .results { 25 | grid-template-columns: repeat(2, 1fr); 26 | } 27 | 28 | input[type="text"] { 29 | width: 70%; 30 | } 31 | } 32 | 33 | @media (max-width: 200px) { 34 | .results { 35 | grid-template-columns: 1fr; 36 | } 37 | } -------------------------------------------------------------------------------- /ch11/hello_world/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.0' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | tasks.register("clean", Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /ch11/hello_world/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Models/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "dependencies": { 4 | "System.Runtime": "4.0.20-beta-22523", 5 | "Microsoft.AspNet.Mvc": "6.0.0-beta3", 6 | "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta3", 7 | "EntityFramework.SqlServer": "7.0.0-beta3", 8 | "EntityFramework.Commands": "7.0.0-beta3", 9 | "Microsoft.AspNet.StaticFiles": "1.0.0-beta3", 10 | "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta3", 11 | "Microsoft.Framework.OptionsModel": "1.0.0-beta3" 12 | }, 13 | "commands": { 14 | "ef": "EntityFramework.Commands" 15 | }, 16 | "frameworks": { 17 | "aspnet50": { 18 | "dependencies": { 19 | "System.Runtime": "4.0.20-beta-22523" 20 | } 21 | }, 22 | "aspnetcore50": { 23 | "dependencies": { 24 | "System.Runtime": "4.0.20-beta-22523" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ch11/hello_world/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/base.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/category/theming/ 10 | */ 11 | @import url("core.css"); 12 | 13 | @import url("accordion.css"); 14 | @import url("autocomplete.css"); 15 | @import url("button.css"); 16 | @import url("datepicker.css"); 17 | @import url("dialog.css"); 18 | @import url("draggable.css"); 19 | @import url("menu.css"); 20 | @import url("progressbar.css"); 21 | @import url("resizable.css"); 22 | @import url("selectable.css"); 23 | @import url("selectmenu.css"); 24 | @import url("sortable.css"); 25 | @import url("slider.css"); 26 | @import url("spinner.css"); 27 | @import url("tabs.css"); 28 | @import url("tooltip.css"); 29 | -------------------------------------------------------------------------------- /ch07/CalculusService.Tests/CalculusService.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | false 9 | true 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/Account.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"Account.css","sources":["Account.scss","_Settings.scss"],"sourcesContent":[],"mappings":"AAGA;EAAA;IAEE,cAAc;;;AAIhB,YAAY;EAEV,eAAe;EAAjB,YAAY,aAAa,KAAK;IAG3B,YAAY;AAMf,YAAY,mBAAmB,mBAAmB;EAG9C,QAAQ;;AAKZ,aAAa;EAEX,OAAO;EACP,eAAe;;AAIjB,oBAAoB,OAAO;EAGzB,cAAc;EACd,eAAe;AACjB,oBAAoB,IAAI;EAGtB,QAAQ;EACR,YAAY;EACZ,kBCxCiB;EDwCnB,oBAAoB,IAAI,OAAO;IAG5B,SAAS;IACT,QAAQ;EACX,oBAAoB,IAAI,OAAO;IAG5B,kBAAkB;IAClB,YAAY;IAAf,oBAAoB,IAAI,OAAO,cAAc;MAGzC,YAAY;IAChB,oBAAoB,IAAI,OAAO,cAAc,kBAAkB;MAG3D,YAAY;AAGhB,oBAAoB,IAAI,MAAM;EAG5B,YAAY;;AAKd,mBAAmB,eAAe,mBAAmB;EAEnD,SAAS;AAGX,mBAAmB,cAAc;EAE9B,YAAY;EACZ,kBAAkB;EAClB,eAAe;EAAlB,mBAAmB,cAAc,KAAK;IAElC,aAAa;IACb,gBAAgB;AAGpB,mBAAmB;EAGjB,eAAe;;AAKjB;EACC,SAAS;EACT,WAAW;EAEV;IAJF;MAKG,kBAAkB;MAClB,SAAS;EACZ,cAAc;IAEZ,QAAQ;EACV,cAAc;IAEZ,YAAY;IACZ,aAAa;EACf,cAAc;IAEZ,WAAW;IACX,gBAAgB;IAAlB,cAAc,OAAO;MAElB,aAAa","names":[]} -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using System.Web.Mvc; 3 | using System.Web.Routing; 4 | 5 | namespace PartsUnlimited 6 | { 7 | public class RouteConfig 8 | { 9 | public static void RegisterRoutes(RouteCollection routes) 10 | { 11 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 12 | 13 | routes.MapRoute( 14 | name: "default", 15 | url: "{controller}/{action}/{id}", 16 | defaults: new {controller = "Home", action = "Index", id = UrlParameter.Optional}, 17 | namespaces: new string[] { "PartsUnlimited.Controllers" }); 18 | 19 | routes.MapHttpRoute( 20 | name: "API Default", 21 | routeTemplate: "api/{controller}/{id}", 22 | defaults: new { id = RouteParameter.Optional } 23 | ); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /ch09/aws/deployment-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "serviceName": "SERVICENAME", 3 | "containers": { 4 | "cart": { 5 | "image": "AWSACCOUNTID.dkr.ecr.AWSREGION.amazonaws.com/packt-store-cart:CONTAINERTAG", 6 | "environment": { 7 | "NODE_ENV": "production", 8 | "PORT": "5075", 9 | "REDIS_HOST": "localhost", 10 | "REDIS_PORT": "6379" 11 | }, 12 | "ports": { 13 | "5075": "HTTP" 14 | } 15 | }, 16 | "redis": { 17 | "image": "redis/redis-stack:latest", 18 | "ports": { 19 | "6379": "TCP" 20 | } 21 | } 22 | }, 23 | "publicEndpoint": { 24 | "containerName": "cart", 25 | "containerPort": 5075, 26 | "healthCheck": { 27 | "healthyThreshold": 2, 28 | "intervalSeconds": 30, 29 | "path": "/health", 30 | "successCodes": "200-499", 31 | "timeoutSeconds": 5, 32 | "unhealthyThreshold": 2 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ch11/hello_world/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ch10/iac/aws/cart/deployment-template.json: -------------------------------------------------------------------------------- 1 | { 2 | "serviceName": "SERVICENAME", 3 | "containers": { 4 | "cart": { 5 | "image": "AWSACCOUNTID.dkr.ecr.AWSREGION.amazonaws.com/packt-store-cart:CONTAINERTAG", 6 | "environment": { 7 | "NODE_ENV": "production", 8 | "PORT": "5075", 9 | "REDIS_HOST": "localhost", 10 | "REDIS_PORT": "6379" 11 | }, 12 | "ports": { 13 | "5075": "HTTP" 14 | } 15 | }, 16 | "redis": { 17 | "image": "redis/redis-stack:latest", 18 | "ports": { 19 | "6379": "TCP" 20 | } 21 | } 22 | }, 23 | "publicEndpoint": { 24 | "containerName": "cart", 25 | "containerPort": 5075, 26 | "healthCheck": { 27 | "healthyThreshold": 2, 28 | "intervalSeconds": 30, 29 | "path": "/health", 30 | "successCodes": "200-499", 31 | "timeoutSeconds": 5, 32 | "unhealthyThreshold": 2 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Shared/DemoLinkDisplay.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Demo link display page - Not for production use"; 3 | } 4 | 5 |
    6 |

    @ViewBag.Title

    7 |
    8 |
    9 |
    10 |

    11 | Demo link display page - Not for production use. 12 |

    13 | 14 | @if (ViewBag.Link != null) 15 | { 16 |

    17 | For DEMO only: You can click this link to confirm the email: [[link]] 18 |
    19 | Please change this code to register an email service in IdentityConfig to send an email. 20 |

    21 | } 22 |
    23 |
    24 |
    25 |
    26 |
    -------------------------------------------------------------------------------- /ch11/hello_world/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Security/ConfigurationLoginProviders.cs: -------------------------------------------------------------------------------- 1 | namespace PartsUnlimited.Security 2 | { 3 | public class ConfigurationLoginProviders : ILoginProviders 4 | { 5 | public ConfigurationLoginProviders() 6 | { 7 | Facebook = GetProvider("Facebook"); 8 | Google = GetProvider("Google"); 9 | Microsoft = GetProvider("Microsoft"); 10 | Twitter = GetProvider("Twitter"); 11 | } 12 | 13 | private ILoginProviderCredentials GetProvider(string providerName) 14 | { 15 | return new ConfigurationLoginProviderCredentials(providerName); 16 | } 17 | 18 | public ILoginProviderCredentials Facebook { get; private set; } 19 | public ILoginProviderCredentials Google { get; private set; } 20 | public ILoginProviderCredentials Microsoft { get; private set; } 21 | public ILoginProviderCredentials Twitter { get; private set; } 22 | } 23 | } -------------------------------------------------------------------------------- /ch08/terraform/azure-pipelines-deploy.yml: -------------------------------------------------------------------------------- 1 | # Terraform pipeline 2 | trigger: 3 | - main 4 | pool: 5 | vmImage: ubuntu-latest 6 | steps: 7 | - task: TerraformInstaller@0 8 | displayName: 'install' 9 | inputs: 10 | terraformVersion: 'latest' 11 | - task: TerraformTaskV4@4 12 | displayName: 'init' 13 | inputs: 14 | provider: 'azurerm' 15 | command: 'init' 16 | backendServiceArm: 'azure-packt-rg' 17 | backendAzureRmResourceGroupName: 'tfstate' 18 | backendAzureRmStorageAccountName: 'tfstate20230519' 19 | backendAzureRmContainerName: 'tfstate' 20 | backendAzureRmKey: 'terraform.tfstate' 21 | - task: TerraformTaskV4@4 22 | displayName: 'plan' 23 | inputs: 24 | provider: 'azurerm' 25 | command: 'plan' 26 | environmentServiceNameAzureRM: 'azure-packt-rg' 27 | - task: TerraformTaskV4@4 28 | displayName: 'apply' 29 | inputs: 30 | provider: 'azurerm' 31 | command: 'apply' 32 | environmentServiceNameAzureRM: 'azure-packt-rg' 33 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/config.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { HttpClient } from '@angular/common/http'; 3 | import { AppConfig } from './app-config'; 4 | 5 | @Injectable({ 6 | providedIn: 'root' 7 | }) 8 | export class ConfigService { 9 | private config: AppConfig = {}; 10 | 11 | constructor(private http: HttpClient) { } 12 | 13 | async loadConfig(): Promise { 14 | return this.http.get('./assets/config/app.config.json').toPromise() 15 | .then(data => { 16 | this.config = data as AppConfig; 17 | }); 18 | } 19 | 20 | getConfig(): AppConfig { 21 | return this.config; 22 | } 23 | 24 | getCatalogApiUrl(): string { 25 | return this.config.catalogApiUrl as string; 26 | } 27 | 28 | getCartApiUrl(): string { 29 | return this.config.cartApiUrl as string; 30 | } 31 | 32 | getCheckoutApiUrl(): string { 33 | return this.config.checkoutApiUrl as string; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Bootstrapper.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using Microsoft.Practices.Unity; 3 | using Unity.Mvc4; 4 | 5 | namespace PartsUnlimited 6 | { 7 | public static class Bootstrapper 8 | { 9 | public static IUnityContainer Initialise() 10 | { 11 | var container = BuildUnityContainer(); 12 | 13 | DependencyResolver.SetResolver(new UnityDependencyResolver(container)); 14 | 15 | return container; 16 | } 17 | 18 | private static IUnityContainer BuildUnityContainer() 19 | { 20 | var container = new UnityContainer(); 21 | 22 | // register all your components with the container here 23 | // it is NOT necessary to register your controllers 24 | 25 | // e.g. container.RegisterType(); 26 | RegisterTypes(container); 27 | 28 | return container; 29 | } 30 | 31 | public static void RegisterTypes(IUnityContainer container) 32 | { 33 | 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/src/app/product.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, inject } from '@angular/core'; 2 | import { Product } from './product'; 3 | import { ConfigService } from './config.service'; 4 | 5 | @Injectable({ 6 | providedIn: 'root' 7 | }) 8 | export class ProductService { 9 | 10 | configService: ConfigService = inject(ConfigService); 11 | url = this.configService.getCatalogApiUrl(); 12 | 13 | constructor() { } 14 | 15 | async getAllProducts(): Promise { 16 | const data = await fetch(this.url + 'products'); 17 | return await data.json() ?? []; 18 | } 19 | 20 | async getProductBySku(sku: string): Promise { 21 | const data = await fetch(this.url + 'products/' + sku); 22 | return await data.json() ?? {}; 23 | } 24 | 25 | submitApplication(firstName: string, lastName: string, email: string) { 26 | console.log(`Homes application received: firstName: ${firstName}, lastName: ${lastName}, email: ${email}.`); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/themes/base/accordion.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Accordion 1.11.4 3 | * http://jqueryui.com 4 | * 5 | * Copyright jQuery Foundation and other contributors 6 | * Released under the MIT license. 7 | * http://jquery.org/license 8 | * 9 | * http://api.jqueryui.com/accordion/#theming 10 | */ 11 | .ui-accordion .ui-accordion-header { 12 | display: block; 13 | cursor: pointer; 14 | position: relative; 15 | margin: 2px 0 0 0; 16 | padding: .5em .5em .5em .7em; 17 | min-height: 0; /* support: IE7 */ 18 | font-size: 100%; 19 | } 20 | .ui-accordion .ui-accordion-icons { 21 | padding-left: 2.2em; 22 | } 23 | .ui-accordion .ui-accordion-icons .ui-accordion-icons { 24 | padding-left: 2.2em; 25 | } 26 | .ui-accordion .ui-accordion-header .ui-accordion-header-icon { 27 | position: absolute; 28 | left: .5em; 29 | top: 50%; 30 | margin-top: -8px; 31 | } 32 | .ui-accordion .ui-accordion-content { 33 | padding: 1em 2.2em; 34 | border-top: 0; 35 | overflow: auto; 36 | } 37 | -------------------------------------------------------------------------------- /ch10/apps/checkout/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base 2 | RUN apt-get update 3 | RUN apt-get install -y curl 4 | WORKDIR /app 5 | EXPOSE 5015 6 | 7 | ENV ASPNETCORE_URLS=http://+:5015 8 | 9 | # Creates a non-root user with an explicit UID and adds permission to access the /app folder 10 | # For more info, please refer to https://aka.ms/vscode-docker-dotnet-configure-containers 11 | RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app 12 | USER appuser 13 | 14 | FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build 15 | WORKDIR "/apps/checkout" 16 | COPY ["checkout.csproj", "/apps/checkout/"] 17 | RUN dotnet restore "checkout.csproj" 18 | COPY . . 19 | RUN dotnet build "checkout.csproj" -c Release -o /app/build 20 | 21 | FROM build AS publish 22 | RUN dotnet publish "checkout.csproj" -c Release -o /app/publish /p:UseAppHost=false 23 | 24 | FROM base AS final 25 | WORKDIR /app 26 | COPY --from=publish /app/publish . 27 | ENTRYPOINT ["dotnet", "checkout.dll"] 28 | -------------------------------------------------------------------------------- /ch11/hello_world/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ch09/aws/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "AWSTemplateFormatVersion": "2010-09-09", 3 | "Description": "Packt Store Cart Service", 4 | "Parameters": {}, 5 | "Resources": { 6 | "CartContainer": { 7 | "Type": "AWS::Lightsail::Container", 8 | "Properties": { 9 | "ContainerServiceDeployment": { 10 | "Containers": [ 11 | { 12 | "ContainerName": "redis", 13 | "Image": "redis/redis-stack:latest", 14 | "Ports": [ 15 | { 16 | "Port": 6379, 17 | "Protocol": "TCP" 18 | } 19 | ] 20 | } 21 | ] 22 | }, 23 | "IsDisabled": false, 24 | "Power": "micro", 25 | "Scale": 1, 26 | "ServiceName": { "Ref": "AWS::StackName" } 27 | } 28 | } 29 | }, 30 | "Outputs": { 31 | "CartUrl": { 32 | "Description": "URL of the cart service", 33 | "Value": { "Fn::GetAtt": ["CartContainer", "Url"] } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ch10/iac/aws/cart/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "AWSTemplateFormatVersion": "2010-09-09", 3 | "Description": "Packt Store Cart Service", 4 | "Parameters": {}, 5 | "Resources": { 6 | "CartContainer": { 7 | "Type": "AWS::Lightsail::Container", 8 | "Properties": { 9 | "ContainerServiceDeployment": { 10 | "Containers": [ 11 | { 12 | "ContainerName": "redis", 13 | "Image": "redis/redis-stack:latest", 14 | "Ports": [ 15 | { 16 | "Port": 6379, 17 | "Protocol": "TCP" 18 | } 19 | ] 20 | } 21 | ] 22 | }, 23 | "IsDisabled": false, 24 | "Power": "micro", 25 | "Scale": 1, 26 | "ServiceName": { "Ref": "AWS::StackName" } 27 | } 28 | } 29 | }, 30 | "Outputs": { 31 | "CartUrl": { 32 | "Description": "URL of the cart service", 33 | "Value": { "Fn::GetAtt": ["CartContainer", "Url"] } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ch10/apps/frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "noImplicitOverride": true, 10 | "noPropertyAccessFromIndexSignature": true, 11 | "noImplicitReturns": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "sourceMap": true, 14 | "declaration": false, 15 | "downlevelIteration": true, 16 | "experimentalDecorators": true, 17 | "moduleResolution": "node", 18 | "importHelpers": true, 19 | "target": "ES2022", 20 | "module": "ES2022", 21 | "useDefineForClassFields": false, 22 | "lib": [ 23 | "ES2022", 24 | "dom" 25 | ] 26 | }, 27 | "angularCompilerOptions": { 28 | "enableI18nLegacyMessageIdFormat": false, 29 | "strictInjectionParameters": true, 30 | "strictInputAccessModifiers": true, 31 | "strictTemplates": true 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/Views/Customer/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.ApplicationUser 2 | 3 | @{ 4 | ViewBag.Title = string.Format("Customer - {0}", Model.UserName); 5 | } 6 | 7 |
    8 | 9 |
    10 |
    11 | Customer Information 12 |
    13 |
    14 |
    15 |
    16 |
    17 |
    Username
    18 |
    @Model.UserName
    19 |
    20 |
    21 |
    22 |
    23 |
    Phone Number
    24 |
    @Model.PhoneNumber
    25 |
    26 |
    27 |
    28 |
    29 |
    Email
    30 |
    @Model.Email
    31 |
    32 |
    33 |
    34 |
    35 |
    36 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Unity.Mvc4.README.txt: -------------------------------------------------------------------------------- 1 | Getting started with Unity.Mvc4 2 | ------------------------------- 3 | 4 | To get started, just add a call to Bootstrapper.Initialise() in the Application_Start method of Global.asax.cs 5 | and the MVC framework will then use the Unity.Mvc4 DependencyResolver to resolve your components. 6 | 7 | There is code in the bootstrapper to initialise the Unity container. Any components that you need to inject should be 8 | registered in the BuildUnityContainer method of the Bootstrapper. All components that implement IDisposable should be 9 | registered with the HierarchicalLifetimeManager to ensure that theey are properly disposed at the end of the request. 10 | 11 | It is typically not necessary to register your controllers with Unity. 12 | 13 | The readme has been copyied from Unity.MVC3 as this is a package just to support MVC4, the unity portion is identical. 14 | You can find out more about Unity.Mvc3 by visiting: 15 | 16 | http://devtrends.co.uk/blog/introducing-the-unity.mvc3-nuget-package-to-reconcile-mvc3-unity-and-idisposable -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/ViewModels/OrdersModel.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace PartsUnlimited.ViewModels 6 | { 7 | public class OrdersModel 8 | { 9 | public bool IsAdminSearch { get; private set; } 10 | public string InvalidOrderSearch { get; private set; } 11 | public IEnumerable Orders { get; private set; } 12 | public string Username { get; private set; } 13 | public DateTimeOffset StartDate { get; private set; } 14 | public DateTimeOffset EndDate { get; private set; } 15 | 16 | public OrdersModel(IEnumerable orders, string username, DateTimeOffset startDate, DateTimeOffset endDate, string invalidOrderSearch, bool isAdminSearch) 17 | { 18 | Orders = orders; 19 | Username = username; 20 | StartDate = startDate; 21 | EndDate = endDate; 22 | InvalidOrderSearch = invalidOrderSearch; 23 | IsAdminSearch = isAdminSearch; 24 | } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ch10/apps/catalog/Dockerfile: -------------------------------------------------------------------------------- 1 | # For more information, please refer to https://aka.ms/vscode-docker-python 2 | FROM python:3.11.3-slim 3 | RUN apt-get update 4 | RUN apt-get install -y curl 5 | EXPOSE 5050 6 | 7 | # Keeps Python from generating .pyc files in the container 8 | ENV PYTHONDONTWRITEBYTECODE=1 9 | 10 | # Turns off buffering for easier container logging 11 | ENV PYTHONUNBUFFERED=1 12 | 13 | # Install pip requirements 14 | COPY requirements.txt . 15 | RUN python -m pip install --no-cache-dir -r requirements.txt 16 | 17 | WORKDIR /app 18 | COPY . /app 19 | 20 | # Creates a non-root user with an explicit UID and adds permission to access the /app folder 21 | # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers 22 | RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app 23 | USER appuser 24 | 25 | # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug 26 | CMD exec gunicorn --bind 0.0.0.0:5050 --workers 1 --threads 8 --timeout 0 app:app 27 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/HtmlHelperExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | 5 | namespace PartsUnlimited.Utils 6 | { 7 | public static class HtmlHelperExtensions 8 | { 9 | public static HtmlString Image(this HtmlHelper helper, string src, string alt = null) 10 | { 11 | if (string.IsNullOrWhiteSpace(src)) 12 | { 13 | throw new ArgumentOutOfRangeException("src", src, "Must not be null or whitespace"); 14 | } 15 | 16 | var img = new TagBuilder("img"); 17 | 18 | img.MergeAttribute("src", GetCdnSource(src)); 19 | 20 | if (!string.IsNullOrWhiteSpace(alt)) 21 | { 22 | img.MergeAttribute("alt", alt); 23 | } 24 | 25 | return new HtmlString(img.ToString(TagRenderMode.SelfClosing)); 26 | } 27 | 28 | private static string GetCdnSource(string src) 29 | { 30 | return string.Format("{0}/{1}", ConfigurationHelpers.GetString("ImagePath"), src); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Shared/_AdminMenu.cshtml: -------------------------------------------------------------------------------- 1 | @using PartsUnlimited.Areas.Admin 2 | 3 | @{ 4 | var claims = User.Identity as System.Security.Claims.ClaimsIdentity; 5 | var isAdmin = claims.HasClaim(AdminConstants.ManageStore.Name, AdminConstants.ManageStore.Allowed); 6 | } 7 | 8 | @if (isAdmin) 9 | { 10 | 19 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Utils/SignalRDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Microsoft.AspNet.SignalR; 5 | using Microsoft.Practices.Unity; 6 | 7 | namespace PartsUnlimited.Utils 8 | { 9 | public class SignalRDependencyResolver : DefaultDependencyResolver 10 | { 11 | private readonly IUnityContainer inner = Global.UnityContainer.CreateChildContainer(); 12 | 13 | public override object GetService(Type serviceType) 14 | { 15 | try 16 | { 17 | if (serviceType.Name == "NewtownSoft.Serializer") 18 | { 19 | return inner.Resolve(serviceType); 20 | } 21 | return base.GetService(serviceType); 22 | } 23 | catch (ResolutionFailedException) 24 | { 25 | return base.GetService(serviceType); 26 | } 27 | } 28 | 29 | public override IEnumerable GetServices(Type serviceType) 30 | { 31 | return inner.ResolveAll(serviceType).Concat(base.GetServices(serviceType)); 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /ch10/apps/checkout/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:50580", 7 | "sslPort": 44366 8 | } 9 | }, 10 | "profiles": { 11 | "http": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "http://localhost:5015", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "https": { 21 | "commandName": "Project", 22 | "dotnetRunMessages": true, 23 | "launchBrowser": true, 24 | "applicationUrl": "https://localhost:7091;http://localhost:5015", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | }, 29 | "IIS Express": { 30 | "commandName": "IISExpress", 31 | "launchBrowser": true, 32 | "environmentVariables": { 33 | "ASPNETCORE_ENVIRONMENT": "Development" 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ch11/hello_world/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hello_world", 3 | "short_name": "hello_world", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /ch11/hello_world/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ch11/hello_world/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /ch10/apps/frontend/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558 3 | "version": "2.0.0", 4 | "tasks": [ 5 | { 6 | "type": "npm", 7 | "script": "start", 8 | "isBackground": true, 9 | "problemMatcher": { 10 | "owner": "typescript", 11 | "pattern": "$tsc", 12 | "background": { 13 | "activeOnStart": true, 14 | "beginsPattern": { 15 | "regexp": "(.*?)" 16 | }, 17 | "endsPattern": { 18 | "regexp": "bundle generation complete" 19 | } 20 | } 21 | } 22 | }, 23 | { 24 | "type": "npm", 25 | "script": "test", 26 | "isBackground": true, 27 | "problemMatcher": { 28 | "owner": "typescript", 29 | "pattern": "$tsc", 30 | "background": { 31 | "activeOnStart": true, 32 | "beginsPattern": { 33 | "regexp": "(.*?)" 34 | }, 35 | "endsPattern": { 36 | "regexp": "bundle generation complete" 37 | } 38 | } 39 | } 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /ch10/apps/frontend/src/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { loadConfig } from './app/app.module'; 4 | import { AppComponent } from './app/app.component'; 5 | import { provideAnimations } from '@angular/platform-browser/animations'; 6 | import { withInterceptorsFromDi, provideHttpClient } from '@angular/common/http'; 7 | import { AppRoutingModule } from './app/app-routing.module'; 8 | import { BrowserModule, bootstrapApplication } from '@angular/platform-browser'; 9 | import { APP_INITIALIZER, importProvidersFrom } from '@angular/core'; 10 | import { ConfigService } from './app/config.service'; 11 | 12 | 13 | bootstrapApplication(AppComponent, { 14 | providers: [ 15 | importProvidersFrom(BrowserModule, AppRoutingModule), 16 | ConfigService, 17 | { 18 | provide: APP_INITIALIZER, 19 | useFactory: loadConfig, 20 | deps: [ConfigService], 21 | multi: true 22 | }, 23 | provideHttpClient(withInterceptorsFromDi()), 24 | provideAnimations() 25 | ] 26 | }) 27 | .catch(err => console.error(err)); 28 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Data.Entity; 3 | using System.Web; 4 | using System.Web.Http; 5 | using System.Web.Mvc; 6 | using System.Web.Optimization; 7 | using System.Web.Routing; 8 | using Microsoft.Practices.Unity; 9 | using PartsUnlimited.Utils; 10 | using Unity.Mvc4; 11 | 12 | namespace PartsUnlimited 13 | { 14 | public class Global : HttpApplication 15 | { 16 | internal static IUnityContainer UnityContainer; 17 | 18 | protected void Application_Start(object sender, EventArgs e) 19 | { 20 | AreaRegistration.RegisterAllAreas(); 21 | 22 | Database.SetInitializer(new PartsUnlimitedDbInitializer()); 23 | 24 | UnityContainer = UnityConfig.BuildContainer(); 25 | DependencyResolver.SetResolver(new UnityDependencyResolver(UnityContainer)); 26 | GlobalConfiguration.Configure(WebApiConfig.Register); 27 | RouteConfig.RegisterRoutes(RouteTable.Routes); 28 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 29 | BundleConfig.RegisterBundles(BundleTable.Bundles); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /ch10/iac/helm-charts/catalog/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "catalog.fullname" . }} 6 | labels: 7 | {{- include "catalog.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "catalog.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /ch10/apps/frontend/README.md: -------------------------------------------------------------------------------- 1 | # Frontend 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.0.3. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. 28 | -------------------------------------------------------------------------------- /ch11/hello_world/android/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "376533264780", 4 | "project_id": "flutter-demo-2f4bd", 5 | "storage_bucket": "flutter-demo-2f4bd.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:376533264780:android:01f9ad65e6e512461a8ea9", 11 | "android_client_info": { 12 | "package_name": "com.company.flutter" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "376533264780-6lm9m7u983pbttv2te6k7afoih8p080e.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyCWxn6Cbt01UFyt5vvV5hKBtX3OActIOAQ" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "376533264780-6lm9m7u983pbttv2te6k7afoih8p080e.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | } 37 | ], 38 | "configuration_version": "1" 39 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/App_Start/UnityConfig.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Practices.Unity; 2 | using PartsUnlimited.Models; 3 | using PartsUnlimited.ProductSearch; 4 | using PartsUnlimited.Recommendations; 5 | using PartsUnlimited.Utils; 6 | 7 | namespace PartsUnlimited 8 | { 9 | public class UnityConfig 10 | { 11 | public static UnityContainer BuildContainer() 12 | { 13 | var container = new UnityContainer(); 14 | 15 | container.RegisterType(); 16 | container.RegisterType(); 17 | container.RegisterType(); 18 | container.RegisterType(); 19 | container.RegisterType(); 20 | container.RegisterType(); 21 | container.RegisterType(); 22 | 23 | container.RegisterInstance(container.Resolve()); 24 | 25 | return container; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/ShoppingCart.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ShoppingCart.css","sources":["ShoppingCart.scss","_Settings.scss"],"sourcesContent":[],"mappings":"AAIE;EAFF,oBAAoB;IAGlB,SAAS;IAAX,oBAAoB,QAAQ,IAAI,oBAAoB,QAAQ;MAGzD,aAAa;MACb,cAAc;AAGjB,oBAAoB,QAAQ;EAE1B,QAAQ;EAAV,oBAAoB,QAAQ,cAAc;IAGvC,SAAS;IACT,aAAa;IACb,WAAW;EACd,oBAAoB,QAAQ,cAAc;IAEvC,kBAAkB;IAClB,eAAe;IACf,UAAU;IACV,SAAS;IAET;MAPH,oBAAoB,QAAQ,cAAc;QAQtC,eAAe;QACf,gBAAgB;QAChB,eAAe;IAGnB,oBAAoB,QAAQ,cAAc,WAAW,KAAK;MAGrD,WAAU;MAEV;QALL,oBAAoB,QAAQ,cAAc,WAAW,KAAK;UAMpD,WAAU;IAEhB,oBAAoB,QAAQ,cAAc,WAAW,OAAO;MAGvD,QAAQ;IACb,oBAAoB,QAAQ,cAAc,WAAW,KAAK;MAGpD,QAAQ;MACR,aAAa;MACZ,WAAW;MAEb;QAPL,oBAAoB,QAAQ,cAAc,WAAW,KAAK;UAQnD,aAAa;UACb,QAAQ;IAEf,oBAAoB,QAAQ,cAAc,WAAW,KAAK;MAGpD,WAAW;MAEZ;QALL,oBAAoB,QAAQ,cAAc,WAAW,KAAK;UAMnD,WAAW;UACX,aAAa;UACd,OC/DU;IDmEZ;MAAJ,oBAAoB,QAAQ,cAAc,WAAW,KAAK;QAGrD,QAAQ;;MACb,oBAAoB,QAAQ,cAAc,WAAW,KAAK;QAGpD,kBCtEa;QDuEb,QAAQ;;IAId,oBAAoB,QAAQ,cAAc,WAAW,KAAK,aAAa;MAEjE,WAAU;MAEX,QAAQ;IAEb,oBAAoB,QAAQ,cAAc,WAAW,KAAK;MAGrD,UAAU;MACV,OAAO;MACP,QAAQ;MACR,SAAS;MACT,QAAQ;MAAb,oBAAoB,QAAQ,cAAc,WAAW,KAAK,kBAAkB;QAEtE,WAAW;AAKjB,oBAAoB,QAAQ;EAG1B,eAAe;EACf;IAJF,oBAAoB,QAAQ;MAKzB,eAAe;AAElB,oBAAoB,QAAQ;EAGzB,QAAQ;EACR,SAAS;;AAKZ,eAAe;EAEb,WAAW","names":[]} -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Scripts/AppInsights.js: -------------------------------------------------------------------------------- 1 | var appInsights = window.appInsights || function (config) { 2 | function s(config) { 3 | t[config] = function () { 4 | var i = arguments; 5 | t.queue.push(function () { 6 | t[config].apply(t, i) 7 | }) 8 | } 9 | } 10 | 11 | var t = { 12 | config: config 13 | }, 14 | r = document, 15 | f = window, 16 | e = "script", 17 | o = r.createElement(e), 18 | i, u; 19 | 20 | for (o.src = config.url || "//az416426.vo.msecnd.net/scripts/a/ai.0.js", r.getElementsByTagName(e)[0].parentNode.appendChild(o), t.cookie = r.cookie, t.queue = [], i = ["Event", "Exception", "Metric", "PageView", "Trace"]; i.length;) { 21 | s("track" + i.pop()); 22 | } 23 | 24 | return config.disableExceptionTracking || (i = "onerror", s("_" + i), u = f[i], f[i] = function (config, r, f, e, o) { 25 | var s = u && u(config, r, f, e, o); 26 | return s !== !0 && t["_" + i](config, r, f, e, o), s 27 | }), t 28 | }({ 29 | instrumentationKey: ApplicationInsightsInstrumentationKey 30 | }); 31 | 32 | window.appInsights = appInsights; 33 | appInsights.trackPageView(); -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Areas/Admin/Views/Customer/Find.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Find Customers"; 3 | } 4 | 5 |

    Search for customers:

    6 | 7 |
    8 |
    9 |
    10 | @using (Html.BeginForm("Find", "Customer", FormMethod.Get)) 11 | { 12 |
    13 | 14 | 15 |
    16 |
    17 | 18 | 19 |
    20 |
    21 | 22 | 23 |
    24 | 25 | } 26 |
    27 |
    28 |
    -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Shared/_OrderCostSummary.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.OrderCostSummary 2 | 3 | 4 |
    5 |
    6 |
    7 |
    8 |
    Sub Total
    9 |
    @Model.CartSubTotal
    10 |
    11 |
    12 |
    Shipping
    13 |
    @Model.CartShipping
    14 |
    15 |
    16 |
    Tax
    17 |
    @Model.CartTax
    18 |
    19 |
    20 |
    21 |
    22 |
    Total
    23 |
    @Model.CartTotal
    24 |
    25 |
    26 |
    27 |
    28 |
    29 | -------------------------------------------------------------------------------- /ch11/hello_world/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:hello_world/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /ch06/Environments/nestedtemplates/vNet.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "vNetName": { 6 | "type": "string", 7 | "minLength": 1 8 | } 9 | }, 10 | "variables": { 11 | "vNetPrefix": "10.0.0.0/16", 12 | "vNetSubnet1Name": "Subnet-1", 13 | "vNetSubnet1Prefix": "10.0.0.0/24" 14 | }, 15 | "resources": [ 16 | { 17 | "name": "[parameters('vNetName')]", 18 | "type": "Microsoft.Network/virtualNetworks", 19 | "location": "[resourceGroup().location]", 20 | "apiVersion": "2016-03-30", 21 | "dependsOn": [ ], 22 | "tags": { 23 | "displayName": "vNet" 24 | }, 25 | "properties": { 26 | "addressSpace": { 27 | "addressPrefixes": [ 28 | "[variables('vNetPrefix')]" 29 | ] 30 | }, 31 | "subnets": [ 32 | { 33 | "name": "[variables('vNetSubnet1Name')]", 34 | "properties": { 35 | "addressPrefix": "[variables('vNetSubnet1Prefix')]" 36 | } 37 | } 38 | ] 39 | } 40 | } 41 | ], 42 | "outputs": { 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /ch11/hello_world/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /ch07/azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # Build and test .NET projects. 2 | trigger: 3 | - main 4 | 5 | pool: 6 | vmImage: 'windows-latest' 7 | 8 | variables: 9 | solution: '**/*.sln' 10 | buildPlatform: 'Any CPU' 11 | buildConfiguration: 'Debug' 12 | 13 | steps: 14 | - task: NuGetToolInstaller@1 15 | - task: NuGetCommand@2 16 | inputs: 17 | restoreSolution: '$(solution)' 18 | - task: VSBuild@1 19 | inputs: 20 | solution: '$(solution)' 21 | msbuildArgs: '/p:PackageAsSingleFile=true /p:PackageLocation="$(build.artifactStagingDirectory)"' 22 | platform: '$(buildPlatform)' 23 | configuration: '$(buildConfiguration)' 24 | - task: VSTest@2 25 | inputs: 26 | testSelector: 'testAssemblies' 27 | testAssemblyVer2: | 28 | **\*.Tests.dll 29 | !**\*TestAdapter.dll 30 | !**\obj\** 31 | searchFolder: '$(System.DefaultWorkingDirectory)' 32 | codeCoverageEnabled: true 33 | platform: '$(buildPlatform)' 34 | configuration: '$(buildConfiguration)' 35 | - task: BuildQualityChecks@8 36 | inputs: 37 | checkWarnings: true 38 | warningFailOption: 'build' 39 | checkCoverage: true 40 | coverageFailOption: 'build' 41 | coverageType: 'blocks' 42 | forceCoverageImprovement: true 43 | coverageUpperThreshold: '80' 44 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/api/RaincheckController.cs: -------------------------------------------------------------------------------- 1 | using PartsUnlimited.Models; 2 | using PartsUnlimited.Utils; 3 | using System.Collections.Generic; 4 | using System.Threading.Tasks; 5 | using System.Web.Http; 6 | using System.Web.Mvc; 7 | 8 | namespace PartsUnlimited.Api 9 | { 10 | [System.Web.Http.RoutePrefix("api/raincheck")] 11 | public class RaincheckController : ApiController 12 | { 13 | private readonly IRaincheckQuery _query; 14 | 15 | public RaincheckController(IRaincheckQuery query) 16 | { 17 | _query = query; 18 | } 19 | 20 | [System.Web.Http.HttpGet, System.Web.Http.Route, System.Web.Http.ActionName("GetAll")] 21 | public Task> Get() 22 | { 23 | return _query.GetAllAsync(); 24 | } 25 | 26 | [System.Web.Http.HttpGet, System.Web.Http.Route("{id}"), System.Web.Http.ActionName("GetOne")] 27 | public Task Get(int id) 28 | { 29 | return _query.FindAsync(id); 30 | } 31 | 32 | [System.Web.Http.HttpPost, System.Web.Http.Route, System.Web.Http.ActionName("Save")] 33 | public Task Post([FromBody]Raincheck raincheck) 34 | { 35 | return _query.AddAsync(raincheck); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.Owin.Security 2 | @model PartsUnlimited.Models.ExternalLoginListViewModel 3 | 4 | @{ 5 | var loginProviders = Model.AuthenticationManager.GetExternalAuthenticationTypes(); 6 | } 7 | 8 |

    Use another service to log in

    9 | @if (loginProviders.Any()) 10 | { 11 | using (Html.BeginForm("ExternalLogin", "Account", new { ReturnUrl = Model.ReturnUrl })) 12 | { 13 | @Html.AntiForgeryToken() 14 |
    15 | @foreach (AuthenticationDescription p in loginProviders.Where(a => a.Caption != null)) 16 | { 17 |
    18 | 19 |
    20 | } 21 |
    22 | } 23 | } 24 | else 25 | { 26 |
    27 |

    28 | There are no external authentication services configured. See this article 29 | for details on setting up this ASP.NET application to support logging in via external services. 30 |

    31 |
    32 | } 33 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/App_Start/WebApiConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Http; 2 | using Microsoft.Practices.Unity; 3 | using Unity.WebApi; 4 | 5 | namespace PartsUnlimited 6 | { 7 | public class WebApiConfig 8 | { 9 | public static void RegisterWebApi(HttpConfiguration config, IUnityContainer container) 10 | { 11 | config.DependencyResolver = new UnityDependencyResolver(container); 12 | 13 | // Web API routes 14 | config.MapHttpAttributeRoutes(); 15 | 16 | config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; 17 | 18 | config.Routes.MapHttpRoute( 19 | name: "API Default", 20 | routeTemplate: "api/{controller}/{id}", 21 | defaults: new { id = RouteParameter.Optional } 22 | ); 23 | } 24 | 25 | public static void Register(HttpConfiguration config) 26 | { 27 | config.DependencyResolver = new UnityDependencyResolver(UnityConfig.BuildContainer()); 28 | 29 | // Web API routes 30 | config.MapHttpAttributeRoutes(); 31 | 32 | config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model PartsUnlimited.Models.SendCodeViewModel 2 | @{ 3 | ViewBag.Title = "Send"; 4 | } 5 |
    6 |

    @ViewBag.Title

    7 |
    8 |
    9 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 10 | { 11 | @Html.AntiForgeryToken() 12 | @Html.Hidden("rememberMe", @Model.RememberMe) 13 |

    Send verification code

    14 |
    15 | 16 |
    17 | 18 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers, new { @class = "form-control"}) 19 |
    20 | 21 |
    22 | 23 |
    24 |
    25 | } 26 |
    27 |
    28 |
    29 |
    30 | @section Scripts { 31 | @Scripts.Render("~/bundles/jquery.validate") 32 | } -------------------------------------------------------------------------------- /ch10/apps/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "watch": "ng build --watch --configuration development", 9 | "test": "ng test" 10 | }, 11 | "private": true, 12 | "dependencies": { 13 | "@angular/animations": "^16.0.0", 14 | "@angular/cdk": "^16.0.3", 15 | "@angular/common": "^16.0.0", 16 | "@angular/compiler": "^16.0.0", 17 | "@angular/core": "^16.0.0", 18 | "@angular/forms": "^16.0.0", 19 | "@angular/material": "^16.0.3", 20 | "@angular/platform-browser": "^16.0.0", 21 | "@angular/platform-browser-dynamic": "^16.0.0", 22 | "@angular/router": "^16.0.0", 23 | "ngx-cookie-service": "^16.0.0", 24 | "rxjs": "~7.8.0", 25 | "tslib": "^2.3.0", 26 | "zone.js": "~0.13.0" 27 | }, 28 | "devDependencies": { 29 | "@angular-devkit/build-angular": "^16.0.3", 30 | "@angular/cli": "~16.0.3", 31 | "@angular/compiler-cli": "^16.0.0", 32 | "@types/jasmine": "~4.3.0", 33 | "jasmine-core": "~4.6.0", 34 | "karma": "~6.4.0", 35 | "karma-chrome-launcher": "~3.2.0", 36 | "karma-coverage": "~2.2.0", 37 | "karma-jasmine": "~5.1.0", 38 | "karma-jasmine-html-reporter": "~2.0.0", 39 | "typescript": "~5.0.2" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /ch06/PartsUnlimitedWebsite/Content/Store.min.css: -------------------------------------------------------------------------------- 1 | #store-details .details-panel{position:relative;height:100%;padding:14px}@media screen and (min-width:992px){#store-details .details-panel{padding-bottom:45px}}@media screen and (min-width:767px){#store-details .details-panel h5{margin-top:0;margin-bottom:15px}#store-details .details-panel h4{font-size:20px;margin-bottom:15px}}#store-details .details-panel>div>p{white-space:pre-line;font-size:15px}#store-details .details-table{margin-bottom:55px}@media screen and (min-width:992px){#store-details .details-table{margin-bottom:0}}#store-details .details-table table.table{margin-bottom:0}#store-details .row{position:relative}#store-details .row>a.add-to-cart{position:absolute;bottom:0;margin-top:20px}@media screen and (min-width:767px){#store-details .row>a.add-to-cart{left:15px}}#store-details #product-image{position:relative;display:inline-block}@media screen and (min-width:767px){#store-details #product-image{width:100%}}@media screen and (max-width:992px){#store-details #product-image img{display:block;margin:0 auto;height:245px;width:245px}}@media screen and (min-width:767px){#store-details #product-image img{width:100%}}#store-details #product-image-zoom{height:255px;width:255px;padding:5px;margin-left:20px}#search-page{padding-top:0;padding-bottom:0}#category-page section .list-item-part a .product-image-container .detail h5{padding-top:10px} --------------------------------------------------------------------------------