Tumgik
#pathtopublishing
atruebloodwrites · 2 years
Photo
Tumblr media
Some news on this Monday!! Things are changing a bit for me and I’m working on an adult book (hopefully with series potential!) with the AMAZING @kkperezbooks @zenoagency. Yes, I plan to still write In the YA space too, but for now this adult contemporary romance book is my next big focus. Stay tuned!!! . . . #newbeginnings #authorlife #writinggoals ##adultcontemporaryromance #contemporaryromance #romancereads #romancereader #smalltownromance #storyteller #storytelling #pathtopublishing #literaryagent #outofthetrenches #grateful #inspired #writersofig #romancewritersofinstagram #romancewritersofig #writingcommunityofinstagram #writersoninstagram #authorsonig #lovethewritingcommunity https://www.instagram.com/p/CW3v8KdvRV2/?utm_medium=tumblr
0 notes
celestialauria · 3 years
Photo
Tumblr media
Friends, I'm so thrilled to finally share that UNDER THE LAVENDER MOON is officially out in the world now! Perfect timing as Lunar New Year is upon us. It also happens to be my year, the year of the ox 🐂. I am OVER the moon! 新年快樂! I appreciate your support whether it's buying a copy (or 2), sharing this post on social media or with a friend, writing a review, or requesting the book at your local library. Not everyone can say they published their debut novel during a pandemic. This will now be an interesting fact to share during an icebreaker game. I hope to have a virtual release party soon and maybe an in person signing later this year if it's safe. I'll definitely keep you all posted! Thanks to everyone who helped make this possible! #debutnovels #debutauthors #underthelavendermoon #asianfantasy #asianyafantasy #authorsofinstagram #womenauthors #writersofinstagram #yafantasy #yaauthors #pathtopublishing #bookrelease #booklovers #bookbirthday #februarybookrelease #lunarnewyear #moon #yearoftheox #chinesenewyear https://www.instagram.com/p/CLJ_qnrBERb/?igshid=1nlw8ai36xfri
0 notes
suzanneshannon · 4 years
Text
Making a cleaner and more intentional azure-pipelines.yml for an ASP.NET Core Web App
A few months back I moved my CI/CD (Continuous Integration/Continuous Development) to Azure DevOps for free. You get 1800 build minutes a month FREE and I'm not even close to using it with three occasionally-updated sites building on it.
It wasn't too hard, but as with all build pipelines you'll end up with a bunch of trial and error builds until you really get it dialed in.
I was working/pairing with Damian today because I wanted to get my git commit hashes and build ids embedded into the actual website so I could see exactly what commit is in production. How to do that will be the next post!
However, while tidying up we noticed some possible speed up and potential issues with my original azurepipeslines.yml file, so here's my new one!
NOTE: There's MANY ways to write one of these. For example, note that I'm allowing the "dotnet restore" to happen automatically as a sign effect of the call to dotnet build. Damian prefers to make that more explicit as its own task so he can see timing info for it. It's up to you, just know the side effects and measure!
Let's read the YAML and see what's up here.
My primary Git branch is called "main" so my Pipeline triggers on commits to main.
I'm using a VM from the pool that's the latest Ubuntu.
I'm doing a Release (not Debug) build and putting that value in a variable that I can use later in the pipeline.
I'm using a "runtime id" of linux-x64 and I'm storing that value also for use later. That's the .NET Core runtime I'm interested in.
I'm passing in the -r $(rid) to be absolutely clear about my intent at every step.
I want to build ONCE so I'm using --no-build on the publish command. It's likely not needed, but because I was using a rid on the build and then not using it later, my publish was wasting time by building again.
The dotnet test command uses -r for results (dumb) so I have to pass in --runtime if I want to pass in a rid. Again, likely not needed, but it's explicit.
I publish and name the artifact (fancy word for the resulting ZIP file) so it can be used later in the Deployment pipeline.
Here's the YAML
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core trigger: - main pool: vmImage: 'ubuntu-latest' variables: buildConfiguration: 'Release' rid: 'linux-x64' steps: - task: UseDotNet@2 inputs: version: '3.1.x' packageType: sdk - task: DotNetCoreCLI@2 displayName: 'dotnet build $(buildConfiguration)' inputs: command: 'build' arguments: '-r $(rid) --configuration $(buildConfiguration) /p:SourceRevisionId=$(Build.SourceVersion)' - task: DotNetCoreCLI@2 displayName: "Test" inputs: command: test projects: '**/*tests/*.csproj' arguments: '--runtime $(rid) --configuration $(buildConfiguration)' - task: DotNetCoreCLI@2 displayName: "Publish" inputs: command: 'publish' publishWebProjects: true arguments: '-r $(rid) --no-build --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)' zipAfterPublish: true - task: PublishBuildArtifacts@1 displayName: "Upload Artifacts" inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' artifactName: 'hanselminutes'
Did I miss anything? What are your best tips for a clean YAML file that you can use to build and deploy a .NET Web app?
Sponsor: This week's sponsor is...me! This blog and my podcast has been a labor of love for over 18 years. Your sponsorship pays my hosting bills for both AND allows me to buy gadgets to review AND the occasional taco. Join me!
© 2019 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
      Making a cleaner and more intentional azure-pipelines.yml for an ASP.NET Core Web App published first on https://deskbysnafu.tumblr.com/
0 notes
philipholt · 4 years
Text
Making a cleaner and more intentional azure-pipelines.yml for an ASP.NET Core Web App
A few months back I moved my CI/CD (Continuous Integration/Continuous Development) to Azure DevOps for free. You get 1800 build minutes a month FREE and I'm not even close to using it with three occasionally-updated sites building on it.
It wasn't too hard, but as with all build pipelines you'll end up with a bunch of trial and error builds until you really get it dialed in.
I was working/pairing with Damian today because I wanted to get my git commit hashes and build ids embedded into the actual website so I could see exactly what commit is in production. How to do that will be the next post!
However, while tidying up we noticed some possible speed up and potential issues with my original azurepipeslines.yml file, so here's my new one!
NOTE: There's MANY ways to write one of these. For example, note that I'm allowing the "dotnet restore" to happen automatically as a sign effect of the call to dotnet build. Damian prefers to make that more explicit as its own task so he can see timing info for it. It's up to you, just know the side effects and measure!
Let's read the YAML and see what's up here.
My primary Git branch is called "main" so my Pipeline triggers on commits to main.
I'm using a VM from the pool that's the latest Ubuntu.
I'm doing a Release (not Debug) build and putting that value in a variable that I can use later in the pipeline.
I'm using a "runtime id" of linux-x64 and I'm storing that value also for use later. That's the .NET Core runtime I'm interested in.
I'm passing in the -r $(rid) to be absolutely clear about my intent at every step.
I want to build ONCE so I'm using --no-build on the publish command. It's likely not needed, but because I was using a rid on the build and then not using it later, my publish was wasting time by building again.
The dotnet test command uses -r for results (dumb) so I have to pass in --runtime if I want to pass in a rid. Again, likely not needed, but it's explicit.
I publish and name the artifact (fancy word for the resulting ZIP file) so it can be used later in the Deployment pipeline.
Here's the YAML
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core trigger: - main pool: vmImage: 'ubuntu-latest' variables: buildConfiguration: 'Release' rid: 'linux-x64' steps: - task: UseDotNet@2 inputs: version: '3.1.x' packageType: sdk - task: DotNetCoreCLI@2 displayName: 'dotnet build $(buildConfiguration)' inputs: command: 'build' arguments: '-r $(rid) --configuration $(buildConfiguration) /p:SourceRevisionId=$(Build.SourceVersion)' - task: DotNetCoreCLI@2 displayName: "Test" inputs: command: test projects: '**/*tests/*.csproj' arguments: '--runtime $(rid) --configuration $(buildConfiguration)' - task: DotNetCoreCLI@2 displayName: "Publish" inputs: command: 'publish' publishWebProjects: true arguments: '-r $(rid) --no-build --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)' zipAfterPublish: true - task: PublishBuildArtifacts@1 displayName: "Upload Artifacts" inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' artifactName: 'hanselminutes'
Did I miss anything? What are your best tips for a clean YAML file that you can use to build and deploy a .NET Web app?
Sponsor: This week's sponsor is...me! This blog and my podcast has been a labor of love for over 18 years. Your sponsorship pays my hosting bills for both AND allows me to buy gadgets to review AND the occasional taco. Join me!
© 2019 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
      Making a cleaner and more intentional azure-pipelines.yml for an ASP.NET Core Web App published first on http://7elementswd.tumblr.com/
0 notes
goaldiggertv · 6 years
Video
Our creator @tinaleejones rocking our GOAL DIGGER signature tee at the @pathtopublishing conference w/ @blessedselling_author_enjoy (at New York, New York) https://www.instagram.com/p/BoRS-0ylNYt/?utm_source=ig_tumblr_share&igshid=11rv0elohby1w
0 notes
atruebloodwrites · 2 years
Photo
Tumblr media
Just a little reminder for all my author pals out there. Your words do matter in so many ways!💚 . . . . . #authorlife #writerlife #pathtopublishing #debutnovel #writingabook #writinganovel #yaauthors #yaauthorlife #yaauthorsofig #yawritersofig #writingcommunityofig #storyteller #storytelling #storytellerlife #igauthor #igauthorlife https://www.instagram.com/p/CVgMj_GP8gR/?utm_medium=tumblr
0 notes
atruebloodwrites · 3 years
Photo
Tumblr media
The struggle is real but I refuse to give up! . . . #backtoquerying #querytrenches #publishingtruth #nevergiveup #writerlife #YAWriter #novelten #storyteller #storytelling #yawritingcommunity #writingabook #pathtopublishing #perseveranceinpublishing #writingcommunityofinstagram #yawritingcommunityofig #igauthor #igauthorlife https://www.instagram.com/p/CU77IYqpBlQ/?utm_medium=tumblr
0 notes
atruebloodwrites · 3 years
Photo
Tumblr media
Long days of rain is not a typical thing for an Arizona summer. Usually this is the hottest time of the year with temps vacillating between 110-115. With the quiet and peace that the rain brings, it has me thinking a lot about rebirth. How one good storm can wash away the dirt and mess of a long dry period. Make everything look shiny and new again. I think this idea of rebirth, while daunting to some, may also be seen as an opportunity to start fresh. To take stock of what is happening in your life and consider a new path. A challenge that will shake up your norm. Some may be afraid of change, but as I grow older I’ve learned to embrace it. For some reason I see it as a chance to reinvent my expectations. Take on new challenges. This not only applies to my own life but also to my writing. It’s not easy to veer away from your comfort zone, but I firmly believe that if you push your skills, venture into new territory, your writing only gets better. I’ve done this a couple of times now and I always feel a sense of accomplishment when I’ve pushed past that fear. It really is in a sense a path to something new and better. A true rebirth. #writingchalleneges #writinglife #authorlife #writingbooks #writingcommunity #writinginspiration #writingcommunityofinstagram #writingmotivation #authorcommunity #authorsofig #pushingpastcomfortzones #writingcave #revisioncave #authorcommunity #writersofig #authorsofig #pathtopublishing #storyteller #storytellerlife https://www.instagram.com/p/CRt7BmOLum0/?utm_medium=tumblr
0 notes
atruebloodwrites · 3 years
Photo
Tumblr media
It’s been a while since I’ve done a “meet the author” so I thought it was time again! Hello! I’m Amy and I write YA historical fiction and contemporary books! I’m also currently pushing my skills and writing an Adult Contemporary Romance! ❤️ Nothing But Sky was my YA Historical debut followed the year after by Across a Broken Shore. A few things about me: * I have a degree in Journalism. When I found out after college that the only entry-level job I could get was writing obituaries, I quickly changed course. * My first job out of college was working as an NBC page at the studios in Burbank. I gave tours and worked at live studio audience shows. I learned a lot, especially that actors are a lot shorter than you expect! * I worked for 10 years in marketing and PR and loved every minute of it. * One of my jobs included working for a major book distributor. A buyer one day told me I had to read an ARC she had of a popular kid’s book in England. That book turned out to be Harry Potter and The Prisoner of Azkaban. * I love to cook but I’m not great at it. And I own way too many cookbooks! * My newest obsession is my indoor bike which I love because the virtual rides take me all over the world! * My favorite indulgence is buying way too many graphic T-shirts! * I make my own guacamole from a family recipe and I can’t eat any other kind. I talk a lot about writing, books, and my favorite TV shows here (GBBO, Teen Wolf, Stranger Things, Veronica Mars)! I hope you’ll stick around for all the posts to come! #meettheauthor #yawriter #historicalfiction #yacontemporary #writinglife☕️ #pathtopublishing #writinganovel #writingabook #writingcraft #writingcommunityofinstagram #writingtips #writingcommunityofig #writingforlife #writergram #yareads #yareadersofinstagram https://www.instagram.com/p/CLK_izPgghb/?igshid=1146tvppeyerz
0 notes
atruebloodwrites · 4 years
Photo
Tumblr media
Many years ago I wrote this headline for a blog post. At the time, I was REALLY struggling. I was trying to get rep. for NOTHING BUT SKY. I worked tremendously hard on an R&R for a highly successful agent and she’d just turned me down. I. WAS. GUTTED. . . . It took me months of wallowing until I found my way back to writing and social media. A friend that I’d followed for years posted this question: “Would you still write if you knew you’d never be traditionally published?” The question hit me hard. It made me consider why I was writing. Was it because I wanted the accolades and notice that comes with publishing? Was it just one more pipe dream I was chasing? I had to sit on this for a while. . . . The conclusion I came to was this: Writing is in my blood. My brain is filled with so many ideas. Stories I know I want to get on the page. At that point, I knew my answer to the question. Even if I’d never get a deal, I’d still sit down and write every day. . . . If you’re struggling today, consider this question. Ask why you are writing. Why you are working towards that dream. I think it might bring you some clarity. . . . Note: This question is if you want to go the traditional route of publishing. If you are self-publishing then you are taking the wheel and forging your own path which I think is amazing! . . . #writingquestion #writetip #writingcommunity #writerlife #writerprobs #writershelpingotherwriters #pathtopublishing #pathtopublication #publishing #literaryagent #queryinglitagents #writersofinstagram #authorsofig #igauthor #igauthorlife https://www.instagram.com/p/CCGuhd7gq_e/?igshid=1n4n1r0pf8ydg
0 notes
atruebloodwrites · 4 years
Photo
Tumblr media
Excited to join @timesnewrachel’s #mywritepath project. 🧡 Having the chance to sign a book with your name on it is an incredible moment. 🧡 The journey for my debut, NOTHING BUT SKY was a long one, and over the next ten days I’ll share specific details. 🧡 Today I want to talk about chasing a dream. I think if you want to be a writer, you think about the day you’ll be able to sign a book with your name on it. 🧡 I came to the writing game very late. I’d worked in entertainment and advertising for years before I decided I wanted to focus on my passion. 🧡 As many writers do, they think that first book is going to be THE ONE. Then the rejections start coming and coming and coming. It really is a tough business and hard on the tender, creative heart. 🧡 Through all the ups and downs, I tried to remind myself why I wanted to write. That my stories would one day find their hands into readers’ hands. It would happen for me eventually, but there would be a lot of heartbreak before I got to place my biplane stamp & sign my name! 🧡 My story is a tale of perseverance, but also in the belief that some books you just can’t let go! 🧡 Stay tuned as I share more of my journey in the days ahead! And P.S. - it’s NEVER TOO LATE to follow your dreams! 🧡 🧡 🧡 #nothingbutsky #authorlife #writinglife #writerlife #writersofinstagram #writingcommunity #pathtopublishing #storyteller #authorofinstagram #igauthorlife #followyourpassion https://www.instagram.com/p/B-72ZPwAFIs/?igshid=1cuyu3wuzuwjw
0 notes
philipholt · 4 years
Text
Setting up Azure DevOps CI/CD for a .NET Core 3.1 Web App hosted in Azure App Service for Linux
Following up on my post last week on moving from App Service on Windows to App Service on Linux, I wanted to make sure I had a clean CI/CD (Continuous Integration/Continuous Deployment) pipeline for all my sites. I'm using Azure DevOps because it's basically free. You get 1800 build minutes a month FREE and I'm not even close to using it with three occasionally-updated sites building on it.
Last Post: I updated one of my websites from ASP.NET Core 2.2 to the latest LTS (Long Term Support) version of ASP.NET Core 3.1 this week. I want to do the same with my podcast site AND move it to Linux at the same time. Azure App Service for Linux has some very good pricing and allowed me to move over to a Premium v2 plan from Standard which gives me double the memory at 35% off.
Setting up on Azure DevOps is easy and just like signing up for Azure you'll use your Microsoft ID. Mine is my gmail/gsuite, in fact. You can also login with GitHub creds. It's also nice if your project makes NuGet packages as there's an integrated NuGet Server that others can consume libraries from downstream before (if) you publish them publicly.
I set up one of my sites with Azure DevOps a while back in about an hour using their visual drag and drop Pipeline system which looked like this:
There's some controversy as some folks REALLY like the "classic" pipeline while others like the YAML (Yet Another Markup Language, IMHO) style. YAML doesn't have all the features of the original pipeline yet, but it's close. It's primary advantage is that the pipeline definition exists as a single .YAML file and can be checked-in with your source code. That way someone (you, whomever) could import your GitHub or DevOps Git repository and it includes everything it needs to build and optionally deploy the app.
The Azure DevOps team is one of the most organized and transparent teams with a published roadmap that's super detailed and they announce their sprint numbers in the app itself as it's updated which is pretty cool.
When YAML includes a nice visual interface on top of it, it'll be time for everyone to jump but regardless I wanted to make my sites more self-contained. I may try using GitHub Actions at some point and comparing them as well.
Migrating from Classic Pipelines to YAML Pipelines
If you have one, you can go to an existing pipeline in DevOps and click View YAML and get some YAML that will get you most of the way there but often includes some missing context or variables. The resulting YAML in my opinion isn't going to be as clean as what you can do from scratch, but it's worth looking at.
In decided to disable/pause my original pipeline and make a new one in parallel. Then I opened them side by side and recreated it. This let me learn more and the result ended up cleaner than I'd expected.
The YAML editor has a half-assed (sorry) visual designer on the right that basically has Tasks that will write a little chunk of YAML for you, but:
Once it's placed you're on your own
You can't edit it or modify it visually. It's text now.
If your cursor has the insert point in the wrong place it'll mess up your YAML
It's not smart
But it does provide a catalog of options and it does jumpstart things. Here's my YAML to build and publish a zip file (artifact) of my podcast site. Note that my podcast site is three projects, the site, a utility library, and some tests. I found these docs useful for building ASP.NET Core apps.
You'll see it triggers builds on the main branch. "Main" is the name of my primary GitHub branch. Yours likely differs.
It uses Ubuntu to do the build and it builds in Release mode. II
I install the .NET 3.1.x SDK for building my app, and I build it, then run the tests based on a globbing *tests pattern.
I do a self-contained publish using -r linux-x64 because I know my target App Service is Linux (it's cheaper) and it goes to the ArtifactStagingDirectory and I name it "hanselminutes." At this point it's a zip file in a folder in the sky.
Here it is:
trigger: - main pool: vmImage: 'ubuntu-latest' variables: buildConfiguration: 'Release' steps: - task: UseDotNet@2 displayName: ".NET Core 3.1.x" inputs: version: '3.1.x' packageType: sdk - task: UseDotNet@2 inputs: version: '3.1.x' - script: dotnet build --configuration $(buildConfiguration) displayName: 'dotnet build $(buildConfiguration)' - task: DotNetCoreCLI@2 displayName: "Test" inputs: command: test projects: '**/*tests/*.csproj' arguments: '--configuration $(buildConfiguration)' - task: DotNetCoreCLI@2 displayName: "Publish" inputs: command: 'publish' publishWebProjects: true arguments: '-r linux-x64 --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)' zipAfterPublish: true - task: PublishBuildArtifacts@1 displayName: "Upload Artifacts" inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' artifactName: 'hanselminutes'
Next I move to the release pipeline. Now, you can also do the actual Azure Publish to a Web App/App Service from a YAML Build Pipeline. I suppose that's fine if your site/project is simple. I wanted to have dev/test/staging so I have a separate Release Pipeline.
The Release Pipelines system in Azure DevOps can pull an "Artifact" from anywhere - GitHub, DevOps itself natch, Jenkins, Docker Hub, whatever. I set mine up with a Continuous Deployment Trigger that makes a new release every time a build is available. I could also do Releases manually, with specific tags, scheduled, or gated if I'd liked.
Mine is super easy since it's just a website. It's got a single task in the Release Pipeline that does an Azure App Service Deploy. I can also deploy to a slot like Staging, then check it out, and then swap to Production later.
There's nice integration between Azure DevOps and the Azure Portal so I can see within Azure in the Deployment Center of my App Service that my deployments are working:
I've found this all to be a good use of my staycation and even though I'm just a one-person company I've been able to get a very nice automated build system set up at very low cost (GitHub free account for a private repo, 1800 free Azure DevOps minutes, and an App Service for Linux plan) A basic starts at $13 with 1.75Gb of RAM but I'm planning on moving all my sites over to a single big P1v2 with 3.5G of RAM and an SSD for around $80 a month. That should get all of my ~20 sites under one roof for a price/perf I can handle.
Sponsor: Like C#? We do too! That’s why we've developed a fast, smart, cross-platform .NET IDE which gives you even more coding power. Clever code analysis, rich code completion, instant search and navigation, an advanced debugger... With JetBrains Rider, everything you need is at your fingertips. Code C# at the speed of thought on Linux, Mac, or Windows. Try JetBrains Rider today!
© 2019 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
      Setting up Azure DevOps CI/CD for a .NET Core 3.1 Web App hosted in Azure App Service for Linux published first on http://7elementswd.tumblr.com/
0 notes
suzanneshannon · 4 years
Text
Setting up Azure DevOps CI/CD for a .NET Core 3.1 Web App hosted in Azure App Service for Linux
Following up on my post last week on moving from App Service on Windows to App Service on Linux, I wanted to make sure I had a clean CI/CD (Continuous Integration/Continuous Deployment) pipeline for all my sites. I'm using Azure DevOps because it's basically free. You get 1800 build minutes a month FREE and I'm not even close to using it with three occasionally-updated sites building on it.
Last Post: I updated one of my websites from ASP.NET Core 2.2 to the latest LTS (Long Term Support) version of ASP.NET Core 3.1 this week. I want to do the same with my podcast site AND move it to Linux at the same time. Azure App Service for Linux has some very good pricing and allowed me to move over to a Premium v2 plan from Standard which gives me double the memory at 35% off.
Setting up on Azure DevOps is easy and just like signing up for Azure you'll use your Microsoft ID. Mine is my gmail/gsuite, in fact. You can also login with GitHub creds. It's also nice if your project makes NuGet packages as there's an integrated NuGet Server that others can consume libraries from downstream before (if) you publish them publicly.
I set up one of my sites with Azure DevOps a while back in about an hour using their visual drag and drop Pipeline system which looked like this:
There's some controversy as some folks REALLY like the "classic" pipeline while others like the YAML (Yet Another Markup Language, IMHO) style. YAML doesn't have all the features of the original pipeline yet, but it's close. It's primary advantage is that the pipeline definition exists as a single .YAML file and can be checked-in with your source code. That way someone (you, whomever) could import your GitHub or DevOps Git repository and it includes everything it needs to build and optionally deploy the app.
The Azure DevOps team is one of the most organized and transparent teams with a published roadmap that's super detailed and they announce their sprint numbers in the app itself as it's updated which is pretty cool.
When YAML includes a nice visual interface on top of it, it'll be time for everyone to jump but regardless I wanted to make my sites more self-contained. I may try using GitHub Actions at some point and comparing them as well.
Migrating from Classic Pipelines to YAML Pipelines
If you have one, you can go to an existing pipeline in DevOps and click View YAML and get some YAML that will get you most of the way there but often includes some missing context or variables. The resulting YAML in my opinion isn't going to be as clean as what you can do from scratch, but it's worth looking at.
In decided to disable/pause my original pipeline and make a new one in parallel. Then I opened them side by side and recreated it. This let me learn more and the result ended up cleaner than I'd expected.
The YAML editor has a half-assed (sorry) visual designer on the right that basically has Tasks that will write a little chunk of YAML for you, but:
Once it's placed you're on your own
You can't edit it or modify it visually. It's text now.
If your cursor has the insert point in the wrong place it'll mess up your YAML
It's not smart
But it does provide a catalog of options and it does jumpstart things. Here's my YAML to build and publish a zip file (artifact) of my podcast site. Note that my podcast site is three projects, the site, a utility library, and some tests. I found these docs useful for building ASP.NET Core apps.
You'll see it triggers builds on the main branch. "Main" is the name of my primary GitHub branch. Yours likely differs.
It uses Ubuntu to do the build and it builds in Release mode. II
I install the .NET 3.1.x SDK for building my app, and I build it, then run the tests based on a globbing *tests pattern.
I do a self-contained publish using -r linux-x64 because I know my target App Service is Linux (it's cheaper) and it goes to the ArtifactStagingDirectory and I name it "hanselminutes." At this point it's a zip file in a folder in the sky.
Here it is:
trigger: - main pool: vmImage: 'ubuntu-latest' variables: buildConfiguration: 'Release' steps: - task: UseDotNet@2 displayName: ".NET Core 3.1.x" inputs: version: '3.1.x' packageType: sdk - task: UseDotNet@2 inputs: version: '3.1.x' - script: dotnet build --configuration $(buildConfiguration) displayName: 'dotnet build $(buildConfiguration)' - task: DotNetCoreCLI@2 displayName: "Test" inputs: command: test projects: '**/*tests/*.csproj' arguments: '--configuration $(buildConfiguration)' - task: DotNetCoreCLI@2 displayName: "Publish" inputs: command: 'publish' publishWebProjects: true arguments: '-r linux-x64 --configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)' zipAfterPublish: true - task: PublishBuildArtifacts@1 displayName: "Upload Artifacts" inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' artifactName: 'hanselminutes'
Next I move to the release pipeline. Now, you can also do the actual Azure Publish to a Web App/App Service from a YAML Build Pipeline. I suppose that's fine if your site/project is simple. I wanted to have dev/test/staging so I have a separate Release Pipeline.
The Release Pipelines system in Azure DevOps can pull an "Artifact" from anywhere - GitHub, DevOps itself natch, Jenkins, Docker Hub, whatever. I set mine up with a Continuous Deployment Trigger that makes a new release every time a build is available. I could also do Releases manually, with specific tags, scheduled, or gated if I'd liked.
Mine is super easy since it's just a website. It's got a single task in the Release Pipeline that does an Azure App Service Deploy. I can also deploy to a slot like Staging, then check it out, and then swap to Production later.
There's nice integration between Azure DevOps and the Azure Portal so I can see within Azure in the Deployment Center of my App Service that my deployments are working:
I've found this all to be a good use of my staycation and even though I'm just a one-person company I've been able to get a very nice automated build system set up at very low cost (GitHub free account for a private repo, 1800 free Azure DevOps minutes, and an App Service for Linux plan) A basic starts at $13 with 1.75Gb of RAM but I'm planning on moving all my sites over to a single big P1v2 with 3.5G of RAM and an SSD for around $80 a month. That should get all of my ~20 sites under one roof for a price/perf I can handle.
Sponsor: Like C#? We do too! That’s why we've developed a fast, smart, cross-platform .NET IDE which gives you even more coding power. Clever code analysis, rich code completion, instant search and navigation, an advanced debugger... With JetBrains Rider, everything you need is at your fingertips. Code C# at the speed of thought on Linux, Mac, or Windows. Try JetBrains Rider today!
© 2019 Scott Hanselman. All rights reserved.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
      Setting up Azure DevOps CI/CD for a .NET Core 3.1 Web App hosted in Azure App Service for Linux published first on https://deskbysnafu.tumblr.com/
0 notes