...
Once the project is in source code, then the pipeline workflow would look like this:
Checkout repository
...
Deploy to DEV (first environment in the pipeline)
...
Create a versioned artifact
...
Deploy versioned artifact to TEST
...
, STAGE or PROD
Psuedo Code
1. Checkout repository
Code Block | ||
---|---|---|
| ||
# Clone specific repo into your workspace git clone <git_repo_url> # Checkout specific branch git checkout <git_branch> |
2. Deploy to DEV (first environment in the pipeline)
Code Block |
---|
# Deploy to your DEV (first environment int he pipeline) hammer deploy DEV --labels="<specify_labels>" |
3. Create a versioned artifact
Code Block | ||
---|---|---|
| ||
# zip up the artifact or package using your favorite packaging method zip -q -r ${BUILD_NUMBER}.zip * # upload to Artifactory or Nexus |
4. Deploy versioned artifact to TEST, STAGE or PROD
Code Block | ||
---|---|---|
| ||
# download specific versioned artifact from Artifactory or Nexus # deploy to TEST, STAGE or PROD hammer deploy TEST --labels="<specify_labels>" |
...