Skip to content

Commit

Permalink
chore(ci): remove ci checks for PRs
Browse files Browse the repository at this point in the history
prow is doing all of this now. the only thing left for gitlab ci is the
tagged releases
  • Loading branch information
ecordell committed Jan 9, 2019
1 parent 842dc37 commit 8b9fc46
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 150 deletions.
55 changes: 2 additions & 53 deletions .gitlab-ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ local stages = utils.set(stages_list);

// List CI jobs
local jobs = {
// Helpers
local onlyMaster = {
only: ['master', 'tags'],
},

local onlyBranch = {
only: ['branches'],
except: ['master', 'tags'],
},

'container-base-build': baseJob.dockerBuild {
stage: stages.docker_base,
script: docker.build_and_push(images.base.name,
Expand All @@ -56,7 +46,8 @@ local jobs = {
'builder': images.ci.olm.name,
'olm': images.prerelease.olm.name,
'e2e': images.e2e.name,
})
}),
only: ['master', 'tags'],
},

'container-release': baseJob.dockerBuild {
Expand All @@ -81,23 +72,6 @@ local jobs = {
only: ['tags'],
},

"deploy-preview": baseJob.Deploy {
local _vars = self.localvars,
localvars+:: {
helm_opts: ["--force"],
},
stage: stages.deploy_preview,
when: "manual",
environment+: {
on_stop: "stop-preview",
},
} + onlyBranch,

"stop-preview": baseJob.DeployStop {
when: "manual",
stage: stages.deploy_preview,
} + onlyBranch,

"deploy-staging": baseJob.Deploy {
local _vars = self.localvars,
localvars+:: {
Expand All @@ -116,31 +90,6 @@ local jobs = {
only: ['master'],
},

# currently not needed, to re-enable remove the "." prefix
".deploy-teamui": baseJob.Deploy {
local _vars = self.localvars,
localvars+:: {
image: images.release,
domain: "teamui.console.team.coreos.systems",
namespace: "operator-lifecycle-manager",
catalog_namespace: "operator-lifecycle-manager",
channel: "staging",
helm_opts: ["--force"],
kubeconfig: "$TEAMUI_KUBECONFIG",
params+:: {
watchedNamespaces: "",
},
},
stage: stages.deploy_staging,
script+: [
"curl -X POST --data-urlencode \"payload={\\\"text\\\": \\\"New OLM Operator quay.io/coreos/olm:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA} deployed to ${TEAMUI_HOST}/k8s/ns/operator-lifecycle-manager/deployments/alm-operator\\\"}\" ${TEAMUI_SLACK_URL}",
],
environment+: {
name: "teamui",
},
only: [''],
},

"deploy-openshift": baseJob.Deploy {
local _vars = self.localvars,
localvars+:: {
Expand Down
98 changes: 3 additions & 95 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,6 @@
# Generated from .gitlab-ci.jsonnet
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
---
.deploy-teamui:
before_script:
- 'echo "version: 1.0.0-${CI_COMMIT_REF_SLUG}-pre" >> deploy/chart/Chart.yaml'
- 'echo "{\"catalog.image.ref\": \"quay.io/coreos/olm:${CI_COMMIT_REF_SLUG}-${SHA8}\", \"catalog_namespace\": \"operator-lifecycle-manager\", \"namespace\": \"operator-lifecycle-manager\", \"olm.image.ref\":
\"quay.io/coreos/olm:${CI_COMMIT_REF_SLUG}-${SHA8}\", \"package.image.ref\": \"quay.io/coreos/olm:${CI_COMMIT_REF_SLUG}-${SHA8}\", \"watchedNamespaces\": \"\"}" > params.json'
- cat params.json
environment:
name: teamui
url: https://teamui.console.team.coreos.systems
image: quay.io/coreos/alm-ci-build:latest
only:
- ''
script:
- echo $TEAMUI_KUBECONFIG | base64 -d > kubeconfig
- export KUBECONFIG=./kubeconfig
- charttmpdir=`mktemp -d 2>/dev/null || mktemp -d -t 'charttmpdir'`;mkdir -p ${charttmpdir};helm template -n olm --set namespace=operator-lifecycle-manager deploy/chart --set catalog.image.ref=quay.io/coreos/olm:${CI_COMMIT_REF_SLUG}-${SHA8}
--set catalog_namespace=operator-lifecycle-manager --set namespace=operator-lifecycle-manager --set olm.image.ref=quay.io/coreos/olm:${CI_COMMIT_REF_SLUG}-${SHA8} --set package.image.ref=quay.io/coreos/olm:${CI_COMMIT_REF_SLUG}-${SHA8}
--set watchedNamespaces= --output-dir ${charttmpdir};chartfilenames=$(ls ${charttmpdir}/olm/templates/*.yaml);echo ${chartfilenames};for f in ${chartfilenames};do if [[ $f == *.configmap.yaml ]];then
kubectl replace --force -f ${f};else kubectl apply -f ${f};fi;done;
- kubectl create secret docker-registry coreos-pull-secret --docker-server quay.io --docker-username $DOCKER_USER --docker-password $DOCKER_PASS --docker-email ignored@example.com --namespace=operator-lifecycle-manager
|| true
- kubectl rollout status -w deployment/olm-operator --namespace=operator-lifecycle-manager
- kubectl rollout status -w deployment/catalog-operator --namespace=operator-lifecycle-manager
- kubectl rollout status -w deployment/package-server --namespace=operator-lifecycle-manager
- 'curl -X POST --data-urlencode "payload={\"text\": \"New OLM Operator quay.io/coreos/olm:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA} deployed to ${TEAMUI_HOST}/k8s/ns/operator-lifecycle-manager/deployments/alm-operator\"}"
${TEAMUI_SLACK_URL}'
stage: deploy_staging
tags:
- kubernetes
variables:
ALM_DOMAIN: teamui.console.team.coreos.systems
K8S_NAMESPACE: operator-lifecycle-manager
container-base-build:
before_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
Expand All @@ -54,6 +22,9 @@ container-build:
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
- mkdir -p $PWD/bin
image: docker:git
only:
- master
- tags
script:
- docker build -f upstream.Dockerfile .
- "docker tag $(docker images --filter 'label=stage=builder' --format '{{.CreatedAt}}\t{{.ID}}' | sort -nr | head -n 1 | cut -f2) quay.io/coreos/olm-ci:${CI_COMMIT_REF_SLUG}"
Expand Down Expand Up @@ -111,7 +82,6 @@ deploy-openshift:
|| true
- kubectl rollout status -w deployment/olm-operator --namespace=operator-lifecycle-manager
- kubectl rollout status -w deployment/catalog-operator --namespace=operator-lifecycle-manager
- kubectl rollout status -w deployment/package-server --namespace=operator-lifecycle-manager
- 'curl -X POST --data-urlencode "payload={\"text\": \"New OLM Operator quay.io/coreos/olm:${CI_COMMIT_REF_SLUG}-${CI_COMMIT_SHA} deployed to ${OPENSHIFT_HOST}/k8s/ns/operator-lifecycle-manager/deployments/alm-operator\"}"
${TEAMUI_SLACK_URL}'
stage: deploy_staging
Expand All @@ -120,41 +90,6 @@ deploy-openshift:
variables:
ALM_DOMAIN: console.apps.ui-preserve.origin-gce.dev.openshift.com
K8S_NAMESPACE: operator-lifecycle-manager
deploy-preview:
before_script:
- 'echo "version: 1.0.0-${CI_COMMIT_REF_SLUG}-pre" >> deploy/chart/Chart.yaml'
- 'echo "{\"catalog.image.ref\": \"quay.io/coreos/olm-ci:${CI_COMMIT_REF_SLUG}-pre\", \"catalog_namespace\": \"ci-olm-${CI_COMMIT_REF_SLUG}\", \"namespace\": \"ci-olm-${CI_COMMIT_REF_SLUG}\", \"olm.image.ref\":
\"quay.io/coreos/olm-ci:${CI_COMMIT_REF_SLUG}-pre\", \"package.image.ref\": \"quay.io/coreos/olm-ci:${CI_COMMIT_REF_SLUG}-pre\", \"watchedNamespaces\": \"ci-olm-${CI_COMMIT_REF_SLUG}\"}" > params.json'
- cat params.json
environment:
name: review/ci-olm-${CI_COMMIT_REF_SLUG}
on_stop: stop-preview
url: https://olm-${CI_COMMIT_REF_SLUG}.k8s.devtable.com
except:
- master
- tags
image: quay.io/coreos/alm-ci-build:latest
only:
- branches
script:
- echo $CD_KUBECONFIG | base64 -d > kubeconfig
- export KUBECONFIG=./kubeconfig
- charttmpdir=`mktemp -d 2>/dev/null || mktemp -d -t 'charttmpdir'`;mkdir -p ${charttmpdir};helm template -n olm --set namespace=ci-olm-${CI_COMMIT_REF_SLUG} deploy/chart --set catalog.image.ref=quay.io/coreos/olm-ci:${CI_COMMIT_REF_SLUG}-pre
--set catalog_namespace=ci-olm-${CI_COMMIT_REF_SLUG} --set namespace=ci-olm-${CI_COMMIT_REF_SLUG} --set olm.image.ref=quay.io/coreos/olm-ci:${CI_COMMIT_REF_SLUG}-pre --set package.image.ref=quay.io/coreos/olm-ci:${CI_COMMIT_REF_SLUG}-pre
--set watchedNamespaces=ci-olm-${CI_COMMIT_REF_SLUG} --output-dir ${charttmpdir};chartfilenames=$(ls ${charttmpdir}/olm/templates/*.yaml);echo ${chartfilenames};for f in ${chartfilenames};do if [[ $f
== *.configmap.yaml ]];then kubectl replace --force -f ${f};else kubectl apply -f ${f};fi;done;
- kubectl create secret docker-registry coreos-pull-secret --docker-server quay.io --docker-username $DOCKER_USER --docker-password $DOCKER_PASS --docker-email ignored@example.com --namespace=ci-olm-${CI_COMMIT_REF_SLUG}
|| true
- kubectl rollout status -w deployment/olm-operator --namespace=ci-olm-${CI_COMMIT_REF_SLUG}
- kubectl rollout status -w deployment/catalog-operator --namespace=ci-olm-${CI_COMMIT_REF_SLUG}
- kubectl rollout status -w deployment/package-server --namespace=ci-olm-${CI_COMMIT_REF_SLUG}
stage: deploy_preview
tags:
- kubernetes
variables:
ALM_DOMAIN: olm-${CI_COMMIT_REF_SLUG}.k8s.devtable.com
K8S_NAMESPACE: ci-olm-${CI_COMMIT_REF_SLUG}
when: manual
deploy-staging:
before_script:
- 'echo "version: 1.0.0-${CI_COMMIT_REF_SLUG}-pre" >> deploy/chart/Chart.yaml'
Expand All @@ -178,7 +113,6 @@ deploy-staging:
|| true
- kubectl rollout status -w deployment/olm-operator --namespace=ci-alm-staging
- kubectl rollout status -w deployment/catalog-operator --namespace=ci-alm-staging
- kubectl rollout status -w deployment/package-server --namespace=ci-alm-staging
stage: deploy_staging
tags:
- kubernetes
Expand All @@ -196,32 +130,6 @@ stages:
- docker_release
- deploy_staging
- teardown
stop-preview:
before_script: []
environment:
action: stop
name: review/ci-olm-${CI_COMMIT_REF_SLUG}
url: https://olm-${CI_COMMIT_REF_SLUG}.k8s.devtable.com
except:
- master
- tags
image: quay.io/coreos/alm-ci-build:latest
only:
- branches
script:
- echo $CD_KUBECONFIG | base64 -d > kubeconfig
- export KUBECONFIG=./kubeconfig
- kubectl delete apiservice v1alpha1.packages.apps.redhat.com --ignore-not-found=true
- kubectl delete ns --ignore-not-found=true ci-olm-${CI_COMMIT_REF_SLUG}
- kubectl get pods -o wide -n ci-olm-${CI_COMMIT_REF_SLUG}
stage: deploy_preview
tags:
- kubernetes
variables:
ALM_DOMAIN: olm-${CI_COMMIT_REF_SLUG}.k8s.devtable.com
GIT_STRATEGY: none
K8S_NAMESPACE: ci-olm-${CI_COMMIT_REF_SLUG}
when: manual
tag-release:
before_script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS quay.io
Expand Down
3 changes: 1 addition & 2 deletions .gitlab-ci/base_jobs.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ local appr = utils.appr;
"$DOCKER_USER",
"$DOCKER_PASS") +
k8s.waitForDeployment("olm-operator", _vars.namespace) +
k8s.waitForDeployment("catalog-operator", _vars.namespace) +
k8s.waitForDeployment("package-server", _vars.namespace),
k8s.waitForDeployment("catalog-operator", _vars.namespace)
} + job_tags,

DeployStop: self.Deploy {
Expand Down

0 comments on commit 8b9fc46

Please sign in to comment.