i am new to CI/CD.
in my staging/UAT server, we are having static configuration files/folder with a different database configuration that is added in .gitignore.
but in repository configuration, we are having production configuration.
when I tried CI/CD its building, it builds a whole repository and deployed it in a staging server with production configuration.
my project folder structure is:
Root Folder:
-> src (folder)
-> CDN(css/js - folder)
-> config (folder)
here I don't want to replace the config folder for every CI/CD.
Please help me how can I achieve this.
my staging deployment step:
- step:
name: 'Deployment to Staging'
deployment: staging
script:
- echo "Your deployment to staging script goes here..."
- apt-get update
- apt-get install -y zip
- zip -r application1.zip .
- pipe: atlassian/aws-code-deploy:0.2.5
variables:
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
APPLICATION_NAME: $AWS_APPLICATION_NAME
S3_BUCKET: $AWS_S3_BUCKET
LOCAL_PATH: 'src'
COMMAND: 'upload'
ZIP_FILE: 'application1.zip'
VERSION_LABEL: 'my-app-3.0.0'
- pipe: atlassian/aws-code-deploy:0.2.5
variables:
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
APPLICATION_NAME: $AWS_APPLICATION_NAME
DEPLOYMENT_GROUP: $AWS_DEPLOYMENT_GROUP
S3_BUCKET: $AWS_S3_BUCKET
COMMAND: 'deploy'
WAIT: 'true'
VERSION_LABEL: 'my-app-3.0.0'
IGNORE_APPLICATION_STOP_FAILURES: 'true'