Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article describes the process for configuring automated uploads of mobile app builds to Data Theorem, from a CI/CD pipeline in Screwdriver. At the high-level the process is the following:

...

Please visit https://www.securetheorem.com/sdlc/api_access and copy the key labeled as “Upload API Key”.

Step 2: Save the Upload API Key as a Secret in Screwdriver

...

To do so, please visit the secrets tab within your pipeline to create a new secret:TODO: This picture is confusing? What are you trying to show? If it's the Secrets tab maybe we should remove the bottom half of the image

Image Modified



Enter DT_UPLOAD_API_KEY into the field with the value set to the Upload API Key that was retrieved in Step 1.

...

Code Block
firstline1
titlescrewdriver.yaml
linenumberstrue
# ....
jobs:
  upload_binary_to_datatheorem:
    requires: job_that_builds_binary # Please read below for more information
    secrets:
      - DT_UPLOAD_API_KEY
    steps:
      - run_upload_script: ./upload_mobile_binaries_to_datatheorem.sh $PATH_TO_BINARY_TO_UPLOAD # We will create the bash script in the next step
# ....


The one thing two things to pay attention here is in the requires section.

The first is to find out the path of where the binary will be created. You will need to find this out for step 5. For this example we'll assume it's located in ./build/apps/binary.apk.

Second, is the value that should go here in the requires section, which is the name of the job that is in charge of building the binary.

...

Code Block
linenumberstrue
# ....
jobs:
  create_binary:
    steps:
      - build: ./gradlew build # Let's assume it creates a binary in $SD_SOURCE_DIR/build/apps/
  upload_binary_to_datatheorem:
    requires: create_binary # Rely on the job that created the binary
    secrets:
      - DT_UPLOAD_API_KEY
    steps:
      - run_upload_script: ./upload_mobile_binaries_to_datatheorem.sh $SD_SOURCE_DIR/build/apps/binary.apk # Upload the binary that was created by the `create_binary` job
# ....

...

.

...


Info

The environment variable $SD_SOURCE_DIR is a convenient variable that is given to us by Screwdriver that points to the location of the checked-out code.

Please see the documentation for details and other environment variable


Step 4: Create a bash script for uploading a build to Data Theorem

...