Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

514
Views
¿Cómo pasar la ruta correcta del proyecto a la canalización de bitbucket?

Quiero implementar aws lamda .net core project utilizando bit bucket pipeline

bitbucket-pipelines.yml como se muestra a continuación, pero después de ejecutar la compilación, aparece un error:

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

código de archivo -

 image: microsoft/dotnet:sdk pipelines: default: - step: caches: - dotnetcore script: # Modify the commands below to build your repository. - export PROJECT_NAME=TestAWS/AWSLambda1/AWSLambda1.sln - dotnet restore - dotnet build $PROJECT_NAME - pipe: atlassian/aws-lambda-deploy:0.2.1 variables: AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} AWS_DEFAULT_REGION: 'us-east-1' FUNCTION_NAME: 'my-lambda-function' COMMAND: 'update' ZIP_FILE: 'code.zip'

la estructura del proyecto es así:

ingrese la descripción de la imagen aquí

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

El problema está aquí:

PROJECT_NAME=TestAWS/AWSLambda1/AWSLambda1.sln

Este es el camino incorrecto. Bitbucket Pipelines usará una ruta especial en la imagen de Docker, algo así como /opt/atlassian/pipelines/agent/build/YOUR_PROJECT , para hacer un clon Git de su proyecto.

Puede ver esto cuando hace clic en el paso "Configuración de compilación" en la consola web de Pipelines:

 Cloning into '/opt/atlassian/pipelines/agent/build'...

Puede usar una variable de entorno predefinida para recuperar esta ruta: $BITBUCKET_CLONE_DIR , como se describe aquí: https://support.atlassian.com/bitbucket-cloud/docs/variables-in-pipelines/

Considere algo como esto en su script de compilación yml:

 script: - echo $BITBUCKET_CLONE_DIR # Debug: Print the $BITBUCKET_CLONE_DIR - pwd # Debug: Print the current working directory - find "$(pwd -P)" -name AWSLambda1.sln # Debug: Show the full file path of AWSLambda1.sln - export PROJECT_NAME="$BITBUCKET_CLONE_DIR/AWSLambda1.sln" - echo $PROJECT_NAME - if [ -f "$PROJECT_NAME" ]; then echo "File exists" ; fi # Try this if the file path is not as expected - export PROJECT_NAME="$BITBUCKET_CLONE_DIR/AWSLambda1/AWSLambda1.sln" - echo $PROJECT_NAME - if [ -f "$PROJECT_NAME" ]; then echo "File exists" ; fi
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!