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';
@ -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 {