LoginSignup
1
6

More than 3 years have passed since last update.

これなしでは開発できない! VS Code x Azure おすすめ開発術

Last updated at Posted at 2020-10-03

『これなしでは開発できない! VS Code + Azureおすすめ活用術』といいテーマで、自分なりのおすすめ活用術をご紹介したいと思います。

構成

構成は以下の通りです。

  • Local environment
    • Mac
      • Visual Studio Code(VS Code) 1.49.2
  • Remote environments
    • Azure Repos
    • GitHub

メリット

Visual Studio Code(VS Code)

Visual Studio Code(VS Code) には「ターミナル」が用意されています。IDE ツールは独自環境を持つものもあり、その場合、ターミナルで設定している短縮コマンドなどが動かないことがあります。
しかし、Visual Studio Code(VS Code) の「ターミナル」はターミナルで設定している短縮コマンドもそのまま動作するので、Visual Studio Code(VS Code) で作業した後に Mac のターミナルでコマンドを打つ必要がありません。そのため、VS Codeの画面からほぼ離れずに開発が可能になり、より開発に集中ができます。

Azure ReposGitHub

開発したコードを分散バージョン管理システム (Version Control System) で管理する場合、OSS であれば、多くの人が GitHub で管理しています。
一方、プライベートでは、GitHub で管理する場合、有料になってしまいます。プライベートリポジトリを無料で管理できるサービスは色々とありますが、後述する理由のため、Azure Repos で管理するのがおすすめです。

Azure Repos をおすすめする理由

OSS などの Public リポジトリは GitHub、Private リポジトリは Azure Repos で管理するのがおすすめなのは、Azure Repos と同じく Azure DevOps Service で提供されている Azure PipelinesGitHub Actions の利用が容易なためです。

いずれの分散バージョン管理システム (Version Control System) を利用したとしても、CI/CD が別途必要になります。

その点、Azure PipelinesGitHub ActionsMigrating from Azure Pipelines to GitHub Actions - GitHub Docs の通り、書き方が類似しています。

CI/CD のスクリプトを非公開にしたいのであれば、Azure Pipelines に CI/CD のスクリプトを準備すればよく、自分の思い通りに公開・非公開を選択できるのは大きなメリットです。

Azure Pipelines

jobs:
- job: scripts
pool:
vmImage: 'windows-latest'
steps:
- script: echo "This step runs in the default shell"
- bash: echo "This step runs in bash"
- pwsh: Write-Host "This step runs in PowerShell Core"
- task: PowerShell@2
inputs:
script: Write-Host "This step runs in PowerShell"

GitHub Actions

jobs:
scripts:
runs-on: windows-latest
steps:
- run: echo "This step runs in the default shell"
- run: echo "This step runs in bash"
shell: bash
- run: Write-Host "This step runs in PowerShell Core"
shell: pwsh
- run: Write-Host "This step runs in PowerShell"
shell: powershell

まとめ

『これなしでは開発できない! VS Code + Azureおすすめ活用術』といいテーマで、自分なりのおすすめ活用術をご紹介しました。
みなさんも『これなしでは開発できない! VS Code + Azureおすすめ活用術』という情報をお持ちでしたら、ぜひ共有してください。

参考

1
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
6