This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Azure DevOps PR E2E pipeline (#135)
- Loading branch information
Cecile Robert-Michon
committed
Jan 3, 2019
1 parent
96ab041
commit bc25013
Showing
7 changed files
with
187 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
parameters: | ||
name: '' # defaults for any parameters that aren't specified | ||
k8sRelease: '' | ||
apimodel: 'examples/e2e-tests/kubernetes/release/default/definition.json' | ||
createVNET: false | ||
|
||
jobs: | ||
- job: ${{ parameters.name }} | ||
dependsOn: unit_tests | ||
timeoutInMinutes: 90 | ||
cancelTimeoutInMinutes: 5 | ||
strategy: | ||
maxParallel: 0 | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
|
||
container: dev1 | ||
|
||
variables: | ||
GOBIN: '$(GOPATH)/bin' # Go binaries path | ||
GOROOT: '/usr/local/go' # Go installation path | ||
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path | ||
modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code | ||
TIMEOUT: 20m | ||
CLUSTER_DEFINITION: ${{ parameters.apimodel }} | ||
ORCHESTRATOR_RELEASE: ${{ parameters.k8sRelease }} | ||
CREATE_VNET: ${{ parameters.createVNET }} | ||
CLEANUP_ON_EXIT: true | ||
CLEANUP_IF_FAIL: true | ||
RETAIN_SSH: false | ||
ENABLE_KMS_ENCRYPTION: true | ||
SUBSCRIPTION_ID: '$(SUBSCRIPTION_ID_E2E_KUBERNETES)' | ||
|
||
steps: | ||
- template: e2e-step-template.yaml | ||
parameters: | ||
job: ${{ parameters.name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
parameters: | ||
job: '' | ||
|
||
steps: | ||
- script: | | ||
mkdir -p '$(GOBIN)' | ||
mkdir -p '$(GOPATH)/pkg' | ||
mkdir -p '$(modulePath)' | ||
shopt -s extglob | ||
mv !(gopath) '$(modulePath)' | ||
echo '##vso[task.prependpath]$(GOBIN)' | ||
echo '##vso[task.prependpath]$(GOROOT)/bin' | ||
displayName: 'Set up the Go workspace' | ||
- script: make build-binary | ||
displayName: compile | ||
workingDirectory: $(modulePath) | ||
- script: | | ||
export CLIENT_ID=$(SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES) | ||
export CLIENT_SECRET=$(SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES) | ||
export CLIENT_OBJECTID=$(SERVICE_PRINCIPAL_OBJECT_ID_E2E_KUBERNETES) | ||
make test-kubernetes | ||
displayName: ginkgo k8s e2e tests | ||
workingDirectory: $(modulePath) | ||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
artifactName: '${{ parameters.job }}_logs' | ||
targetPath: '$(modulePath)/_logs' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
trigger: | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
exclude: | ||
- docs/* | ||
|
||
pr: | ||
branches: | ||
include: | ||
- master | ||
paths: | ||
exclude: | ||
- docs/* | ||
|
||
resources: | ||
containers: | ||
- container: dev1 | ||
image: quay.io/deis/go-dev:v1.18.2 | ||
|
||
jobs: | ||
- job: unit_tests | ||
timeoutInMinutes: 60 | ||
cancelTimeoutInMinutes: 5 | ||
strategy: | ||
maxParallel: 0 | ||
pool: | ||
vmImage: 'Ubuntu 16.04' | ||
|
||
container: dev1 | ||
|
||
variables: | ||
GOBIN: '$(GOPATH)/bin' # Go binaries path | ||
GOROOT: '/usr/local/go' # Go installation path | ||
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path | ||
modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code | ||
|
||
steps: | ||
- script: | | ||
mkdir -p '$(GOBIN)' | ||
mkdir -p '$(GOPATH)/pkg' | ||
mkdir -p '$(modulePath)' | ||
shopt -s extglob | ||
mv !(gopath) '$(modulePath)' | ||
echo '##vso[task.prependpath]$(GOBIN)' | ||
echo '##vso[task.prependpath]$(GOROOT)/bin' | ||
displayName: 'Set up the Go workspace' | ||
- script: make bootstrap | ||
displayName: Install dependencies | ||
workingDirectory: $(modulePath) | ||
- script: make test-style | ||
displayName: Run linting rules | ||
workingDirectory: $(modulePath) | ||
- script: make validate-dependencies | ||
displayName: Check if imports, Gopkg.toml, and Gopkg.lock are in sync | ||
workingDirectory: $(modulePath) | ||
- script: make build-cross | ||
displayName: Build cross-architectural binaries | ||
workingDirectory: $(modulePath) | ||
- script: make coverage | ||
displayName: Run unit tests and calculate coverage | ||
workingDirectory: $(modulePath) | ||
|
||
- template: e2e-job-template.yaml | ||
parameters: | ||
name: 'default_linux_e2e' | ||
apimodel: 'examples/kubernetes.json' | ||
|
||
- template: e2e-job-template.yaml | ||
parameters: | ||
name: 'k8s_1_10_release_e2e' | ||
k8sRelease: '1.10' | ||
apimodel: 'examples/e2e-tests/kubernetes/release/default/definition.json' | ||
createVNET: true | ||
|
||
- template: e2e-job-template.yaml | ||
parameters: | ||
name: 'k8s_1_11_release_e2e' | ||
k8sRelease: '1.11' | ||
apimodel: 'examples/e2e-tests/kubernetes/release/default/definition.json' | ||
createVNET: true | ||
|
||
- template: e2e-job-template.yaml | ||
parameters: | ||
name: 'k8s_1_12_release_e2e' | ||
k8sRelease: '1.12' | ||
apimodel: 'examples/e2e-tests/kubernetes/release/default/definition.json' | ||
createVNET: true | ||
|
||
- template: e2e-job-template.yaml | ||
parameters: | ||
name: 'k8s_1_13_release_e2e' | ||
k8sRelease: '1.13' | ||
apimodel: 'examples/e2e-tests/kubernetes/release/default/definition.json' | ||
createVNET: true | ||
|
||
- template: e2e-job-template.yaml | ||
parameters: | ||
name: 'k8s_windows_1_10_release_e2e' | ||
k8sRelease: '1.10' | ||
apimodel: 'examples/e2e-tests/kubernetes/windows/hybrid/definition.json' | ||
|
||
- template: e2e-job-template.yaml | ||
parameters: | ||
name: 'k8s_windows_1_11_release_e2e' | ||
k8sRelease: '1.11' | ||
apimodel: 'examples/e2e-tests/kubernetes/windows/hybrid/definition.json' | ||
|
||
- template: e2e-job-template.yaml | ||
parameters: | ||
name: 'k8s_windows_1_12_release_e2e' | ||
k8sRelease: '1.12' | ||
apimodel: 'examples/e2e-tests/kubernetes/windows/hybrid/definition.json' | ||
|
||
- template: e2e-job-template.yaml | ||
parameters: | ||
name: 'k8s_windows_1_13_release_e2e' | ||
k8sRelease: '1.13' | ||
apimodel: 'examples/e2e-tests/kubernetes/windows/hybrid/definition.json' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
$REPO_PATH = "github.com/Azure/aks-engine" | ||
$DEV_ENV_IMAGE = "quay.io/deis/go-dev:v1.18.1" | ||
$DEV_ENV_IMAGE = "quay.io/deis/go-dev:v1.18.2" | ||
$DEV_ENV_WORK_DIR = "/go/src/$REPO_PATH" | ||
|
||
docker.exe run -it --rm -w $DEV_ENV_WORK_DIR -v `"$($PWD)`":$DEV_ENV_WORK_DIR $DEV_ENV_IMAGE bash |