This file contains hidden or 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
| --- | |
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: vault-agent-example | |
| spec: | |
| serviceAccountName: vault-auth | |
| restartPolicy: Never |
This file contains hidden or 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
| #!/bin/bash | |
| # Create a service account, 'vault-auth' | |
| kubectl create serviceaccount vault-auth | |
| # Update the 'vault-auth' service account | |
| kubectl apply --filename vault-auth-service-account.yml | |
| # Create a policy file, myapp-kv-ro.hcl | |
| # This assumes that the Vault server is running kv v1 (non-versioned kv) |
This file contains hidden or 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
| standalone: | |
| enabled: false | |
| # Run Vault in "HA" mode. There are no storage requirements unless audit log | |
| # persistence is required. In HA mode Vault will configure itself to use Consul | |
| # for its storage backend. The default configuration provided will work the Consul | |
| # Helm project by default. It is possible to manually configure Vault to use a | |
| # different HA backend. | |
| ha: | |
| enabled: true |
This file contains hidden or 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
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: tiller | |
| namespace: kube-system | |
| --- | |
| kind: ClusterRoleBinding | |
| apiVersion: rbac.authorization.k8s.io/v1beta1 | |
| metadata: | |
| name: tiller-clusterrolebinding |
This file contains hidden or 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
| describe('CommentPRTask Test', function () { | |
| it('run all inputs function', async () => { | |
| let factoryMock: IClientFactory = new ClientFactoryMock(); | |
| variables["Build.Repository.ID"] = '3'; | |
| variables['System.PullRequest.PullRequestId'] = '4'; | |
| inputs['AzureDevOpsService'] = 'devopspat'; | |
| inputs['Comment'] = 'foo'; |
This file contains hidden or 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
| import * as tl from 'azure-pipelines-task-lib'; | |
| import * as wa from "azure-devops-node-api/WebApi"; | |
| import * as GitInterfaces from "azure-devops-node-api/interfaces/GitInterfaces"; | |
| import VariableResolver from './variableresolver'; | |
| import { IGitApi, GitApi } from 'azure-devops-node-api/GitApi'; | |
| export interface IClientFactory { | |
| create(pat:string): Promise<IGitApi>; | |
| } |
This file contains hidden or 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
| import * as assert from 'assert'; | |
| import * as sinon from 'sinon'; | |
| import rewiremock from 'rewiremock'; | |
| import { should as Should, expect } from 'chai'; | |
| import { IGitApi, GitApi } from 'azure-devops-node-api/GitApi'; | |
| import * as GitInterfaces from "azure-devops-node-api/interfaces/GitInterfaces"; | |
| var should = Should(); |
This file contains hidden or 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
| import ma = require('azure-pipelines-task-lib/mock-answer'); | |
| import tmrm = require('azure-pipelines-task-lib/mock-run'); | |
| import path = require('path'); | |
| let taskPath = path.join(__dirname, '..', 'xcode.js'); | |
| let tr: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); | |
| process.env['HOME'] = '/users/test'; //replace with mock of setVariable when task-lib has the support |
This file contains hidden or 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
| it('run Xcode with all default inputs', function (done: MochaDone) { | |
| this.timeout(parseInt(process.env.TASK_TEST_TIMEOUT) || 20000); | |
| let tp = path.join(__dirname, 'L0XcodeDefaults.js'); | |
| let tr: ttm.MockTestRunner = new ttm.MockTestRunner(tp); | |
| tr.run(); | |
| assert(tr.ran('/home/bin/xcodebuild -version'), 'xcodebuild for version should have been run.'); | |
| assert(tr.ran('/home/bin/xcodebuild -sdk $(SDK) -configuration $(Configuration) ' + |
This file contains hidden or 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
| steps: | |
| - task: ms-devlabs.vsts-developer-tools-build-tasks.publish-extension-build-task.PublishExtension@1 | |
| displayName: 'Publish Extension to CSE-DevSecOps' | |
| inputs: | |
| connectedServiceName: 'CSE-DevOps(90days)' |