Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: 'Features'
labels:
- 'feature'
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes

$CHANGES
35 changes: 35 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "master" ]
release:
types: [published]
pull_request:
branches: [ "master" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Build
run: make build

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: "*.exe"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 12 additions & 2 deletions .github/workflows/test-driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ jobs:
runs-on: windows-2016
steps:
- uses: actions/checkout@v2
- name: Install Prerequisites (PFX, IIS)
run: Import-PfxCertificate -FilePath .\test\test.pfx -CertStoreLocation Cert:\\LocalMachine\\My -Password (ConvertTo-SecureString -String 'Test123!' -AsPlainText -Force)
- name: Build Driver
run: go build -o win_iis.exe .
- name: Install Prerequisites
shell: powershell
run: .\scripts\win_provision.ps1
# - name: Install Nomad
# run: choco install nomad 1.0.4
# - name:
# - name: Install Prerequisites (PFX, IIS)
# run: Import-PfxCertificate -FilePath .\test\test.pfx -CertStoreLocation Cert:\\LocalMachine\\My -Password (ConvertTo-SecureString -String 'Test123!' -AsPlainText -Force)
# shell: powershell
- name: Run iis-driver integration tests
run: go test ./iis/ -count=1 -v
- name: Run iis-driver end to end tests
run: go test ./test/e2e -count=1 -v
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif

default: build

.PHONY: clean
.PHONY: clean test
clean:
${RMCMD} ${PLUGIN_BINARY}
vagrant destroy -f
Expand All @@ -24,5 +24,7 @@ up:
converge: build up
vagrant provision

test: converge
test: converge
vagrant winrm -s cmd -c 'chdir C:\vagrant && go test ./iis/ -count=1 -v'
vagrant winrm -s cmd -c 'chdir C:\vagrant && go test ./test/e2e -count=1 -v'

12 changes: 8 additions & 4 deletions examples/iis-test.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ job "iis-test" {

network {
port "httplabel" {}
port "httpslabel" {}
}

restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
attempts = 0
}

task "iis-test" {
Expand All @@ -25,6 +23,12 @@ job "iis-test" {
type = "http"
port = "httplabel"
}

bindings {
type = "https"
port = "httpslabel"
cert_name = "WMSVC-SHA2"
}
}

template {
Expand Down
36 changes: 33 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,38 @@ module github.com/roblox/nomad-driver-iis
go 1.15

require (
github.com/Azure/go-autorest/autorest/azure/auth v0.5.1 // indirect
github.com/LK4D4/joincontext v0.0.0-20171026170139-1724345da6d5 // indirect
github.com/NVIDIA/gpu-monitoring-tools v0.0.0-20180829222009-86f2a9fac6c5 // indirect
github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46
github.com/hashicorp/go-hclog v0.15.0
github.com/hashicorp/nomad v1.0.4
github.com/stretchr/testify v1.6.1
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/elazarl/go-bindata-assetfs v1.0.1-0.20200509193318-234c15e7648f // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/godbus/dbus v4.1.0+incompatible // indirect
github.com/hashicorp/consul v1.7.8 // indirect
github.com/hashicorp/cronexpr v1.1.1 // indirect
github.com/hashicorp/go-connlimit v0.3.0 // indirect
github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840 // indirect
github.com/hashicorp/go-envparse v0.0.0-20180119215841-310ca1881b22 // indirect
github.com/hashicorp/go-hclog v1.3.1
github.com/hashicorp/nomad v1.4.3
github.com/hashicorp/nomad/api v0.0.0-20221006174558-2aa7e66bdb52
github.com/hpcloud/tail v1.0.1-0.20170814160653-37f427138745 // indirect
github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07 // indirect
github.com/joyent/triton-go v0.0.0-20190112182421-51ffac552869 // indirect
github.com/kr/pty v1.1.5 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mitchellh/colorstring v0.0.0-20150917214807-8631ce90f286 // indirect
github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/ryanuber/columnize v2.1.1-0.20170703205827-abc90934186a+incompatible // indirect
github.com/shirou/gopsutil v2.20.9+incompatible // indirect
github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c // indirect
github.com/stretchr/testify v1.8.1
github.com/zclconf/go-cty-yaml v1.0.2 // indirect
gopkg.in/tomb.v2 v2.0.0-20140626144623-14b3d72120e8 // indirect
honnef.co/go/tools v0.0.1-2020.1.4 // indirect
)
Loading