haruka-7 / sapccm-docker-image

Docker image for SAP Commerce Cloud CLI
GNU General Public License v3.0
0 stars 0 forks source link

Docker image for SAP Commerce Cloud CLI

How to use this image

docker run -ti p3terfr/sapccm bash
sapccm -h
mvn -v

See SAP Help Portail for more informations.

Bitbucket pipeline example

pipelines:
  default:
    - step:
        clone:
          enabled: false
        name: 'Build'
        image:
          name: p3terfr/sapccm:latest
        artifacts: # defining the artifacts to be passed to each future step.
          - build-output.txt
        script:
          - sapccm config set auth-credentials $CCV2_API_TOKEN
          - sapccm build create --subscription-code=$CCV2_SUBSCRIPTION_CODE --name=$(echo "$BITBUCKET_BRANCH" | sed -e "s/^.*\///") --branch=$BITBUCKET_BRANCH > $BITBUCKET_CLONE_DIR/build-output.txt
    - step:
        trigger: manual
        clone:
          enabled: false
        name: 'Deploy'
        image:
          name: p3terfr/sapccm:latest
        script:
          - sapccm config set auth-credentials $CCV2_API_TOKEN
          - sapccm deployment create --subscription-code=$CCV2_SUBSCRIPTION_CODE --build-code=$(grep -Po '(?<=build\-code:\s).*' $BITBUCKET_CLONE_DIR/build-output.txt) --database-update-mode=NONE --environment-code=d1 --strategy=RECREATE

Thanks to Maikel Bollemeijer article on Acorel blog.