This section explains how to build the web version of your app and deploy it to the correct environment.
Follow the pipeline setup instructions (ignore steps that are not relevant for front-end apps).
These steps assume your CI/CD is already set up using the DIGIT ci-as-code module.
Before creating the pipeline:
Make sure your project has a Docker folder at the root.
Inside it, use the cirrusci Flutter Docker tag so Jenkins can build your app correctly.
The .env file should load global assets from the environment-specific asset files.
.env
The global assets file must be in JSON format for Flutter.
Check the YAML files in each environment folder for examples.
Example (dev environment — works-dev.yaml):
works-shg-app: custom-js-injection: | sub_filter.conf: " sub_filter '<head>' '<head> <script src=https://works-dev.digit.org/works-dev-asset/worksGlobalConfig.json type=text/javascript></script>';"
This script loads the global config file for the web build.
Open Jenkins
Go to the Jenkins dashboard.
Navigate to your project using the folder path. For example, to build works_shg_app, go to: digit-works → frontend → works-shg-app
digit-works → frontend → works-shg-app
Start a Build
Click Build with Parameters.
In the search box, find and select your feature branch.
Click Build to start the process.
Get the Docker Image
After the build finishes successfully, open the Console Output.
Look for the line showing the Docker image that was created.
Copy the Docker image ID for deployment.
Open Jenkins Deployments
Go to the Jenkins deployments page.
Select the environment you want to deploy to. Example: To deploy works-shg-app to works-dev, go to: deployments → deploy-to-works-dev (URL: https://builds.digit.org/job/deployments/job/deploy-to-works-dev/arrow-up-right)
deployments → deploy-to-works-dev
Add the Docker Image
Take the Docker image ID you copied from the build step.
Paste it into the input box on the deployment page.
Start Deployment
Click Build to begin the deployment.
Once deployment is complete, Jenkins will show a confirmation message.
Last updated 3 months ago
Was this helpful?