Comments (3)
`image: atlassian/default-image:2
pipelines:
branches:
develop:
- step:
caches:
- node
script:
- npm install
artifacts:
- node_modules/**
- step:
name: Deploy to S3 Dev
deployment: staging # set to test, staging or production
# trigger: manual # uncomment to have a manual step
image: atlassian/pipelines-awscli
script:
- export BUILD_NUMBER=$(date +%Y%m%d%H%M%S)
- env
- mv ./src/assets/js/constants-dev.js ./src/assets/js/constants.js
- sed -i "s/DEPLOY_PATH/$BUILD_NUMBER/g" ./src/assets/js/constants.js
- rm ./src/assets/js/constants-local.js
- rm ./src/assets/js/constants-prod.js
- sed -i "s/constants-local/constants/g" ./src/index.html
- sed -i "s/assets/$BUILD_NUMBER/assets/g" ./src/index.html
- mkdir ./src/$BUILD_NUMBER
- mv ./src/assets ./src/$BUILD_NUMBER/
- aws s3 sync --delete ./src s3://yyy
- aws cloudfront create-invalidation --distribution-id yyy --paths "/index.html"
master:
- step:
caches:
- node
script:
- npm install
artifacts:
- node_modules/**
- step:
name: Deploy to S3 Prod
deployment: production # set to test, staging or production
# trigger: manual # uncomment to have a manual step
image: atlassian/pipelines-awscli
script:
- export BUILD_NUMBER=$(date +%Y%m%d%H%M%S)
- env
- mv src/assets/js/constants-prod.js src/assets/js/constants.js
- sed -i "s/DEPLOY_PATH/$BUILD_NUMBER/g" src/assets/js/constants.js
- rm src/assets/js/constants-local.js
- rm src/assets/js/constants-dev.js
- sed -i "s/.development.js/.production.min.js/g" src/index.html
- sed -i "s/constants-local/constants/g" src/index.html
- sed -i "s/assets/$BUILD_NUMBER/assets/g" src/index.html
- mkdir src/$BUILD_NUMBER
- mv src/assets src/$BUILD_NUMBER/
- aws s3 sync --delete ./src s3://xxx
- aws cloudfront create-invalidation --distribution-id xxx --paths "/index.html"
`
from bbrun.
Just ran the command deploy.sh again ... it worked, even by issuing that very same error. The deploy actually happened. I have no idea why this error is being pushed to console.
from bbrun.
I added a set -x
to my first command inside the step and was able to catch that the error was mine. Variables that do not exist locally are being sent empty to AWS commands.
from bbrun.
Related Issues (20)
- Unable to handle parallel steps
- Support for artifacts
- Support for `caches`, including custom cache `definitions` HOT 1
- Use private images hosted in AWS
- Docker containers aren't removed after run
- Docker run uses SH to run the .bbrun.sh script causing source commands to fail
- add --keepContainerRunning option HOT 2
- parallel steps run sequentially instead of in parallel
- Fails with Alpine linux images (i.e Docker in Docker)
- Using BBRUN inside a VM behind Proxy HOT 1
- Using atlassian/pipelines-awscli generates an error HOT 1
- bbrun should not start steps wich are used for deployment
- SSH Keys HOT 5
- Debug docker
- steps.forEach is not a function HOT 2
- New release for GH and NPM HOT 2
- "--network" option to specify a Docker network to connect the containers to
- Fails with alpine node:12 images HOT 1
- Argument --env dont work with advanced assignments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bbrun.