Skip to content

Commit

Permalink
Merge pull request #1141 from owncloud/useGlobalDirVariable
Browse files Browse the repository at this point in the history
[full-ci]Use directory references from global dir variable in drone.star file
  • Loading branch information
phil-davis authored Oct 20, 2022
2 parents c87268d + 8f23147 commit 65d2e09
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ dir = {
"federated": "/var/www/owncloud/federated",
"server": "/var/www/owncloud/server",
"testrunner": "/var/www/owncloud/testrunner",
"scalityConfig": "/var/www/owncloud/server/config/scality.config.php",
"browserService": "/home/seluser/Downloads",
}

config = {
Expand Down Expand Up @@ -1048,16 +1050,16 @@ def acceptance(ctx):
"name": "configure-app",
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
"commands": [
"cd /var/www/owncloud/server/apps/files_primary_s3",
"cp tests/drone/scality.config.php /var/www/owncloud/server/config",
"sed -i -e \"s/owncloud/owncloud-acceptance-tests-$DRONE_BUILD_NUMBER-$DRONE_STAGE_NUMBER/\" /var/www/owncloud/server/config/scality.config.php",
"sed -i -e \"s/accessKey1/$SCALITY_KEY/\" /var/www/owncloud/server/config/scality.config.php",
"sed -i -e \"s/verySecretKey1/$SCALITY_SECRET_ESCAPED/\" /var/www/owncloud/server/config/scality.config.php",
"sed -i -e \"s/http/https/\" /var/www/owncloud/server/config/scality.config.php",
"sed -i -e \"s/scality:8000/%s/\" /var/www/owncloud/server/config/scality.config.php" % params["externalScality"]["externalServerUrl"],
"cd /var/www/owncloud/server/",
"cd %s/apps/files_primary_s3" % dir["server"],
"cp tests/drone/scality.config.php %s/config" % dir["server"],
"sed -i -e \"s/owncloud/owncloud-acceptance-tests-$DRONE_BUILD_NUMBER-$DRONE_STAGE_NUMBER/\" %s" % dir["scalityConfig"],
"sed -i -e \"s/accessKey1/$SCALITY_KEY/\" %s" % dir["scalityConfig"],
"sed -i -e \"s/verySecretKey1/$SCALITY_SECRET_ESCAPED/\" %s" % dir["scalityConfig"],
"sed -i -e \"s/http/https/\" %s" % dir["scalityConfig"],
"sed -i -e \"s/scality:8000/%s/\" %s" % (params["externalScality"]["externalServerUrl"], dir["scalityConfig"]),
"cd %s" % dir["server"],
"php occ s3:create-bucket owncloud-acceptance-tests-$DRONE_BUILD_NUMBER-$DRONE_STAGE_NUMBER --accept-warning",
"cd /var/www/owncloud/testrunner/apps/files_primary_s3",
"cd %s/apps/files_primary_s3" % dir["testrunner"],
],
"environment": {
"SCALITY_KEY": {
Expand All @@ -1081,7 +1083,7 @@ def acceptance(ctx):
"aws configure set aws_access_key_id $SCALITY_KEY",
"aws configure set aws_secret_access_key $SCALITY_SECRET",
"aws --endpoint-url $SCALITY_ENDPOINT s3 rm --recursive s3://owncloud-acceptance-tests-$DRONE_BUILD_NUMBER-$DRONE_STAGE_NUMBER",
"/var/www/owncloud/testrunner/apps/files_primary_s3/tests/delete_all_object_versions.sh $SCALITY_ENDPOINT owncloud-acceptance-tests-$DRONE_BUILD_NUMBER-$DRONE_STAGE_NUMBER",
"%s/apps/files_primary_s3/tests/delete_all_object_versions.sh $SCALITY_ENDPOINT owncloud-acceptance-tests-$DRONE_BUILD_NUMBER-$DRONE_STAGE_NUMBER" % dir["testrunner"],
"aws --endpoint-url $SCALITY_ENDPOINT s3 rb --force s3://owncloud-acceptance-tests-$DRONE_BUILD_NUMBER-$DRONE_STAGE_NUMBER",
],
"environment": {
Expand Down Expand Up @@ -1475,7 +1477,7 @@ def browserService(browser):
},
"volumes": [{
"name": "downloads",
"path": "/home/seluser/Downloads",
"path": dir["browserService"],
}],
}]

Expand All @@ -1489,7 +1491,7 @@ def browserService(browser):
},
"volumes": [{
"name": "downloads",
"path": "/home/seluser/Downloads",
"path": dir["browserService"],
}],
}]

Expand Down Expand Up @@ -2161,7 +2163,7 @@ def phplint(ctx):
"type": "docker",
"name": "lint-test",
"workspace": {
"base": "/var/www/owncloud",
"base": dir["base"],
"path": "server/apps/%s" % ctx.repo.name,
},
"steps": skipIfUnchanged(ctx, "lint") +
Expand Down

0 comments on commit 65d2e09

Please sign in to comment.