diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 00dcb2b54cc7bfaf9e76dc67afedaf1f570672ed..a7a79d11c68f2c46447c69f8693ef232b734c5da 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -51,13 +51,20 @@ catalog:
   script:
     - su -c '/usr/local/bin/bundle exec rake catalog' cirunner
 
-deploy_test:
+deploy_test:master:
   stage: deploy
   except:
     - master
   script:
     - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner
 
+deploy_test:staging:
+  stage: deploy
+  variables:
+    COMPONENT: "staging"
+  script:
+    - su -c 'set -o pipefail; stdbuf -oL -eL ./ci-build.sh | ts' cirunner
+
 # However, sometimes it's important to have a way of triggering a deploy
 # from scratch manually even from the master branch, when i.e. new packages
 # got uploaded to the master component of the platform deb repo.
diff --git a/tests/platform-ci/ci-build.sh b/tests/platform-ci/ci-build.sh
index 120e28589a5679357b4d79ef3ab997e201ddd102..4710bc882d948ba5949b92820618e9972878c5c5 100755
--- a/tests/platform-ci/ci-build.sh
+++ b/tests/platform-ci/ci-build.sh
@@ -39,6 +39,9 @@ ROOTDIR=$(readlink -f "$(dirname $0)")
 # leap_platform
 PLATFORMDIR=$(readlink -f "${ROOTDIR}/../..")
 
+# deb repo component to configure
+COMPONENT=${COMPONENT:-"master"}
+
 # In the gitlab CI pipeline leap is installed in a different
 # stage by bundle. To debug you can run a single CI job locally
 # so we install leap_cli as gem here.
@@ -88,7 +91,7 @@ build_from_scratch() {
   # Create cloud.json needed for `leap vm` commands using AWS credentials
   which jq || ( apt-get update -y && apt-get install jq -y )
 
-  # Dsiable xtrace
+  # Disable xtrace
   set +x
 
   [ -z "$AWS_ACCESS_KEY" ]  && fail "\$AWS_ACCESS_KEY  is not set - please provide it as env variable."
@@ -102,7 +105,8 @@ build_from_scratch() {
   [ -d "./tags" ] || mkdir "./tags"
   /bin/echo "{\"environment\": \"$TAG\"}" | /usr/bin/json_pp > "${PROVIDERDIR}/tags/${TAG}.json"
 
-  pwd
+  # configure deb repo component
+  echo '{}' | jq ".sources.platform.apt |= { \"source\": \"http://deb.leap.se/platform\", \"component\": \"${COMPONENT}\" }" > common.json
 
   # remove old cached nodes
   echo "Removing old cached nodes..."