Skip to content

Instantly share code, notes, and snippets.

using System;
namespace dotnet_ci_sample
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
@tsubakimoto
tsubakimoto / .gitlab-ci.yml
Last active February 24, 2018 16:47
GitLabで.NET Coreアプリケーションの継続的インテグレーションを行う
image: microsoft/dotnet:2.0.0-sdk
services:
- docker:dind
stages:
- build
- test
- push
job1:
stage: build

Issue edited test data

{
 originalUrl: 'https://mtmrbackloghook.azurewebsites.net/api/comment-notification?code=00FRV5AbFd8QbQc7pwb/v1nSaHaZawqfKxg0qFkd/2m9IoLiNI5YwQ==',
 method: 'POST',
 query: {
  code: '00FRV5AbFd8QbQc7pwb/v1nSaHaZawqfKxg0qFkd/2m9IoLiNI5YwQ=='
 },
 headers: {
  connection: 'Keep-Alive',

Azure社内勉強会 #1 の資料です。

Microsoft Azure とは

Azure は、コンピューティング、ストレージ、データ、ネットワーク、およびアプリケーション サービスを提供する、エンタープライズ レベルのクラウド プラットフォームです。

(引用:Azure: Microsoft のクラウド コンピューティング プラットフォーム

Azureでできること

日本マイクロソフト 井上大輔氏のスライド の20ページめ

public class FizzBuzz
{
public static string Say(int n)
{
if (n < 1)
throw new ArgumentOutOfRangeException();
if (n % 3 == 0 && n % 5 == 0)
return "Fizz Buzz";

Windows Modules

win_chocolatey

Installs packages using chocolatey (chocolateyを使ってパッケージをインストールします)

win_feature

Installs and uninstalls Windows Features (Windowsの機能をインストール/アンインストールします)

win_get_url

Fetches a file from a given URL (指定したURLからファイルを取得します)

Azure の管理証明書を作る

Visual Studio 開発者ツールで以下を入力

makecert -r -pe -n CN=azure-cert -sky exchange azure.cer -sv azure.pvk

pvk2pfx -pvk azure.pvk -spc azure.cer -pfx azure.pfx

OpenSSL をインストールして以下を入力

vagrant up

vagrant ssh host

cp /vagrant/hosts .

chmod -x hosts

cp /vagrant/ansible.cfg .

参考

手順

  • Visual Studio のインストール時に提供される 開発者コマンドプロンプト を起動する。
    • 筆者の環境のインストールパスは C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts である。
  • makecert -sky exchange -r -n "CN=azure" -pe -a sha1 -len 2048 -ss My "azure.cert"
  • Azure にログイン
  • 左メニューの「設定」をクリックする
```ruby
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/centos-6.5"