Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
stages:
- snapshot

variables:
ARTIFACT_DIRECTORY: "backup"
EXCLUDED_IDS: "packageName1,packageName2"
INCLUDED_IDS: ""
DRAFT_HANDLING: "ADD" #SKIP, ERROR
COMMIT_MESSAGE: "Automated tenant backup by FlashPipe-powered Gitlab CI/CD pipeline"
TMN_HOST: $DEV_TMN_HOST
OAUTH_HOST: $DEV_OAUTH_HOST
OAUTH_CLIENTID: $DEV_CLIENT_ID
OAUTH_CLIENTSECRET: $DEV_CLIENT_SECRET

take_snapshot:
stage: snapshot
image: engswee/flashpipe:latest
script:
- echo "Checking out main branch"
- git fetch origin main # Fetch the main branch from the remote
- git checkout main # Checkout the main branch locally in order to be able to push it back afterwards
- echo "Download the current state of the tenant and add it to the repo."
- 'echo "Taking a snapshot with the following parameters:"'
- 'echo "Directory: $ARTIFACT_DIRECTORY"'
- 'echo "Excluded IDs: $EXCLUDED_IDS"'
- 'echo "Included IDs: $INCLUDED_IDS"'
- 'echo "Draft Handling: $DRAFT_HANDLING"'
- 'echo "Commit Message: $COMMIT_MESSAGE"'
- >
flashpipe snapshot
--tmn-host $TMN_HOST
--oauth-host $OAUTH_HOST
--oauth-clientid $OAUTH_CLIENTID
--oauth-clientsecret $OAUTH_CLIENTSECRET
--dir-artifacts $ARTIFACT_DIRECTORY
--draft-handling "$DRAFT_HANDLING"
--git-commit-msg "$COMMIT_MESSAGE"
--ids-exclude "$EXCLUDED_IDS"
#--ids-include "$INCLUDED_IDS" # EITHER use included or excluded IDs parameter (remove the respective unneeded line from the file or keep it outside of the multi-line string started by ">"!)
- echo "Push temporary pipeline-local repo to the Git repo"
- git push https://gitlab-ci-token:$CI_JOB_TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH.git main
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: always # set to always run if triggered by schedule
- when: manual # still allow manual triggering, but never trigger by pushed commits.
42 changes: 0 additions & 42 deletions FlashPipe Demo/Groovy XML Transformation/META-INF/MANIFEST.MF

This file was deleted.

4 changes: 0 additions & 4 deletions FlashPipe Demo/Groovy XML Transformation/PROD/parameters.prop

This file was deleted.

42 changes: 0 additions & 42 deletions FlashPipe Demo/Groovy XML Transformation/QA/MANIFEST.MF

This file was deleted.

4 changes: 0 additions & 4 deletions FlashPipe Demo/Groovy XML Transformation/QA/parameters.prop

This file was deleted.

6 changes: 0 additions & 6 deletions FlashPipe Demo/Groovy XML Transformation/metainfo.prop

This file was deleted.

23 changes: 0 additions & 23 deletions FlashPipe Demo/Groovy XML Transformation/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

Loading