1
0
Fork 0

Minor tweaks

artifact-next
Konrad Pabjan 2023-08-03 11:14:17 -04:00
parent 771f20b061
commit f236b725b0
3 changed files with 10 additions and 4 deletions

View File

@ -16,8 +16,9 @@ export class ArtifactHttpClient implements Rpc {
private baseUrl: string
constructor(userAgent: string) {
const token = getRuntimeToken()
this.httpClient = new HttpClient(userAgent, [
new BearerCredentialHandler(getRuntimeToken())
new BearerCredentialHandler(token)
])
this.baseUrl = getResultsServiceUrl()
}

View File

@ -1,5 +1,5 @@
import { ArtifactHttpClient } from '../../artifact-http-client'
import { ArtifactServiceClientJSON } from '../../../generated'
import { ArtifactServiceClientJSON } from '../../../generated/results/api/v1/artifact.twirp'
export async function twirpTest(){
const artifactClient = new ArtifactHttpClient('@actions/artifact-upload')

View File

@ -4,7 +4,7 @@ import {UploadOptions} from './upload-options'
import {UploadResponse} from './upload-response'
import { UploadSpecification, getUploadSpecification } from './upload-specification'
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 { TransferProgressEvent } from '@azure/core-http';
@ -14,7 +14,7 @@ import * as stream from 'stream'
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
// See https://github.com/nodejs/node/issues/8855
@ -57,6 +57,11 @@ export async function uploadArtifact(
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 {