Skip to content

Commit

Permalink
Merge branch 'master' into MINISHIFT_GITHUB_API_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
Schnitzel committed Oct 23, 2020
2 parents ee3f8a2 + 2560220 commit a313b7b
Show file tree
Hide file tree
Showing 269 changed files with 454 additions and 17,341 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local-dev/helm
minishift
minikube
k3d
kubectl
local-dev/kubectl
**/v8-*
node_modules/
build/*
Expand Down
16 changes: 11 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ node {
}

stage ('build images') {
sh script: "make -O${SYNC_MAKE_OUTPUT} -j6 build", label: "Building images"
sh script: "make -O${SYNC_MAKE_OUTPUT} -j8 build", label: "Building images"
}

try {
Expand All @@ -70,6 +70,7 @@ node {
sh script: "make k3d K3S_VERSION=${kubernetes_version['k3s']} KUBECTL_VERSION=${kubernetes_version['kubectl']}", label: "Making k3d"
sh script: "make -O${SYNC_MAKE_OUTPUT} k8s-tests -j2", label: "Making kubernetes tests"
sh script: "make -O${SYNC_MAKE_OUTPUT} controller-k8s-tests -j2", label: "Making controller based kubernetes tests"
sh script: "make k3d/cleanall", label: "Removing kubernetes install"
} catch (e) {
echo "Something went wrong, trying to cleanup"
cleanup()
Expand All @@ -86,7 +87,7 @@ node {
sh 'make minishift/cleanall || echo'
sh script: "make minishift MINISHIFT_GITHUB_API_TOKEN=$MINISHIFT_GITHUB_API_TOKEN MINISHIFT_CPUS=\$(nproc --ignore 3) MINISHIFT_MEMORY=24GB MINISHIFT_DISK_SIZE=70GB MINISHIFT_VERSION=${minishift_version} OPENSHIFT_VERSION=${openshift_version}", label: "Making openshift"
sh script: "make -O${SYNC_MAKE_OUTPUT} push-minishift -j5", label: "Pushing built images into openshift"
sh script: "make -O${SYNC_MAKE_OUTPUT} openshift-tests -j2", label: "Making openshift tests"
sh script: "make -O${SYNC_MAKE_OUTPUT} openshift-tests -j1", label: "Making openshift tests"
}
} catch (e) {
echo "Something went wrong, trying to cleanup"
Expand Down Expand Up @@ -119,10 +120,15 @@ node {
try {
if (env.SKIP_IMAGE_PUBLISH != 'true') {
sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login"
sh script: "make -O${SYNC_MAKE_OUTPUT} -j4 publish-amazeeiolagoon-baseimages publish-amazeeiolagoon-serviceimages publish-amazeeiolagoon-taskimages BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images"
sh script: "make -O${SYNC_MAKE_OUTPUT} -j8 publish-amazeeiolagoon-baseimages publish-amazeeiolagoon-serviceimages publish-amazeeiolagoon-taskimages BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images"
} else {
sh script: 'echo "skipped because of SKIP_IMAGE_PUBLISH env variable"', label: "Skipping image publishing"
}
if (env.BRANCH_NAME == 'main' ) {
withCredentials([string(credentialsId: 'vshn-gitlab-helmfile-ci-trigger', variable: 'TOKEN')]) {
sh script: "curl -X POST -F token=$TOKEN -F ref=master https://git.vshn.net/api/v4/projects/1263/trigger/pipeline", label: "Trigger lagoon-core helmfile sync on amazeeio-test6"
}
}
} catch (e) {
echo "Something went wrong, trying to cleanup"
cleanup()
Expand All @@ -142,12 +148,12 @@ node {
stage ('publish-amazeeio') {
withCredentials([string(credentialsId: 'amazeeiojenkins-dockerhub-password', variable: 'PASSWORD')]) {
sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login"
sh script: "make -O${SYNC_MAKE_OUTPUT} -j4 publish-amazeeio-baseimages", label: "Publishing built images"
sh script: "make -O${SYNC_MAKE_OUTPUT} -j8 publish-amazeeio-baseimages publish-amazeeio-taskimages", label: "Publishing legacy images to amazeeio"
}
}
}

if (env.BRANCH_NAME == 'master' && env.SKIP_IMAGE_PUBLISH != 'true') {
if (env.BRANCH_NAME == 'main' && env.SKIP_IMAGE_PUBLISH != 'true') {
stage ('save-images-s3') {
sh script: "make -O${SYNC_MAKE_OUTPUT} -j8 s3-save", label: "Saving images to AWS S3"
}
Expand Down
Loading

0 comments on commit a313b7b

Please sign in to comment.