Skip to content

Commit

Permalink
change docker registry for CI containers (#3539)
Browse files Browse the repository at this point in the history
* change docker registry for CI containers
  • Loading branch information
micbar authored Dec 9, 2022
1 parent 31c1cab commit 61a5414
Showing 1 changed file with 41 additions and 31 deletions.
72 changes: 41 additions & 31 deletions .drone.star
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# images
OC_CI_GOLANG = "owncloudci/golang:1.18"
OC_CI_ALPINE = "owncloudci/alpine:latest"
OSIXIA_OPEN_LDAP = "osixia/openldap:1.3.0"
REDIS = "redis:6-alpine"
OC_CI_PHP = "owncloudci/php:7.4"
OC_LITMUS = "owncloud/litmus:latest"
OC_CS3_API_VALIDATOR = "owncloud/cs3api-validator:0.2.0"
OC_CI_BAZEL_BUILDIFIER = "owncloudci/bazel-buildifier:latest"

# Shared step definitions
def licenseScanStep():
return {
"name": "license-scan",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"environment": {
"FOSSA_API_KEY": {
"from_secret": "fossa_api_key",
Expand All @@ -18,7 +28,7 @@ def licenseScanStep():
def makeStep(target):
return {
"name": "build",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"commands": [
"make %s" % target,
],
Expand All @@ -27,7 +37,7 @@ def makeStep(target):
def cloneOc10TestReposStep():
return {
"name": "clone-oC10-test-repos",
"image": "registry.cern.ch/docker.io/owncloudci/alpine:latest",
"image": OC_CI_ALPINE,
"commands": [
"source /drone/src/.drone.env",
"git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing",
Expand All @@ -41,7 +51,7 @@ def cloneOc10TestReposStep():
def ldapService():
return {
"name": "ldap",
"image": "registry.cern.ch/docker.io/osixia/openldap:1.3.0",
"image": OSIXIA_OPEN_LDAP,
"pull": "always",
"environment": {
"LDAP_DOMAIN": "owncloud.com",
Expand All @@ -55,7 +65,7 @@ def ldapService():
def redisService():
return {
"name": "redis",
"image": "registry.cern.ch/docker.io/webhippie/redis",
"image": REDIS,
"pull": "always",
"environment": {
"REDIS_DATABASES": 1,
Expand Down Expand Up @@ -120,7 +130,7 @@ def coverage():
"steps": [
{
"name": "unit-test",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"commands": [
"make test",
],
Expand Down Expand Up @@ -170,7 +180,7 @@ def testIntegration():
"steps": [
{
"name": "test",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"commands": [
"make test-integration",
],
Expand Down Expand Up @@ -205,7 +215,7 @@ def virtualViews():
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"detach": True,
"commands": [
"cd /drone/src/tests/oc-integration-tests/drone/",
Expand All @@ -220,7 +230,7 @@ def virtualViews():
cloneOc10TestReposStep(),
{
"name": "oC10APIAcceptanceTestsOcisStorage",
"image": "registry.cern.ch/docker.io/owncloudci/php:7.4",
"image": OC_CI_PHP,
"commands": [
"cd /drone/src",
"composer self-update",
Expand Down Expand Up @@ -264,7 +274,7 @@ def litmusOcisOldWebdav():
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"detach": True,
"commands": [
"cd /drone/src/tests/oc-integration-tests/drone/",
Expand All @@ -280,14 +290,14 @@ def litmusOcisOldWebdav():
},
{
"name": "sleep-for-revad-start",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"commands": [
"sleep 5",
],
},
{
"name": "litmus-ocis-old-webdav",
"image": "registry.cern.ch/docker.io/owncloud/litmus:latest",
"image": OC_LITMUS,
"environment": {
"LITMUS_URL": "http://revad-services:20080/remote.php/webdav",
"LITMUS_USERNAME": "einstein",
Expand Down Expand Up @@ -319,7 +329,7 @@ def litmusOcisNewWebdav():
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"detach": True,
"commands": [
"cd /drone/src/tests/oc-integration-tests/drone/",
Expand All @@ -335,14 +345,14 @@ def litmusOcisNewWebdav():
},
{
"name": "sleep-for-revad-start",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"commands": [
"sleep 5",
],
},
{
"name": "litmus-ocis-new-webdav",
"image": "registry.cern.ch/docker.io/owncloud/litmus:latest",
"image": OC_LITMUS,
"environment": {
# UUID is einstein user, see https://github.com/owncloud/ocis-accounts/blob/8de0530f31ed5ffb0bbb7f7f3471f87f429cb2ea/pkg/service/v0/service.go#L45
"LITMUS_URL": "http://revad-services:20080/remote.php/dav/files/4c510ada-c86b-4815-8820-42cdf82c3d51",
Expand Down Expand Up @@ -375,7 +385,7 @@ def litmusOcisSpacesDav():
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"detach": True,
"commands": [
"cd /drone/src/tests/oc-integration-tests/drone/",
Expand All @@ -391,14 +401,14 @@ def litmusOcisSpacesDav():
},
{
"name": "sleep-for-revad-start",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"commands": [
"sleep 5",
],
},
{
"name": "litmus-owncloud-spaces-dav",
"image": "registry.cern.ch/docker.io/owncloud/litmus:latest",
"image": OC_LITMUS,
"environment": {
"LITMUS_USERNAME": "einstein",
"LITMUS_PASSWORD": "relativity",
Expand Down Expand Up @@ -435,7 +445,7 @@ def cs3ApiValidatorOcis():
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"detach": True,
"commands": [
"cd /drone/src/tests/oc-integration-tests/drone/",
Expand All @@ -451,14 +461,14 @@ def cs3ApiValidatorOcis():
},
{
"name": "sleep-for-revad-start",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"commands": [
"sleep 5",
],
},
{
"name": "cs3api-validator-ocis",
"image": "owncloud/cs3api-validator:0.2.0",
"image": OC_CS3_API_VALIDATOR,
"commands": [
"/usr/bin/cs3api-validator /var/lib/cs3api-validator --endpoint=revad-services:19000",
],
Expand Down Expand Up @@ -487,7 +497,7 @@ def cs3ApiValidatorS3NG():
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"detach": True,
"commands": [
"cd /drone/src/tests/oc-integration-tests/drone/",
Expand All @@ -503,14 +513,14 @@ def cs3ApiValidatorS3NG():
},
{
"name": "sleep-for-revad-start",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"commands": [
"sleep 5",
],
},
{
"name": "cs3api-validator-S3NG",
"image": "owncloud/cs3api-validator:0.2.0",
"image": OC_CS3_API_VALIDATOR,
"commands": [
"/usr/bin/cs3api-validator /var/lib/cs3api-validator --endpoint=revad-services:19000",
],
Expand Down Expand Up @@ -549,7 +559,7 @@ def ocisIntegrationTests(parallelRuns, skipExceptParts = []):
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"detach": True,
"commands": [
"cd /drone/src/tests/oc-integration-tests/drone/",
Expand All @@ -567,7 +577,7 @@ def ocisIntegrationTests(parallelRuns, skipExceptParts = []):
cloneOc10TestReposStep(),
{
"name": "oC10APIAcceptanceTestsOcisStorage",
"image": "registry.cern.ch/docker.io/owncloudci/php:7.4",
"image": OC_CI_PHP,
"commands": [
"cd /drone/src/tmp/testrunner",
"composer self-update",
Expand Down Expand Up @@ -627,7 +637,7 @@ def s3ngIntegrationTests(parallelRuns, skipExceptParts = []):
makeStep("build-ci"),
{
"name": "revad-services",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"detach": True,
"commands": [
"cd /drone/src/tests/oc-integration-tests/drone/",
Expand All @@ -645,7 +655,7 @@ def s3ngIntegrationTests(parallelRuns, skipExceptParts = []):
cloneOc10TestReposStep(),
{
"name": "oC10APIAcceptanceTestsS3ngStorage",
"image": "registry.cern.ch/docker.io/owncloudci/php:7.4",
"image": OC_CI_PHP,
"commands": [
"cd /drone/src/tmp/testrunner",
"composer self-update",
Expand Down Expand Up @@ -687,14 +697,14 @@ def checkStarlark():
"steps": [
{
"name": "format-check-starlark",
"image": "registry.cern.ch/docker.io/owncloudci/bazel-buildifier:latest",
"image": OC_CI_BAZEL_BUILDIFIER,
"commands": [
"buildifier --mode=check .drone.star",
],
},
{
"name": "show-diff",
"image": "registry.cern.ch/docker.io/owncloudci/bazel-buildifier:latest",
"image": OC_CI_BAZEL_BUILDIFIER,
"commands": [
"buildifier --mode=fix .drone.star",
"git diff",
Expand Down Expand Up @@ -722,7 +732,7 @@ def checkGoGenerate():
"steps": [
{
"name": "check-go-generate",
"image": "registry.cern.ch/docker.io/library/golang:1.18",
"image": OC_CI_GOLANG,
"commands": [
"make go-generate",
"git diff --exit-code",
Expand Down

0 comments on commit 61a5414

Please sign in to comment.