mirror of https://github.com/actions/toolkit
Minor tweaks
parent
771f20b061
commit
f236b725b0
|
@ -16,8 +16,9 @@ export class ArtifactHttpClient implements Rpc {
|
||||||
private baseUrl: string
|
private baseUrl: string
|
||||||
|
|
||||||
constructor(userAgent: string) {
|
constructor(userAgent: string) {
|
||||||
|
const token = getRuntimeToken()
|
||||||
this.httpClient = new HttpClient(userAgent, [
|
this.httpClient = new HttpClient(userAgent, [
|
||||||
new BearerCredentialHandler(getRuntimeToken())
|
new BearerCredentialHandler(token)
|
||||||
])
|
])
|
||||||
this.baseUrl = getResultsServiceUrl()
|
this.baseUrl = getResultsServiceUrl()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ArtifactHttpClient } from '../../artifact-http-client'
|
import { ArtifactHttpClient } from '../../artifact-http-client'
|
||||||
import { ArtifactServiceClientJSON } from '../../../generated'
|
import { ArtifactServiceClientJSON } from '../../../generated/results/api/v1/artifact.twirp'
|
||||||
|
|
||||||
export async function twirpTest(){
|
export async function twirpTest(){
|
||||||
const artifactClient = new ArtifactHttpClient('@actions/artifact-upload')
|
const artifactClient = new ArtifactHttpClient('@actions/artifact-upload')
|
||||||
|
|
|
@ -4,7 +4,7 @@ import {UploadOptions} from './upload-options'
|
||||||
import {UploadResponse} from './upload-response'
|
import {UploadResponse} from './upload-response'
|
||||||
import { UploadSpecification, getUploadSpecification } from './upload-specification'
|
import { UploadSpecification, getUploadSpecification } from './upload-specification'
|
||||||
import { ArtifactHttpClient } from '../artifact-http-client'
|
import { ArtifactHttpClient } from '../artifact-http-client'
|
||||||
import { ArtifactServiceClientJSON } from 'src/generated'
|
import { ArtifactServiceClientJSON } from '../../generated/results/api/v1/artifact.twirp'
|
||||||
|
|
||||||
import {BlobClient, BlockBlobUploadStreamOptions} from '@azure/storage-blob'
|
import {BlobClient, BlockBlobUploadStreamOptions} from '@azure/storage-blob'
|
||||||
import { TransferProgressEvent } from '@azure/core-http';
|
import { TransferProgressEvent } from '@azure/core-http';
|
||||||
|
@ -14,7 +14,7 @@ import * as stream from 'stream'
|
||||||
|
|
||||||
import {getBackendIds, BackendIds} from '../util'
|
import {getBackendIds, BackendIds} from '../util'
|
||||||
|
|
||||||
const bufferSize = 1024 * 1024 * 8 // 8 MB
|
const bufferSize = 1024 * 1024 * 8 // 8 MB
|
||||||
|
|
||||||
// Custom stream transformer so we can set the highWaterMark property
|
// Custom stream transformer so we can set the highWaterMark property
|
||||||
// See https://github.com/nodejs/node/issues/8855
|
// See https://github.com/nodejs/node/issues/8855
|
||||||
|
@ -57,6 +57,11 @@ export async function uploadArtifact(
|
||||||
|
|
||||||
const backendIDs: BackendIds = getBackendIds()
|
const backendIDs: BackendIds = getBackendIds()
|
||||||
|
|
||||||
|
console.log("workflow Run Backend ID " + backendIDs.workflowRunBackendId)
|
||||||
|
console.log("workflow Job Run Backend ID " + backendIDs.workflowJobRunBackendId)
|
||||||
|
|
||||||
|
console.log("hello Rob!!")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue