Я использую bitbucket конвейер для автоматического развертывания кода на эластичный beanstalk , но я всегда получаю ту же ошибку "Произошла ошибка (InvalidParameterValue) при вызове операции CreateApplicationVersion : Приложение с именем 'My_APP' не найдено. ".
Я уверен, что созданное мной приложение "My_app" имеет то же имя и default_region "eu-west-1".
Так что первый и второй шаг в конвейере - это успех, но третий шаг - неудача.
Мой конвейер bitbucket:
image: atlassian/default-image:2
options:
docker: true
pipelines:
default:
- step:
name: build and publish docker image.
services:
- docker # enable Docker for your repository
script: # Modify the commands below to build your repository.
# set DOCKER_HUB_USERNAME and DOCKER_HUB_PASSWORD as environment variables
# Docker variables
- export IMAGE_NAME="${DOCKER_HUB_USERNAME}/${BITBUCKET_REPO_SLUG}:${BITBUCKET_BUILD_NUMBER}"
# build and test the Node app
- npm install
- npm test
# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -t "$IMAGE_NAME" .
# authenticate with the Docker Hub registry
- docker login --username "$DOCKER_HUB_USERNAME" --password "$DOCKER_HUB_PASSWORD"
# push the new Docker image to the Docker registry
- docker push "$IMAGE_NAME"
- step:
name: "Build and Test"
script:
- zip application.zip Dockerfile application.py cron.yaml Dockerrun.aws.json
artifacts:
- application.zip
- step:
name: "Deploy to Production"
deployment: production
script:
- pipe: atlassian/aws-elasticbeanstalk-deploy:0.2.5
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
APPLICATION_NAME: $APPLICATION_NAME
ZIP_FILE: "application.zip"
S3_BUCKET: $S3_BUCKET
VERSION_LABEL: "deploy-$BITBUCKET_BUILD_NUMBER-OlifeOlistApp"
ENVIRONMENT_NAME: $APPLICATION_ENVIRONMENT
Мой файл Docker:
FROM node:10-alpine
# Create app directory
WORKDIR /app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY ./package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# Bundle app source
COPY . .
EXPOSE 8080
CMD [ "npm","run" "start" ]