Skip to content

Commit

Permalink
FLOW-2863 Testing in CICD Jenkins (kubernetes-sigs#317)
Browse files Browse the repository at this point in the history
* FLOW-2863 Testing in CICD Jenkins

* Update Jenkinsfile

* Update Jenkinsfile

* CICD approach Baby steps

* Including at.sh and fix Jenkinsfile

* Including at.sh and fix Jenkinsfile

* Including at.sh and fix Jenkinsfile 2

* +X permission

* use python in ATs

* add file permissions

* rm clean gimme

* clean Makefile

* permissions to binary

* fix makefile

* sudos user in docker

* print creentials info

* print creentials info I

* print creentials info I

* print creentials info II

* Update at.py

* Update Jenkinsfile

* Update at.py

* Update at.py

* Update at.py

* Update at.py

* Update at.py

* Update at.py

* Update at.py

* Update at.py

* Update Jenkinsfile

* Update Makefile

* Create startup.sh

* Update Makefile

* Update Jenkinsfile

* Update Makefile

* add exe startup.sh

* test-pytest-custom-args

* test-pytest-custom-args2

* test-pytest-custom-args3

* add BUILDTOOL_PRIVILEGED

* test-pytest-custom-args4

* use CTS as workdir

* try with ./CTS path

* move to /CTS in startup

* refactor test files path

* try with ./CTS path

* try with /CTS path

* rm files

* test-docker-daemon

* test-docker-daemon2

* test startup permissions

* remove chmod from Dockerfile

* add chmod from Dockerfile

* rm docker user from Dockerfile

* add chmod in Dockerfile

* update Jenkinsfile

* reduce permissions - rename cloud provisioner

* move permissions down

* decompress provisioner tar.gz

* tweak_dockerfile_permissions

---------

Co-authored-by: Laura Gutierrez <[email protected]>
Co-authored-by: lpgutierrez <[email protected]>
Co-authored-by: dandres-stratio <[email protected]>
Co-authored-by: lreciomelero <[email protected]>
  • Loading branch information
5 people authored Oct 26, 2023
1 parent 9418f4f commit de89079
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM stratio/cloud-testing-suite:0.1.0-SNAPSHOT

ADD bin/cloud-provisioner.tar.gz /CTS/resources/

RUN chmod -R 0700 /CTS/resources/bin/cloud-provisioner

CMD ["bash"]
13 changes: 9 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
@Library('libpipelines') _

hose {
EMAIL = 'eos'
EMAIL = 'eso'
BUILDTOOL = 'make'
DEVTIMEOUT = 30
BUILDTOOL_IMAGE = 'golang:1.19'
ANCHORE_POLICY = "production"
VERSIONING_TYPE = 'stratioVersion-3-3'
UPSTREAM_VERSION = '0.17.0'
DEPLOYONPRS = true
GRYPE_TEST = false
BUILDTOOL_INSTALL = 'make'
MODULE_LIST = [ "paas.cloud-provisioner:cloud-provisioner:tar.gz"]
BUILDTOOL_MEMORY_REQUEST = "1024Mi"
BUILDTOOL_MEMORY_LIMIT = "4096Mi"

DEV = { config ->
doPackage(conf: config, parameters: "GOCACHE=/tmp")
doDeploy(conf: config)
doDocker(conf: config)
doAT(conf: config, buildToolOverride: ['BUILDTOOL_IMAGE' : 'qa.int.stratio.com:8443/stratio/kind:%%VERSION', 'BUILDTOOL_PRIVILEGED' : true, 'BUILDTOOL_RUNASUSER' : "0"], configFiles: [[fileId: "Clouds-EKS-yaml", variable: "credentials"]], runOnPR: true)
}
INSTALL = { config ->
doAT(conf: config, buildToolOverride: ['BUILDTOOL_IMAGE' : 'qa.int.stratio.com:8443/stratio/kind:%%VERSION', 'BUILDTOOL_PRIVILEGED' : true, 'BUILDTOOL_RUNASUSER' : "0"], configFiles: [[fileId: "Clouds-EKS-yaml", variable: "credentials"]], runOnPR: true)
}
BUILDTOOL_MEMORY_REQUEST = "1024Mi"
BUILDTOOL_MEMORY_LIMIT = "4096Mi"
}
5 changes: 4 additions & 1 deletion Makefile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ package:
deploy:
bin/deploy.sh $(version)

acceptance-test:
/CTS/startup.sh $(groups)

change-version:
bin/change-version.sh $(version)

#################################################################################
.PHONY: all kind build install unit clean update generate gofmt verify lint shellcheck
.PHONY: all kind build install unit clean update generate gofmt verify lint shellcheck
4 changes: 3 additions & 1 deletion bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ if [ -d "$DIR" ] || [ -r "$FILE" ]; then
else
echo "Run 'make build' first"
exit 1
fi
fi

mv "$DIR"/cloud-provisioner-${VERSION}.${EXTENSION} "$DIR"/cloud-provisioner.${EXTENSION}

0 comments on commit de89079

Please sign in to comment.