Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
- defaults:
name: global
timeout: '15m'
jobdescription: "Managed by Jenkins Job Builder, do not edit manually! Update via https://github.com/openshiftio/openshiftio-cico-jobs"
git_organization: fabric8-services
github_user: almighty-bot
github_hooks: true
branch: master
discarder_days: -1
discarder_num: -1
build_branch: master
manifest_bouncer_tag: d21c96f
- admin_list_defaults: &admin_list_defaults
name: 'admin_list_defaults'
admin-list:
- aditya-konarde
- akurinnoy
- alexeykazakov
- amisevsk
- andrewazores
- aptmac
- arajkumar
- artaleks9
- ashumilova
- aslakknutsen
- baijum
- bartoszmajsak
- chmouel
- chrislessard
- christianvogt
- davidfestal
- deepak1725
- dependabot[bot]
- dependabot-preview[bot]
- dgutride
- DhritiShikhar
- dipak-pawar
- dipanjanS
- dlabrecq
- dmytro-ndp
- ebaron
- edewit
- evidolob
- fabric8cd
- fche
- gastaldi
- hrishin
- ia3andy
- ibuziuk
- inoxx03
- invincibleJai
- jfchevrette
- jiekang
- jmelis
- joshuawilson
- Katka92
- kbsingh
- khrm
- kwk
- l0rd
- ldimaggi
- ljelinkova
- maorfr
- MatousJobanek
- maxandersen
- michaelkleinhenz
- mindreeper2420
- miteshvp
- mmclanerh
- msrb
- musienko-maxim
- neugens
- nimishamukherjee
- nurali-techie
- Ohrimenko1988
- pbergene
- piyush-garg
- pmacik
- ppitonak
- Preeticp
- quintesse
- rhopp
- rkratky
- rohitkrai03
- rohanKanojia
- rupalibehera
- sahil143
- samuzzal-choudhury
- sanketpathak
- sbose78
- sbryzak
- ScrewTSW
- skabashnyuk
- SkorikSergey
- skryzhny
- sthaha
- stooke
- tinakurian
- tisnik
- tradej
- tsmaeder
- vikram-raj
- vparfonov
- xcoulon
- sivaavkd
- yzainee
- flacatus
- github_pull_request_defaults: &github_pull_request_defaults
name: 'github_pull_request_defaults'
<<: *admin_list_defaults
cron: '* * * * *'
github-hooks: '{github_hooks}'
permit-all: false
trigger-phrase: '.*\[test\].*'
allow-whitelist-orgs-as-admins: true
status-context: "ci.centos.org PR build"
- trigger:
name: githubprb
triggers:
- github-pull-request:
<<: *github_pull_request_defaults
- scm:
name: git-scm
scm:
- git:
credentials-id: "c4872223-4024-4cd4-8e09-1bbdc7d6e971"
url: "{git_url}"
skip-tag: True
git-tool: ci-git
refspec: '+refs/pull/*:refs/remotes/origin/pr/*'
branches:
- '${{ghprbActualCommit}}'
basedir: '{git_basedir}'
- vault_defaults: &vault_defaults
name: 'vault_defaults'
vault-url: 'https://vault.devshift.net'
credentials-id: '52ce5cda-e8f3-47a7-917b-8771518b4729'
- kube-config-dsaas-stg: &kube-config-dsaas-stg
name: "kube-config-dsaas-stg"
secret-path: 'app-sre/creds/kube-configs/dsaas-stg'
secret-values:
- env-var: 'KUBE_SERVER'
vault-key: 'server'
- env-var: 'KUBE_TOKEN'
vault-key: 'token'
- kube-config-dsaas: &kube-config-dsaas
name: "kube-config-dsaas-stg"
secret-path: 'app-sre/creds/kube-configs/dsaas'
secret-values:
- env-var: 'KUBE_SERVER'
vault-key: 'server'
- env-var: 'KUBE_TOKEN'
vault-key: 'token'
- fabric8-planner-test-token: &fabric8-planner-test-token
name: "fabric8-planner-test-token"
secret-path: 'devtools-osio-ci/fabric8-planner-test-token-refresh-token'
secret-values:
- env-var: 'REFRESH_TOKEN'
vault-key: 'token'
- npm-build-deliver-creds-gh-token: &npm-build-deliver-creds-gh-token
name: "npm-build-deliver-creds-gh-token"
secret-path: 'devtools-osio-ci/npm-build-deliver-creds-gh-token'
secret-values:
- env-var: 'GH_TOKEN'
vault-key: 'token'
- npm-build-deliver-creds-npm-token: &npm-build-deliver-creds-npm-token
name: "npm-build-deliver-creds-npm-token"
secret-path: 'devtools-osio-ci/npm-build-deliver-creds-npm-token'
secret-values:
- env-var: 'NPM_TOKEN'
vault-key: 'token'
- fabric8-build-dockerio-dockercfg: &fabric8-build-dockerio-dockercfg
name: "fabric8-build-dockerio-dockercfg"
secret-path: 'devtools-osio-ci/fabric8-build-dockerio-dockercfg'
secret-values:
- env-var: 'FABRIC8_DOCKERIO_CFG'
vault-key: 'config.json'
- fabric8-github-ssh-key: &fabric8-github-ssh-key
name: "fabric8-github-ssh-key"
secret-path: 'devtools-osio-ci/fabric8-github-ssh-key'
secret-values:
- env-var: 'FABRIC8_GITHUB_SSH_KEY'
vault-key: 'ssh-key'
- fabric8-hub-token: &fabric8-hub-token
name: "fabric8-hub-token"
secret-path: 'devtools-osio-ci/fabric8-hub-token'
secret-values:
- env-var: 'FABRIC8_HUB_TOKEN'
vault-key: 'hub'
- fabric8-hub-token: &fabric8-build-devcluster
name: "fabric8-build-devcluster"
secret-path: 'devtools-osio-ci/fabric8-build-devcluster'
secret-values:
- env-var: 'FABRIC8_DEVCLUSTER_TOKEN'
vault-key: 'OS_TOKEN'
- fabric8-maven-settingsxml: &fabric8-maven-settingsxml
name: "fabric8-maven-settingsxml"
secret-path: 'devtools-osio-ci/fabric8-maven-settingsxml'
secret-values:
- env-var: 'FABRIC8_MAVEN_SETTINGS'
vault-key: 'settings.xml'
- registry-devshift-credentials: &registry-devshift-credentials
name: "registry-devshift-credentials"
secret-path: 'app-sre/cico/registry-devshift-credentials'
secret-values:
- env-var: 'DEVSHIFT_USERNAME'
vault-key: 'devshift_username'
- env-var: 'DEVSHIFT_PASSWORD'
vault-key: 'devshift_password'
- quay-credentials: &quay-credentials
name: "quay-credentials"
secret-path: 'app-sre/cico/quay-credentials'
secret-values:
- env-var: 'QUAY_USERNAME'
vault-key: 'quay_username'
- env-var: 'QUAY_PASSWORD'
vault-key: 'quay_password'
- quay-eclipse-che-credentials: &quay-eclipse-che-credentials
name: "quay-eclipse-che-credentials"
secret-path: 'devtools-osio-ci/quay-eclipse-che-credentials'
secret-values:
- env-var: 'QUAY_ECLIPSE_CHE_USERNAME'
vault-key: 'quay_eclipse_che_username'
- env-var: 'QUAY_ECLIPSE_CHE_PASSWORD'
vault-key: 'quay_eclipse_che_password'
- che-bot-github-credentials: &che-bot-github-credentials
name: "che-bot-github-credentials"
secret-path: "devtools-osio-ci/che-bot-github-token"
secret-values:
- env-var: 'CHE_BOT_GITHUB_TOKEN'
vault-key: 'che-bot-github-token'
- eclipse-che-oss-sonatype: &eclipse-che-oss-sonatype
name: "eclipse-che-oss-sonatype"
secret-path: "devtools-osio-ci/che-oss-sonatype"
secret-values:
- env-var: 'CHE_OSS_SONATYPE_USERNAME'
vault-key: 'che_oss_sonatype_username'
- env-var: 'CHE_OSS_SONATYPE_PASSWORD'
vault-key: 'che_oss_sonatype_password'
- env-var: 'CHE_MAVEN_SETTINGS'
vault-key: 'settings.xml'
- env-var: 'CHE_OSS_SONATYPE_GPG_KEY'
vault-key: 'che_oss_sonatype_gpg_key'
- env-var: 'CHE_OSS_SONATYPE_PASSPHRASE'
vault-key: 'che_oss_sonatype_gpg_passphrase'
- eclipse-che-github-ssh-key: &eclipse-che-github-ssh-key
name: "eclipse-che-github-ssh-key"
secret-path: 'devtools-osio-ci/eclipse-che-github-ssh-key'
secret-values:
- env-var: 'CHE_GITHUB_SSH_KEY'
vault-key: 'che-github-ssh-key'
- osiotestmachine-clean-up-gh-token: &osiotestmachine-clean-up-gh-token
name: "osiotestmachine-clean-up-gh-token"
secret-path: 'devtools-osio-ci/osiotestmachine-clean-up-gh-token'
secret-values:
- env-var: 'GITHUB_TOKEN'
vault-key: 'token'
- copr-mercator-api-token: &copr-mercator-api-token
name: "copr-mercator-api-token"
secret-path: 'devtools-osio-ci/copr-mercator-api-token'
secret-values:
- env-var: 'COPR_LOGIN_MERCATOR'
vault-key: 'login'
- env-var: 'COPR_TOKEN_MERCATOR'
vault-key: 'token'
- rh-che-compatibility-github-credentials: &rh-che-compatibility-github-credentials
name: "rh-che-compatibility-github-credentials"
secret-path: 'devtools-osio-ci/rh-che-compatibility-github-push-token'
secret-values:
- env-var: 'GITHUB_PUSH_TOKEN'
vault-key: 'TOKEN'
- env-var: 'GITHUB_TOKEN_PASSWORD'
vault-key: 'PASSWORD'
- rh-che-automation-credentials-devrdu2c-fabric8-io: &rh-che-automation-credentials-devrdu2c-fabric8-io
name: "rh-che-automation-credentials-devrdu2c-fabric8-io"
secret-path: 'devtools-osio-ci/rh-che-automation-credentials-devrdu2c-fabric8-io'
secret-values:
- env-var: 'RH_CHE_AUTOMATION_RDU2C_USERNAME'
vault-key: 'username'
- env-var: 'RH_CHE_AUTOMATION_RDU2C_PASSWORD'
vault-key: 'password'
- rh-che-automation-credentials-prod-preview-openshift-io: &rh-che-automation-credentials-prod-preview-openshift-io
name: "rh-che-automation-credentials-prod-preview-openshift-io"
secret-path: 'devtools-osio-ci/rh-che-automation-credentials-prod-preview-openshift-io'
secret-values:
- env-var: 'KEYCLOAK_TOKEN'
vault-key: 'keycloak_token'
- env-var: 'RH_CHE_AUTOMATION_CHE_PREVIEW_USERNAME'
vault-key: 'che_preview_username'
- env-var: 'RH_CHE_AUTOMATION_CHE_PREVIEW_PASSWORD'
vault-key: 'che_preview_password'
- env-var: 'RH_CHE_AUTOMATION_CHE_PREVIEW_EMAIL'
vault-key: 'che_preview_email'
- rh-che-automation-credentials-dockerhub: &rh-che-automation-credentials-dockerhub
name: "rh-che-automation-credentials-dockerhub"
secret-path: 'devtools-osio-ci/rh-che-automation-credentials-dockerhub'
secret-values:
- env-var: 'RH_CHE_AUTOMATION_DOCKERHUB_USERNAME'
vault-key: 'username'
- env-var: 'RH_CHE_AUTOMATION_DOCKERHUB_PASSWORD'
vault-key: 'password'
- rhche-flaky-2-creds: &rhche-flaky-2-creds
name: "rhche-flaky-2-creds"
secret-path: 'devtools-osio-ci/rhche-flaky-2-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- env-var: 'EMAIL'
vault-key: 'email'
- rhche-periodic-2-creds: &rhche-periodic-2-creds
name: "rhche-periodic-2-creds"
secret-path: 'devtools-osio-ci/rhche-periodic-2-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- env-var: 'EMAIL'
vault-key: 'email'
- rhche-periodic-2a-creds: &rhche-periodic-2a-creds
name: "rhche-periodic-2a-creds"
secret-path: 'devtools-osio-ci/rhche-periodic-2a-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- env-var: 'EMAIL'
vault-key: 'email'
- rhche-periodic-2aProd-creds: &rhche-periodic-2aProd-creds
name: "rhche-periodic-2aProd-creds"
secret-path: 'devtools-osio-ci/rhche-periodic-2aProd-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- env-var: 'EMAIL'
vault-key: 'email'
- rhche-periodic-1b-creds: &rhche-periodic-1b-creds
name: "rhche-periodic-1b-creds"
secret-path: 'devtools-osio-ci/rhche-periodic-1b-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- env-var: 'EMAIL'
vault-key: 'email'
- rhche-periodic-1a-creds: &rhche-periodic-1a-creds
name: "rhche-periodic-1a-creds"
secret-path: 'devtools-osio-ci/rhche-periodic-1a-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- env-var: 'EMAIL'
vault-key: 'email'
- qe-osio-dev-cluster-SA-token: &qe-osio-dev-cluster-SA-token
name: "qe-osio-dev-cluster-SA-token"
secret-path: "devtools-osio-ci/qe-osio-dev-cluster-SA-token"
secret-values:
- env-var: 'RH_CHE_AUTOMATION_DEV_CLUSTER_SA_TOKEN'
vault-key: 'sa_token'
- fabric8-planner-test-preview-creds: &fabric8-planner-test-preview-creds
name: "fabric8-planner-test-preview-creds"
secret-path: 'devtools-osio-ci/fabric8-planner-test-preview-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- recommender-api-token: &recommender-api-token
name: "recommender-api-token"
secret-path: 'devtools-osio-ci/recommender-api-token'
secret-values:
- env-var: 'RECOMMENDER_API_TOKEN'
vault-key: 'token'
- 3scale-user-key: &3scale-user-key
name: "3scale-user-key"
secret-path: 'devtools-osio-ci/3scale-user-key'
secret-values:
- env-var: 'THREE_SCALE_PREVIEW_USER_KEY'
vault-key: 'user_key'
- recommender-refresh-token: &recommender-refresh-token
name: "recommender-refresh-token"
secret-path: 'devtools-osio-ci/recommender-refresh-token'
secret-values:
- env-var: 'RECOMMENDER_REFRESH_TOKEN'
vault-key: 'token'
- recommender-api-token-prod: &recommender-api-token-prod
name: "recommender-api-token-prod"
secret-path: 'devtools-osio-ci/recommender-api-token-prod'
secret-values:
- env-var: 'RECOMMENDER_API_TOKEN'
vault-key: 'token'
- fabric8cd-sonatype-creds: &fabric8cd-sonatype-creds
name: "fabric8cd-sonatype-creds"
secret-path: 'devtools-osio-ci/sonatype-creds'
secret-values:
- env-var: 'SONATYPE_USERNAME'
vault-key: 'sonatype_username'
- env-var: 'SONATYPE_PASSWORD'
vault-key: 'sonatype_password'
- gpgkeys-for-signing-maven-artefacts: &gpgkeys-for-signing-maven-artefacts
name: "gpgkeys-for-signing-maven-artefacts"
secret-path: 'devtools-osio-ci/gpgkeys'
secret-values:
- env-var: 'PUBRING'
vault-key: 'pubring.gpg'
- env-var: 'SEC_JENKINS'
vault-key: 'sec-jenkins.gpg'
- env-var: 'SECRING'
vault-key: 'secring.gpg'
- env-var: 'TRUSTDB'
vault-key: 'trustdb.gpg'
- env-var: 'GPG_PASSPHRASE'
vault-key: 'gpg.passphrase'
- che-akamai-cdn-auth: &che-akamai-cdn-auth
name: "che-akamai-cdn-auth"
secret-path: "devtools-osio-ci/akamai-che-auth"
secret-values:
- env-var: 'AKAMAI_CHE_AUTH'
vault-key: 'AKAMAI_CHE_AUTH'
- wrapper:
name: che_credentials_wrapper
wrappers:
- credentials-binding:
- username-password-separated:
credential-id: b2ae0d9a-307a-4df3-b027-9aa0c22e29dd
username: RHCHEBOT_DOCKER_HUB_USERNAME
password: RHCHEBOT_DOCKER_HUB_PASSWORD
- file:
credential-id: 93da78ec-7785-49ab-a1ef-586424b3e94f
variable: creds_config_file
- wrapper:
name: che_functional_tests_credentials_wrapper-periodical-prod-preview.openshift.io-free-stg
wrappers:
- credentials-binding:
- text:
credential-id: 1e0bbb30-cddd-4b6f-bc61-bb4ebd2706e5
variable: KEYCLOAK_TOKEN
- username-password-separated:
credential-id: ac51aeb0-a436-4a50-a71d-aa6f99075398
username: OSIO_USERNAME
password: OSIO_PASSWORD
- wrapper:
name: che_functional_tests_credentials_wrapper-prcheck-openshift.io-2
wrappers:
- credentials-binding:
- text:
credential-id: de793dce-5821-4182-af4f-6c7b42b5c21d
variable: KEYCLOAK_TOKEN
- username-password-separated:
credential-id: ac51aeb0-a436-4a50-a71d-aa6f99075398
username: OSIO_USERNAME
password: OSIO_PASSWORD
- wrapper:
name: che_functional_tests_credentials_wrapper-prcheck-prod-preview.openshift.io-2a
wrappers:
- credentials-binding:
- text:
credential-id: 60bf228a-e858-4ae3-94fb-7e73fa7d52d9
variable: KEYCLOAK_TOKEN
- username-password-separated:
credential-id: f9b7e98d-2ba0-40c3-8454-2475a064e216
username: OSIO_USERNAME
password: OSIO_PASSWORD
- job_template_defaults: &job_template_defaults
name: 'job_template_defaults'
description: |
{jobdescription}
node: "{ci_project}"
concurrent: true
beforeGetNode: ""
properties:
- github:
url: https://github.com/{git_organization}/{git_repo}/
- build-discarder:
days-to-keep: '{discarder_days}'
num-to-keep: '{discarder_num}'
scm:
- git-scm:
git_url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
git_basedir: ''
triggers:
- githubprb:
github_hooks: '{github_hooks}'
builders:
- shell: |
# testing out the cico client
set +e
{beforeGetNode}
cp ~/artifacts.key .
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f jenkins-env.json
env > jenkins-env
$ssh_cmd yum -y install rsync
if [ -n "${{ghprbTargetBranch}}" ]; then
git rebase --preserve-merges origin/${{ghprbTargetBranch}}
rtn_code=$?
if [ $rtn_code -ne 0 ]; then
echo "The branch can not be rebased onto origin/${{ghprbTargetBranch}}."
exit $rtn_code
fi
else
echo "Not a PR build, using master"
fi
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload \
&& /usr/bin/timeout {timeout} $ssh_cmd -t "cd payload && {ci_cmd}"
rtn_code=$?
if [ $rtn_code -eq 0 ]; then
cico node done $CICO_ssid
else
if [[ $rtn_code -eq 124 ]]; then
echo "BUILD TIMEOUT";
cico node done $CICO_ssid
else
# fail mode gives us 12 hrs to debug the machine
curl "http://admin.ci.centos.org:8080/Node/fail?key=$CICO_API_KEY&ssid=$CICO_ssid"
fi
fi
exit $rtn_code
- job-template:
name: '{ci_project}-{git_repo}'
wrappers:
- ansicolor
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-credentials
- *registry-devshift-credentials
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-prcheck'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-credentials
- *registry-devshift-credentials
- che_functional_tests_credentials_wrapper-periodical-prod-preview.openshift.io-free-stg
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-create-comment'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-credentials
- *registry-devshift-credentials
- *fabric8-hub-token
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-prcheck-publish-artifacts'
publishers:
- archive:
artifacts: '{artifacts}'
allow-empty: '{allow_empty}'
fingerprint: '{fingerprint}'
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-jjb-test'
builders:
- shell: |
git rebase --preserve-merges origin/${{ghprbTargetBranch}}
{ci_cmd}
exit $?
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-coverage'
triggers:
- github-pull-request:
status-context: "ci.centos.org PR build (coverage)"
<<: *github_pull_request_defaults
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-e2e'
triggers:
- github-pull-request:
status-context: "ci.centos.org PR build (e2e)"
<<: *github_pull_request_defaults
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-wit-go-benchmarks'
triggers:
- timed: '59 23 * * 6'
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-analytics'
registry: 'MISSING_REGISTRY_NAME'
image_name: 'MISSING_IMAGE_NAME'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-credentials
- *registry-devshift-credentials
- ansicolor
triggers:
- github-pull-request:
status-context: "ci.centos.org PR build (fabric8-analytics)"
org-list:
- fabric8-analytics
success-comment: "$ghprbPullAuthorLoginMention Your image is available in the registry: `docker pull {registry}/{image_name}:SNAPSHOT-PR-$ghprbPullId`"
<<: *github_pull_request_defaults
publishers:
- email:
recipients: ptisnovs@redhat.com
notify-every-unstable-build: true
send-to-individuals: true
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-f8planner'
registry: 'MISSING_REGISTRY_NAME'
image_name: 'MISSING_IMAGE_NAME'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *fabric8-planner-test-token
- *quay-credentials
- *registry-devshift-credentials
- *fabric8-planner-test-preview-creds
- ansicolor
triggers:
- github-pull-request:
status-context: "ci.centos.org PR build (fabric8-planner)"
org-list:
- fabric8-ui
success-comment: "$ghprbPullAuthorLoginMention Your image is available in the registry. Run `docker pull {registry}/{image_name}:SNAPSHOT-PR-$ghprbPullId && docker run -it -p 5000:8080 {registry}/{image_name}:SNAPSHOT-PR-$ghprbPullId` and visit `http://localhost:5000` to access it."
<<: *github_pull_request_defaults
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-analytics-copr-mercator'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *copr-mercator-api-token
- ansicolor
triggers:
- github-pull-request:
status-context: "ci.centos.org PR (copr) build (fabric8-analytics)"
org-list:
- fabric8-analytics
<<: *github_pull_request_defaults
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-hdd'
image_name: 'MISSING_IMAGE_NAME'
registry: 'MISSING_REGISTRY_NAME'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-credentials
- *registry-devshift-credentials
- ansicolor
triggers:
- github-pull-request:
status-context: "ci.centos.org PR build (fabric8-hdd)"
org-list:
- fabric8-hdd
success-comment: "$ghprbPullAuthorLoginMention Your image is available in the registry: `docker pull {registry}/{image_name}:SNAPSHOT-PR-$ghprbPullId`"
<<: *github_pull_request_defaults
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-hdd-eslint'
wrappers:
- ansicolor
git_organization: fabric8-hdd
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_eslint.sh'
timeout: '20m'
triggers:
- github-pull-request:
status-context: "ci.centos.org eslint run (fabric8-hdd)"
org-list:
- fabric8-hdd
<<: *github_pull_request_defaults
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-analytics-pylint'
wrappers:
- ansicolor
git_organization: fabric8-analytics
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_pylint.sh'
timeout: '20m'
triggers:
- github-pull-request:
status-context: "ci.centos.org pylint run (fabric8-analytics)"
org-list:
- fabric8-analytics
<<: *github_pull_request_defaults
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-analytics-pydoc'
git_organization: fabric8-analytics
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_pydoc.sh'
timeout: '20m'
triggers:
- github-pull-request:
status-context: "ci.centos.org check-style run (fabric8-analytics)"
org-list:
- fabric8-analytics
<<: *github_pull_request_defaults
<<: *job_template_defaults
- job-template: &job_template_build_defaults
name: 'job_template_build_defaults'
subdir: ''
description: |
{jobdescription}
node: "{ci_project}"
properties:
- github:
url: https://github.com/{git_organization}/{git_repo}/
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- '{branch}'
triggers:
- github
svc_name: none
prj_name: dsaas-preview
saas_git: none
saas_service_name: none
saasherder_prepare: |
if [ "$SAAS_GIT" != "none" ]; then
SAAS_ENV=staging
PATH=$PATH:~/.local/bin/
CONTEXT=$(echo $SAAS_GIT | sed 's/.*://')
SAAS_GIT=$(echo $SAAS_GIT | sed 's/:.*//')
SAASHERDER_OBJECT_WHITELIST=Deployment,DeploymentConfig,Service,ConfigMap,Role,RoleBinding,ServiceAccount,CronJob
if [[ -z "$SAAS_SERVICE_NAME" || "$SAAS_SERVICE_NAME" == "none" ]]; then
SAAS_SERVICE_NAME=$GIT_REPO
fi
if [ "$SUBDIR" != "" ]; then
SAAS_SERVICE_NAME=$SAAS_SERVICE_NAME"-"$SUBDIR
fi
git clone --depth 1 https://github.com/openshiftio/$SAAS_GIT saas.git
cd saas.git
[ "$CONTEXT" != "$SAAS_GIT" ] && saasherder --context $CONTEXT config get-contexts > /dev/null
export DEVSHIFT_TAG_LEN=$(saasherder --environment $SAAS_ENV get hash_length $SAAS_SERVICE_NAME)
cd ..
fi
saasherder_deploy: |
if [ "$SVC_NAME" != "none" ]; then
oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" rollout latest $SVC_NAME -n $PRJ_NAME
rtn_code=$?
fi
if [ "$SAAS_GIT" != "none" ]; then
cd saas.git
saasherder --environment $SAAS_ENV update hash $SAAS_SERVICE_NAME $GIT_COMMIT
saasherder --environment $SAAS_ENV pull $SAAS_SERVICE_NAME
saasherder --environment $SAAS_ENV template --filter Route --output-dir $GIT_REPO-processed tag $SAAS_SERVICE_NAME
saasherder --environment $SAAS_ENV label --output-dir $GIT_REPO-processed --saas-repo-url $SAAS_GIT $SAAS_SERVICE_NAME > label_selector
oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" apply -f $GIT_REPO-processed/$SAAS_SERVICE_NAME.yaml -n $PRJ_NAME
rtn_code=$?
if [ $rtn_code -ne 0 ]; then
echo "error during oc apply"
exit $rtn_code
fi
label_selector=$(cat label_selector)
resources_to_delete=$(oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" get $SAASHERDER_OBJECT_WHITELIST -o name -l "$label_selector" -n $PRJ_NAME)
for r in $resources_to_delete; do
oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" -n $PRJ_NAME delete $r
done
cd ..
fi
extra_target: ""
builders:
- shell: |
# testing out the cico client
set +e
export CICO_API_KEY=$(cat ~/duffy.key )
get_cico_node() {{
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output" >&2
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'" >&2
return 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)" >&2
n=$[$n+1]
sleep 60
done
echo "$CICO_hostname" "$CICO_ssid"
}}
# Verify Job configuration
if [ "{svc_name}" == "none" -a "{saas_git}" == "none" ]; then
echo "Not part of SAAS"
else
#Prepare values for deployment
SVC_NAME={svc_name}
SUBDIR="{subdir}"
GIT_REPO={git_repo}
PRJ_NAME={prj_name}
SAAS_GIT={saas_git}
{saasherder_prepare}
fi
if [ -z "$DEVSHIFT_TAG_LEN" ]; then
export DEVSHIFT_TAG_LEN=7
fi
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f jenkins-env.json
env > jenkins-env
# CentOS build
cico_node_output=$(get_cico_node)
[ "$?" != "0" ] && exit 1
read CICO_hostname CICO_ssid <<< $cico_node_output
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd yum -y install rsync
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload
$ssh_cmd -t "cd payload && {ci_cmd}"
rtn_code=$?
if [ "$rtn_code" != "0" ]; then
curl "http://admin.ci.centos.org:8080/Node/fail?key=$CICO_API_KEY&ssid=$CICO_ssid"
exit $rtn_code
fi
# RHEL build
if [ -n "{extra_target}" ]; then
$ssh_cmd -t "cd payload && TARGET=\"{extra_target}\" {ci_cmd}"
rtn_code=$?
if [ "$rtn_code" != "0" ]; then
curl "http://admin.ci.centos.org:8080/Node/fail?key=$CICO_API_KEY&ssid=$CICO_ssid"
exit $rtn_code
fi
fi
#Deploy preview
# Verify Job configuration
if [ "{svc_name}" == "none" -a "{saas_git}" == "none" ]; then
echo "Not part of SAAS, skipping deployment"
else
{saasherder_deploy}
fi
exit $rtn_code
- job-template:
name: '{ci_project}-{git_repo}-fabric8-analytics-build-master'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *quay-credentials
- *registry-devshift-credentials
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- '{build_branch}'
saasherder_prepare: |
set -x
if [ "$SAAS_GIT" != "none" ]; then
SAAS_ENV=staging
PATH=$PATH:~/.local/bin/
CONTEXT=$(echo $SAAS_GIT | sed 's/.*://')
SAAS_GIT=$(echo $SAAS_GIT | sed 's/:.*//')
SAAS_SERVICE_NAMES=$SVC_NAME
git clone --depth 1 https://github.com/openshiftio/$SAAS_GIT saas.git
cd saas.git
[ "$CONTEXT" != "$SAAS_GIT" ] && saasherder --context $CONTEXT config get-contexts > /dev/null
cd ..
fi
set +x
saasherder_deploy: |
if [ "$SAAS_GIT" != "none" ]; then
cd saas.git
for SAAS_SERVICE_NAME in $SAAS_SERVICE_NAMES; do
export DEVSHIFT_TAG_LEN=$(saasherder --environment $SAAS_ENV get hash_length $SAAS_SERVICE_NAME)
saasherder --environment $SAAS_ENV update hash $SAAS_SERVICE_NAME $GIT_COMMIT
saasherder --environment $SAAS_ENV pull $SAAS_SERVICE_NAME
saasherder --environment $SAAS_ENV template --filter Route --output-dir $GIT_REPO-processed tag $SAAS_SERVICE_NAME
oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" apply -f $GIT_REPO-processed/$SAAS_SERVICE_NAME.yaml -n $PRJ_NAME
rtn_code=$(($rtn_code + $?))
done
cd ..
fi
<<: *job_template_build_defaults
- job-template: &job_template_build_master
name: '{ci_project}-{git_repo}-build-master'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *quay-credentials
- *quay-eclipse-che-credentials
- *registry-devshift-credentials
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- '{build_branch}'
<<: *job_template_build_defaults
- job-template:
name: '{ci_project}-{git_repo}-{subdir}-build-master'
<<: *job_template_build_master
- job-template:
name: '{ci_project}-{git_repo}-ike-build-master'
saasherder_prepare: |
SAAS_ENV=staging
PATH=$PATH:~/.local/bin/
CONTEXT=$(echo $SAAS_GIT | sed 's/.*://')
SAAS_GIT=$(echo $SAAS_GIT | sed 's/:.*//')
git clone --depth 1 https://github.com/openshiftio/$SAAS_GIT saas.git
cd saas.git
[ "$CONTEXT" != "$SAAS_GIT" ] && saasherder --context $CONTEXT config get-contexts > /dev/null
if [ "$(saasherder --environment $SAAS_ENV get hash_length|sort -u|wc -l)" != "1" ]; then
echo "In the ike-prow-plugins context all the tag lengths should be the same"
exit 1
fi
export DEVSHIFT_TAG_LEN=$(saasherder --environment $SAAS_ENV get hash_length|head -n1)
cd ..
saasherder_deploy: |
cd saas.git
for SAAS_SERVICE_NAME in $(saasherder --environment $SAAS_ENV get-services); do
saasherder --environment $SAAS_ENV update hash $SAAS_SERVICE_NAME $GIT_COMMIT
saasherder --environment $SAAS_ENV pull $SAAS_SERVICE_NAME
saasherder --environment $SAAS_ENV template --filter Route --output-dir $GIT_REPO-processed tag $SAAS_SERVICE_NAME
oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" apply -f $GIT_REPO-processed/$SAAS_SERVICE_NAME.yaml -n $PRJ_NAME
done
rtn_code=$?
cd ..
<<: *job_template_build_master
- job-template:
name: '{ci_project}-{git_repo}-f8a-build-master'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-credentials
- *registry-devshift-credentials
- *recommender-api-token-prod
- ansicolor
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- master
skip_deploy: 0
deployment_units: ''
deployment_configs: ''
extra_target: ''
builders:
- shell: |
# testing out the cico client
set +e
set +x
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
echo 'Using Host' $CICO_hostname
export DEVSHIFT_TAG_LEN=7
(
# run in subshell not to affect current environment
set +x
# load creds_config_file
eval "$(sed '/^\s*$/d;s/^/export /' $creds_config_file)"
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f jenkins-env.json
env > jenkins-env
)
set -x
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd yum -y install rsync
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload
$ssh_cmd -t "cd payload && {ci_cmd}"
rtn_code=$?
# RHEL build
if [[ $rtn_code -eq 0 && -n "{extra_target}" ]]; then
$ssh_cmd -t "cd payload && TARGET=\"{extra_target}\" {ci_cmd}"
rtn_code=$?
fi
# We want to reuse the node for running E2E tests,
# but only if we are not doomed already.
if [[ $rtn_code -ne 0 || {skip_deploy} -ne 0 ]]; then
cico node done $CICO_ssid
fi
# Dump params for deploy-e2e-test-params
cat > deploy-e2e-test-params << EOF
GIT_ORGANIZATION={git_organization}
UPSTREAM_GIT_COMMIT=$GIT_COMMIT
SAAS_GIT={saas_git}
DEPLOYMENT_UNITS={deployment_units}
DEPLOYMENT_CONFIGS={deployment_configs}
CICO_HOSTNAME=$CICO_hostname
CICO_SSID=$CICO_ssid
EOF
exit $rtn_code
- conditional-step:
condition-kind: shell
condition-command: |
[[ {skip_deploy} -eq 0 ]] && exit 0 || exit 1
steps:
- trigger-builds:
- project:
- "devtools-f8a-master-deploy-e2e-test"
property-file: deploy-e2e-test-params
block: true
<<: *job_template_build_defaults
- job-template:
name: '{ci_project}-{git_repo}-saasorg-build-master'
saas_organization: openshiftio
parameters:
- string:
name: SAAS_ORGANIZATION
default: '{saas_organization}'
saasherder_prepare: |
if [ "$SAAS_GIT" != "none" ]; then
SAAS_ENV=staging
PATH=$PATH:~/.local/bin/
CONTEXT=$(echo $SAAS_GIT | sed 's/.*://')
SAAS_GIT=$(echo $SAAS_GIT | sed 's/:.*//')
if [[ -z "$SAAS_SERVICE_NAME" || "$SAAS_SERVICE_NAME" == "none" ]]; then
SAAS_SERVICE_NAME=$GIT_REPO
fi
if [ "$SUBDIR" != "" ]; then
SAAS_SERVICE_NAME=$SAAS_SERVICE_NAME"-"$SUBDIR
fi
git clone --depth 1 https://github.com/$SAAS_ORGANIZATION/$SAAS_GIT saas.git
cd saas.git
[ "$CONTEXT" != "$SAAS_GIT" ] && saasherder --context $CONTEXT config get-contexts > /dev/null
export DEVSHIFT_TAG_LEN=$(saasherder --environment $SAAS_ENV get hash_length $SAAS_SERVICE_NAME)
cd ..
fi
<<: *job_template_build_master
- job-template:
name: '{ci_project}-e2e-fabric8-analytics'
triggers:
- github-pull-request:
status-context: "ci.centos.org PR build (fabric8-analytics)"
org-list:
- fabric8-analytics
<<: *github_pull_request_defaults
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *recommender-api-token
- *3scale-user-key
- *recommender-refresh-token
- ansicolor
concurrent: false
builders:
- shell: |
set -x
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
echo 'Using Host' $CICO_hostname
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f integration-tests/jenkins-env.json
env > integration-tests/jenkins-env
gc() {{
rtn_code=$?
cico node done $CICO_ssid || :
exit $rtn_code
}}
trap gc EXIT SIGINT
set -e
# Run E2E tests
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd yum -y install rsync
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload-tests
$ssh_cmd -t "cd payload-tests/integration-tests && /bin/bash cico_run_tests.sh"
publishers:
- email:
recipients: ptisnovs@redhat.com devtools-bayesian@redhat.com
notify-every-unstable-build: true
send-to-individuals: true
<<: *job_template_defaults
- job-template:
name: 'osd-monitor-analytics-build-master'
saasherder_prepare: |
SAAS_ENV=staging
PATH=$PATH:~/.local/bin/
CONTEXT=$(echo $SAAS_GIT | sed 's/.*://')
SAAS_GIT=$(echo $SAAS_GIT | sed 's/:.*//')
git clone --depth 1 https://github.com/openshiftio/$SAAS_GIT saas.git
cd saas.git
[ "$CONTEXT" != "$SAAS_GIT" ] && saasherder --context $CONTEXT config get-contexts > /dev/null
if [ "$(saasherder --environment $SAAS_ENV get hash_length|sort -u|wc -l)" != "1" ]; then
echo "In the ike-prow-plugins context all the tag lengths should be the same"
exit 1
fi
export DEVSHIFT_TAG_LEN=$(saasherder --environment $SAAS_ENV get hash_length|head -n1)
cd ..
saasherder_deploy: |
cd saas.git
for SAAS_SERVICE_NAME in $(saasherder --environment $SAAS_ENV get-services); do
saasherder --environment $SAAS_ENV update hash $SAAS_SERVICE_NAME $GIT_COMMIT
saasherder --environment $SAAS_ENV pull $SAAS_SERVICE_NAME
saasherder --environment $SAAS_ENV template --filter Route --output-dir $GIT_REPO-processed tag $SAAS_SERVICE_NAME
oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" apply -f $GIT_REPO-processed/$SAAS_SERVICE_NAME.yaml -n $PRJ_NAME
done
rtn_code=$?
cd ..
<<: *job_template_build_master
- job-template:
name: '{ci_project}-test-end-to-end-prod-fabric8-analytics'
triggers:
- timed: '@hourly'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *recommender-api-token-prod
- ansicolor
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- master
concurrent: false
builders:
- shell: |
set -x
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
echo 'Using Host' $CICO_hostname
# We have to point other endpoints to production too
export F8A_API_URL={f8a_api_url}
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f integration-tests/jenkins-env.json
env > integration-tests/jenkins-env
gc() {{
rtn_code=$?
cico node done $CICO_ssid || :
exit $rtn_code
}}
trap gc EXIT SIGINT
set -e
# Run E2E tests
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd yum -y install rsync
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload-tests
$ssh_cmd -t "cd payload-tests/integration-tests && /bin/bash cico_run_tests.sh --tags=production"
<<: *job_template_defaults
- job-template:
name: '{ci_project}-f8a-master-deploy-e2e-test'
publishers:
- email:
recipients: bayesian-ci@redhat.com
notify-every-unstable-build: true
send-to-individuals: true
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *recommender-api-token
- *3scale-user-key
- *recommender-refresh-token
- ansicolor
concurrent: false
parameters:
- string:
name: GIT_ORGANIZATION
default: fabric8-analytics
- string:
name: UPSTREAM_GIT_COMMIT
- string:
name: SAAS_GIT
default: '{saas_git}'
- string:
name: PRJ_NAME
default: '{prj_name}'
- string:
name: SVC_NAME
default: none
- string:
name: DEPLOYMENT_UNITS
- string:
name: DEPLOYMENT_CONFIGS
- string:
name: CICO_HOSTNAME
- string:
name: CICO_SSID
- string:
name: BUILD_URL
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- master
builders:
- shell: |
# Verify Job configuration
if [ "$SVC_NAME" == "none" -a "$SAAS_GIT" == "none" ]; then
echo "require either svc_name or saas_git to be set"
exit 1
fi
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f integration-tests/jenkins-env.json
env > integration-tests/jenkins-env
export GIT_COMMIT=$UPSTREAM_GIT_COMMIT
# What's the current deployment revision?
export DC_NAME=${{DEPLOYMENT_CONFIGS##* }}
DC_REVISION=$(oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" get dc/$DC_NAME -n $PRJ_NAME |grep $DC_NAME | awk '{{ print $2 }}')
if [ -z "$DC_REVISION" ]; then
# First deployment
DC_REVISION=0
fi
# Deploy
{saasherder_prepare}
export DEVSHIFT_TAG_LEN=7
for DEPLOYMENT_UNIT in $DEPLOYMENT_UNITS; do
export SAAS_SERVICE_NAME=$DEPLOYMENT_UNIT
export GIT_REPO=$DEPLOYMENT_UNIT
{saasherder_deploy}
done
export CICO_API_KEY=$(cat ~/duffy.key )
# Register rollback routine
gc() {{
rtn_code=$?
for DEPLOYMENT_CONFIG in $DEPLOYMENT_CONFIGS; do
if [ $rtn_code -ne 0 ]; then
# Failure, rollback
oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" rollback dc/$DEPLOYMENT_CONFIG -n $PRJ_NAME --to-version=$DC_REVISION || :
fi
done
cico node done $CICO_SSID || :
exit $rtn_code
}}
trap gc EXIT SIGINT
set -e
# Wait for the new deployment to begin
# First wait for OpenShift to register the new deployment
for i in `seq 30`; do
NEW_DC_REVISION=$(oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" get dc/$DC_NAME -n $PRJ_NAME |grep $DC_NAME | awk '{{ print $2 }}') || :
if [ ${{NEW_DC_REVISION:-0}} -gt $DC_REVISION ]; then
echo "The new deployment has been created."
break
fi
echo "The new deployment hasn't been created yet."
sleep 5
done
if [ ! ${{NEW_DC_REVISION:-0}} -gt $DC_REVISION ]; then
exit 1
fi
# Wait for the new deployment to actually begin
(
for i in `seq 30`; do
export DEPLOY_POD_NAME=${{DC_NAME}}-${{NEW_DC_REVISION}}-deploy
DEPLOYMENT_STATE=$(oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" get pod/${{DEPLOY_POD_NAME}} -n $PRJ_NAME |grep ${{DEPLOY_POD_NAME}} |awk '{{ print $3 }}') || :
if [ ${{DEPLOYMENT_STATE:-Pending}} == "Running" ]; then
echo "The new deployment has started."
exit 0
fi
echo "The new deployment hasn't started yet."
sleep 5
done; exit 1
)
# And finally wait for the new deployment to be ready
oc --server="$KUBE_SERVER" --token="$KUBE_TOKEN" logs -f dc/$DC_NAME -n $PRJ_NAME
# Now is the time to run E2E tests
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_HOSTNAME"
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_HOSTNAME:payload-tests
$ssh_cmd -t "cd payload-tests/integration-tests && /bin/bash cico_run_tests.sh"
<<: *job_template_build_defaults
- job-template: &build_che_template
name: '{ci_project}-{git_repo}-build-che-credentials-{branch}'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *quay-credentials
- *registry-devshift-credentials
- che_credentials_wrapper
- che_functional_tests_credentials_wrapper-periodical-prod-preview.openshift.io-free-stg
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- '{branch}'
extra_target: ""
builders:
- shell: |
# testing out the cico client
set +e
set +x
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
echo 'Using Host' $CICO_hostname
set -x
#Prepare values for deployment
SVC_NAME={svc_name}
GIT_REPO={git_repo}
PRJ_NAME={prj_name}
SAAS_GIT={saas_git}
SAAS_SERVICE_NAME={saas_service_name}
{saasherder_prepare}
if [ -z "$DEVSHIFT_TAG_LEN" ]; then
export DEVSHIFT_TAG_LEN=7
fi
(
# run in subshell not to affect current environment
set +x
# load creds_config_file
eval "$(sed '/^\s*$/d;s/^/export /' $creds_config_file)"
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f jenkins-env.json
env > jenkins-env
)
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd yum -y install rsync
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload
$ssh_cmd -t "cd payload && {ci_cmd}"
rtn_code=$?
if [ "$rtn_code" != "0" ]; then
curl "http://admin.ci.centos.org:8080/Node/fail?key=$CICO_API_KEY&ssid=$CICO_ssid"
exit $rtn_code
fi
# RHEL build
if [ -n "{extra_target}" ]; then
$ssh_cmd -t "cd payload && export TARGET=\"{extra_target}\" && {ci_cmd}"
rtn_code=$?
if [ "$rtn_code" != "0" ]; then
curl "http://admin.ci.centos.org:8080/Node/fail?key=$CICO_API_KEY&ssid=$CICO_ssid"
exit $rtn_code
fi
fi
rtn_code=$?
if [ $rtn_code -eq 0 ]; then
#Deploy preview
{saasherder_deploy}
fi
cico node done $CICO_ssid
exit $rtn_code
<<: *job_template_build_defaults
- job-template:
name: '{ci_project}-{git_repo}-che-build-master'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-eclipse-che-credentials
- *che-bot-github-credentials
- *eclipse-che-oss-sonatype
- *che-akamai-cdn-auth
<<: *job_template_build_master
- eclipse-che-automation-template: &eclipse-che-automation-template
name: "eclipse-che-automation-template"
concurrent: false
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-eclipse-che-credentials
- *eclipse-che-oss-sonatype
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-nightly-test-master-happy-path'
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- cico-nightly-test
triggers:
- build-result:
cron: '* * * * *'
groups:
- jobs:
- 'devtools-rh-che-build-che-credentials-master'
results:
- success
<<: *eclipse-che-automation-template
- job-template:
name: '{ci_project}-{git_repo}-che-pullrequests-test-temporary'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-eclipse-che-credentials
- *eclipse-che-oss-sonatype
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- cico-pr-test
triggers:
- github
<<: *eclipse-che-automation-template
- job-template:
name: '{ci_project}-{git_repo}-che-multiuser-stable-test-temporary'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-eclipse-che-credentials
- *eclipse-che-oss-sonatype
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- cico-multiuser-stable
triggers:
- github
<<: *eclipse-che-automation-template
- job-template:
name: '{ci_project}-{git_repo}-rc-integration-tests'
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- cico-rc-test
triggers:
- github
<<: *eclipse-che-automation-template
- job-template:
name: '{ci_project}-{git_repo}-che-nightly'
concurrent: false
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-eclipse-che-credentials
- *che-bot-github-credentials
- *eclipse-che-oss-sonatype
triggers:
- timed: '0 0 * * *'
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
branches:
- origin/master
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-che-release'
concurrent: false
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-eclipse-che-credentials
- *che-bot-github-credentials
- *eclipse-che-oss-sonatype
- *eclipse-che-github-ssh-key
- *che-akamai-cdn-auth
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- release
triggers:
- github
<<: *job_template_build_defaults
- job-template:
name: '{ci_project}-{git_repo}-build-master-coverage'
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- master
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
<<: *job_template_build_defaults
- job-template:
name: '{ci_project}-{git_repo}-npm-publish-build-master'
description: |
{jobdescription}
If all goes well, npm is published
node: "{ci_project}"
wrappers:
- ansicolor
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *npm-build-deliver-creds-gh-token
- *npm-build-deliver-creds-npm-token
- *fabric8-planner-test-token
- *quay-credentials
- *registry-devshift-credentials
properties:
- github:
url: https://github.com/{git_organization}/{git_repo}/
- inject:
properties-content: |
JENKINS_URL=https://ci.centos.org
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
credentials-id: "c4872223-4024-4cd4-8e09-1bbdc7d6e971"
git-tool: ci-git
shallow_clone: false
skip-tag: True
branches:
- master
triggers:
- github
<<: *job_template_build_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-push-build-master'
description: |
{jobdescription}
If all goes well, fabric8 images are pushed
node: "{ci_project}"
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *fabric8-maven-settingsxml
- *fabric8cd-sonatype-creds
- *npm-build-deliver-creds-gh-token
- *fabric8-hub-token
- *fabric8-build-devcluster
- *fabric8-github-ssh-key
- *fabric8-build-dockerio-dockercfg
- *gpgkeys-for-signing-maven-artefacts
- *quay-credentials
- *registry-devshift-credentials
properties:
- github:
url: https://github.com/{git_organization}/{git_repo}/
- inject:
properties-content: |
JENKINS_URL=https://ci.centos.org
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
credentials-id: "c4872223-4024-4cd4-8e09-1bbdc7d6e971"
git-tool: ci-git
shallow_clone: false
skip-tag: True
branches:
- master
- cico-test
triggers:
- github
<<: *job_template_build_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-push-prcheck'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *fabric8-maven-settingsxml
- *fabric8-hub-token
- *fabric8-build-devcluster
- *fabric8cd-sonatype-creds
- *fabric8-github-ssh-key
- *fabric8-build-dockerio-dockercfg
- *quay-credentials
- *registry-devshift-credentials
- *gpgkeys-for-signing-maven-artefacts
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-fabric8-docs-prcheck'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *fabric8-hub-token
- *quay-credentials
- *registry-devshift-credentials
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-build-master-push-client'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *quay-credentials
- *registry-devshift-credentials
- *fabric8-hub-token
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- master
<<: *job_template_build_defaults
- job:
name: 'devtools-eclipse-che-promotion'
parameters:
- string:
name: CHE_SERVER_STAGE_DOCKER_IMAGE
description: "Full docker location with organization/repo:tag"
wrappers:
- che_credentials_wrapper
defaults: global
node: devtools
builders:
- shell: |
# promoting to rhche
set +e
set +x
# downloads staging image
docker pull ${CHE_SERVER_STAGE_DOCKER_IMAGE}
# rename to production organization
CHE_SERVER_PROD_DOCKER_IMAGE="${CHE_SERVER_STAGE_DOCKER_IMAGE/rhchestage/rhche}"
docker login -u ${RHCHEBOT_DOCKER_HUB_USERNAME} -p ${RHCHEBOT_DOCKER_HUB_PASSWORD} -e noreply@redhat.co
# push to Docker hub
docker tag ${CHE_SERVER_STAGE_DOCKER_IMAGE} ${CHE_SERVER_PROD_DOCKER_IMAGE}
docker push ${CHE_SERVER_PROD_DOCKER_IMAGE}
- rh-che-automation-quay-secret: &rh-che-automation-quay-secret
name: "rh-che-automation-quay-secret"
secret-path: "devtools-osio-ci/dev-rdu2c-quay-access-secret"
secret-values:
- env-var: 'QUAY_SECRET_JSON'
vault-key: 'secret'
- rh-che-automation-template: &rh-che-automation-template
name: 'rh-che-automation-template'
concurrent: false
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-credentials
- *registry-devshift-credentials
- *rh-che-compatibility-github-credentials
- *rh-che-automation-credentials-devrdu2c-fabric8-io
- *rh-che-automation-credentials-prod-preview-openshift-io
- *rh-che-automation-credentials-dockerhub
- *rh-che-automation-quay-secret
- *fabric8-hub-token
- *qe-osio-dev-cluster-SA-token
<<: *job_template_defaults
- che-operator-pr-template: &che-operator-pr-template
name: 'che-operator-pr-template'
concurrent: false
wrappers:
- vault-secrets:
<<: *vault_defaults
<<: *job_template_defaults
- rh-che-automation-depbuild-template: &rh-che-automation-depbuild-template
name: 'rh-che-automation-depbuild-template'
concurrent: false
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-credentials
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
branches:
- origin/master
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-rh-che-prcheck-{test_url}'
triggers:
- github
- github-pull-request:
github_hooks: '{github_hooks}'
status-context: 'ci.centos.org PR check on {test_url}'
success-comment: "### $ghprbPullAuthorLoginMention RH-Che [build $BUILD_NUMBER] has been successfully deployed and tested.\n
deployment: http://rhche-prcheck-$ghprbPullId.devtools-dev.ext.devshift.net \n
console: https://ci.centos.org/view/Devtools/job/devtools-rh-che-rh-che-prcheck-dev.rdu2c.fabric8.io/$BUILD_NUMBER/console "
failure-comment: "### $ghprbPullAuthorLoginMention PR check [build $BUILD_NUMBER] failed.\n
| Link | URL |\n
| ---- | :-: |\n
| console | https://ci.centos.org/view/Devtools/job/devtools-rh-che-rh-che-prcheck-dev.rdu2c.fabric8.io/$BUILD_NUMBER/console |\n
| artifacts | http://artifacts.ci.centos.org/devtools/rhche/devtools-rh-che-rh-che-prcheck-dev.rdu2c.fabric8.io/$BUILD_NUMBER/ |\n
| deployment | http://rhche-prcheck-$ghprbPullId.devtools-dev.ext.devshift.net |\n
### *Depending on failure reason, the artifacts or deployment may not be present.*"
error-comment: "### $ghprbPullAuthorLoginMention PR check [build $BUILD_NUMBER] failed.\n
| Link | URL |\n
| ---- | :-: |\n
| console | https://ci.centos.org/view/Devtools/job/devtools-rh-che-rh-che-prcheck-dev.rdu2c.fabric8.io/$BUILD_NUMBER/console |\n
| artifacts | http://artifacts.ci.centos.org/devtools/rhche/devtools-rh-che-rh-che-prcheck-dev.rdu2c.fabric8.io/$BUILD_NUMBER/ |\n
| deployment | http://rhche-prcheck-$ghprbPullId.devtools-dev.ext.devshift.net |\n
### *Depending on failure reason, the artifacts or deployment may not be present.*"
<<: *github_pull_request_defaults
<<: *rh-che-automation-template
- job-template:
disabled: '{obj:disabled}'
name: '{ci_project}-{git_repo}-rh-che-compatibility-test-{test_url}'
triggers:
- timed: 'H 2 * * *'
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- master
<<: *rh-che-automation-template
- job-template:
name: '{ci_project}-{git_repo}-prcheck-cleanup'
triggers:
- timed: 'H 3 * * *'
publishers:
- email:
recipients: rhopp@redhat.com kkanova@redhat.com tdancs@redhat.com
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *qe-osio-dev-cluster-SA-token
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
branches:
- origin/master
<<: *job_template_defaults
- rollout-test-token: &rollout-test-token
name: "rollout-test-token"
secret-path: 'devtools-osio-ci/qe-osio-token-for-rollout-test'
secret-values:
- env-var: 'CHE_TESTUSER_OFFLINE__TOKEN'
vault-key: 'token'
- rollout-test-creds: &rollout-test-creds
name: "rollout-test-creds"
secret-path: 'devtools-osio-ci/qe-osio-creds-for-rollout-test'
secret-values:
- env-var: 'CHE_TESTUSER_NAME'
vault-key: 'username'
- env-var: 'CHE_TESTUSER_PASSWORD'
vault-key: 'password'
- env-var: 'CHE_TESTUSER_EMAIL'
vault-key: 'email'
- job-template:
name: '{ci_project}-{git_repo}-rollout-test-{test_url}'
concurrent: false
triggers:
- timed: 'H 3 * * *'
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
branches:
- origin/master
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rollout-test-token
- *rollout-test-creds
- *qe-osio-dev-cluster-SA-token
<<: *job_template_defaults
- rhche-flaky-tests-template: &rhche-flaky-tests-template
name: 'rhche-flaky-tests-template'
wrappers:
- rhche_credentials_wrapper-flaky-{cluster}
concurrent: false
<<: *job_template_defaults
- wrapper:
name: 'rhche_credentials_wrapper-flaky-2'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-flaky-2-creds
- rhche-functional-tests-template: &rhche-functional-tests-template
name: 'rhche-functional-tests-template'
wrappers:
- rhche_credentials_wrapper-{cluster}
concurrent: false
<<: *job_template_defaults
- rhche-route-tests-template: &rhche-route-tests-template
name: 'rhche-route-tests-template'
wrappers:
- rhche_credentials_wrapper-route-{cluster}
concurrent: false
<<: *job_template_defaults
- rhche-route-2-creds: &rhche-route-2-creds
name: "rhche-route-2-creds"
secret-path: 'devtools-osio-ci/rhche-route-2-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- wrapper:
name: 'rhche_credentials_wrapper-route-2'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-route-2-creds
- rhche-route-2a-creds: &rhche-route-2a-creds
name: "rhche-route-2a-creds"
secret-path: 'devtools-osio-ci/rhche-route-2a-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- wrapper:
name: 'rhche_credentials_wrapper-route-2a'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-route-2a-creds
- rhche-route-1a-creds: &rhche-route-1a-creds
name: "rhche-route-1a-creds"
secret-path: 'devtools-osio-ci/rhche-route-1a-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- wrapper:
name: 'rhche_credentials_wrapper-route-1a'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-route-1a-creds
- rhche-route-1b-creds: &rhche-route-1b-creds
name: "rhche-route-1b-creds"
secret-path: 'devtools-osio-ci/rhche-route-1b-creds'
secret-values:
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'PASSWORD'
vault-key: 'password'
- wrapper:
name: 'rhche_credentials_wrapper-route-1b'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-route-1b-creds
- wrapper:
name: 'rhche_credentials_wrapper-2'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-periodic-2-creds
- wrapper:
name: 'rhche_credentials_wrapper-2a'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-periodic-2a-creds
- wrapper:
name: 'rhche_credentials_wrapper-2aProd'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-periodic-2aProd-creds
- wrapper:
name: 'rhche_credentials_wrapper-1a'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-periodic-1a-creds
- wrapper:
name: 'rhche_credentials_wrapper-1b'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *rhche-periodic-1b-creds
- job-template:
name: '{ci_project}-{git_repo}-periodic-{env}-{cluster}'
triggers:
- timed: 'H 2,6,10,14,18,22 * * *'
publishers:
- email:
recipients: rhopp@redhat.com kkanova@redhat.com tdancs@redhat.com
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
branches:
- origin/master
<<: *rhche-functional-tests-template
- job-template:
name: '{ci_project}-{git_repo}-periodic-route-{cluster}'
triggers:
- timed: 'H * * * *'
publishers:
- email:
recipients: rhopp@redhat.com kkanova@redhat.com tdancs@redhat.com
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
branches:
- origin/master
<<: *rhche-route-tests-template
- job-template:
name: '{ci_project}-{git_repo}-nightly'
concurrent: false
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-eclipse-che-credentials
triggers:
- timed: '0 0 * * *'
publishers:
- email:
recipients: ibuziuk@redhat.com mloriedo@redhat.com amisevsk@redhat.com vparfono@redhat.com
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
branches:
- origin/master
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-pr-check'
<<: *che-operator-pr-template
- job-template:
name: '{ci_project}-{git_repo}-release'
concurrent: false
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *quay-credentials
- *quay-eclipse-che-credentials
publishers:
- email:
recipients: ibuziuk@redhat.com mloriedo@redhat.com amisevsk@redhat.com vparfono@redhat.com
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- release
triggers:
- github
<<: *job_template_build_defaults
- job-template:
name: '{ci_project}-{git_repo}-release-preview'
concurrent: false
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *quay-credentials
- *quay-eclipse-che-credentials
- *registry-devshift-credentials
publishers:
- email:
recipients: ibuziuk@redhat.com mloriedo@redhat.com amisevsk@redhat.com vparfono@redhat.com
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- '{build_branch}'
triggers:
- github
<<: *job_template_build_defaults
- job-template:
name: '{ci_project}-{git_repo}-flaky-{env}-{cluster}'
triggers:
- timed: 'H 3,9,15,21 * * *'
publishers:
- email:
recipients: rhopp@redhat.com kkanova@redhat.com tdancs@redhat.com
scm:
- git:
url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
branches:
- origin/master
<<: *rhche-flaky-tests-template
- job-template:
name: '{ci_project}-{git_repo}-prcheck-build-dep'
triggers:
- build-result:
cron: '* * * * *'
groups:
- jobs:
- 'devtools-rh-che-build-che-credentials-master'
results:
- success
<<: *rh-che-automation-depbuild-template
- job-template:
name: '{ci_project}-{git_repo}-build-func-dep'
triggers:
- build-result:
cron: '* * * * *'
groups:
- jobs:
- 'devtools-rh-che-build-che-credentials-master'
results:
- success
<<: *rh-che-automation-depbuild-template
- wrapper:
name: fabric8_launcher_credentials_wrapper
wrappers:
- credentials-binding:
- text:
credential-id: 061479ee-de4a-4fb0-b752-7b86659ba3ca
variable: GENERATOR_DOCKER_HUB_PASSWORD
- file:
credential-id: f1d24e18-8f80-4284-9198-d44a713d17b4
variable: FABRIC8_LAUNCHER_CREDENTIALS
- job-template:
name: '{ci_project}-{git_repo}-generator-build-master'
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- master
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *quay-credentials
- *registry-devshift-credentials
- fabric8_launcher_credentials_wrapper
<<: *job_template_build_defaults
- job-template:
name: 'devtools-test-end-to-end-{test_url}-planner-api-test'
triggers:
- timed: '{ee_test_start_time}'
wrappers:
- credentials-binding:
- text:
credential-id: "{creds_id}"
variable: EE_TEST_OSIO_TOKEN
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- master
builders:
- shell: |
set -x
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
echo 'Using Host' $CICO_hostname
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f jenkins-env.json
env > jenkins-env
set -e
# Run E2E tests
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd yum -y install rsync
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload-tests
$ssh_cmd -t "cd payload-tests && {ci_cmd}"
rtn_code=$?
cico node done $CICO_ssid
exit $rtn_code
<<: *job_template_defaults
- job-template:
name: '{ci_project}-{git_repo}-promote-to-prod'
image_pattern: ''
defaults: global
node: devtools
disabled: '{obj:disabled}'
properties:
- github:
url: https://github.com/openshiftio/{git_repo}/
scm:
- git:
url: https://github.com/openshiftio/{git_repo}.git
shallow_clone: true
branches:
- master
triggers:
- github
builders:
- shell: |
# testing out the cico client
set +e
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
if [ -n "${{ghprbTargetBranch}}" ]; then
git rebase --preserve-merges origin/${{ghprbTargetBranch}}
rtn_code=$?
if [ $rtn_code -ne 0 ]; then
echo "The branch can not be rebased onto origin/${{ghprbTargetBranch}}."
exit $rtn_code
fi
else
echo "Not a PR build, using master"
fi
$ssh_cmd -t "yum install -y docker && systemctl start docker"
ENVIRONMENT=production PATH=$PATH:~/.local/bin DRY_RUN=true /bin/bash ~/saasherder/fetch_and_apply.sh
CONTEXTS=$(PATH=$PATH:~/.local/bin saasherder config get-contexts)
for c in `echo $CONTEXTS`; do
DIR=$(readlink -f $c-20* | tail -1)
for f in `ls $DIR`; do
python ~/saasherder/check_image.py $DIR/$f '{image_pattern}'
cat $DIR/$f | $ssh_cmd docker run --rm -i quay.io/app-sre/manifest-bouncer:{manifest_bouncer_tag} --warn-only -
done
done
cico node done $CICO_ssid
set -ex
ENVIRONMENT=production PATH=$PATH:~/.local/bin /bin/bash ~/saasherder/fetch_and_apply.sh
- job-template:
name: '{ci_project}-{git_repo}-promote-to-prod-test'
image_pattern: ''
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
builders:
- shell: |
# testing out the cico client
set +e
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
set -ex
$ssh_cmd -t "yum install -y docker && systemctl start docker"
ENVIRONMENT=production PATH=$PATH:~/.local/bin DRY_RUN=true /bin/bash ~/saasherder/fetch_and_apply.sh
CONTEXTS=$(PATH=$PATH:~/.local/bin saasherder config get-contexts)
for c in `echo $CONTEXTS`; do
DIR=$(readlink -f $c-20* | tail -1)
for f in `ls $DIR`; do
python ~/saasherder/check_image.py $DIR/$f '{image_pattern}'
cat $DIR/$f | $ssh_cmd docker run --rm -i quay.io/app-sre/manifest-bouncer:{manifest_bouncer_tag} --warn-only -
done
done
cico node done $CICO_ssid
<<: *job_template_defaults
- job:
name: 'devtools-saasherder-test-master'
defaults: global
node: devtools
properties:
- github:
url: https://github.com/openshiftio/saasherder
scm:
- git:
url: https://github.com/openshiftio/saasherder.git
shallow_clone: true
branches:
- master
triggers:
- github
builders:
- shell: |
# testing out the cico client
set +e
set +x
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f jenkins-env.json
env > jenkins-env
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
echo 'Using Host' $CICO_hostname
set -x
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd yum -y install rsync
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload
$ssh_cmd -t "cd payload && /bin/bash cico_test.sh"
rtn_code=$?
if [ $rtn_code -eq 0 ]; then
cico node done $CICO_ssid
set -ex
python setup.py install --user
mkdir -p ~/saasherder/
cp fetch_and_apply.sh ~/saasherder/fetch_and_apply.sh
cp check_image.py ~/saasherder/check_image.py
else
# fail mode gives us 12 hrs to debug the machine
curl "http://admin.ci.centos.org:8080/Node/fail?key=$CICO_API_KEY&ssid=$CICO_ssid"
fi
exit $rtn_code
- job:
name: 'devtools-openshiftio-cico-jobs-build-master'
defaults: global
node: devtools
properties:
- github:
url: https://github.com/openshiftio/openshiftio-cico-jobs
scm:
- git:
url: https://github.com/openshiftio/openshiftio-cico-jobs.git
shallow_clone: true
branches:
- master
triggers:
- github
builders:
- shell: |
set -x
set +e
# quit if env-toolkit does not change
cmp scripts/env-toolkit ~/cico-tools/env-toolkit
[ $? -eq 0 ] && exit 0
set -e
set +x
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
echo 'Using Host' $CICO_hostname
set -x
# copy payload
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd yum -y install rsync
rsync -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload
# run test
$ssh_cmd -t "cd payload && /bin/bash cico_test.sh"
rtn_code=$?
if [ $rtn_code -eq 0 ]; then
cico node done $CICO_ssid
mkdir -p ~/cico-tools
cp scripts/env-toolkit ~/cico-tools/env-toolkit
chmod +x ~/cico-tools/env-toolkit
else
# fail mode gives us 12 hrs to debug the machine
set +x
curl "http://admin.ci.centos.org:8080/Node/fail?key=$CICO_API_KEY&ssid=$CICO_ssid"
fi
exit $rtn_code
- job-template:
name: '{ci_project}-{git_repo}-copr-mercator-build-master'
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- *kube-config-dsaas-stg
- *copr-mercator-api-token
scm:
- git:
url: https://github.com/{git_organization}/{git_repo}.git
shallow_clone: true
branches:
- master
<<: *job_template_build_defaults
- contract_tests_consumer_template: &contract_tests_consumer_template
name: 'contract_tests_consumer_template'
defaults: global
node: devtools
timeout: 60m
scm_git_branch: master
properties:
- github:
url: '{github_url}'
scm:
- git-scm:
git_url: '{scm_git_url}'
git_basedir: ''
wrappers:
- ansicolor
- vault-secrets:
<<: *vault_defaults
secrets:
- secret-path: 'devtools-osio-ci/contract-tests-creds'
secret-values:
- env-var: 'PACT_BROKER_USERNAME'
vault-key: '{pact_broker_creds_username}'
- env-var: 'PACT_BROKER_PASSWORD'
vault-key: '{pact_broker_creds_password}'
builders:
- shell: |
set +e
set +x
export PACT_BROKER_URL="{pact_broker_url}"
export PACT_VERSION="${{ghprbActualCommit}}"
export PACT_TAGS="PR-${{ghprbPullId}}"
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f jenkins-env.json
env > jenkins-env
cp ~/artifacts.key .
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
echo 'Using Host' $CICO_hostname
set -x
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd "yum -y -d1 --setopt tsflags='nodocs' install rsync"
rsync --delete -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload
/usr/bin/timeout {timeout} $ssh_cmd -t "cd payload && /bin/bash cico_run_contract_tests_consumer.sh"
rtn_code=$?
if [[ $rtn_code -eq 124 ]]; then
echo "BUILD TIMEOUT";
else
rsync --delete -Ha -e "ssh $sshopts" $CICO_hostname:payload/ $(pwd) || rtn_code=$?
fi
cico node done $CICO_ssid
exit $rtn_code
publishers:
- email:
recipients: pmacik@redhat.com
notify-every-unstable-build: true
- job-template:
name: 'devtools-contract-test-consumer-{consumer}-{provider}'
triggers:
- github-pull-request:
status-context: "ci.centos.org PR build (contract tests)"
<<: *github_pull_request_defaults
<<: *contract_tests_consumer_template
- contract_tests_provider_template: &contract_tests_provider_template
name: 'contract_tests_provider_template'
defaults: global
node: devtools
timeout: 60m
zabbix_enabled: true
scm_git_branch: master
archive_artifacts: 'true'
pact_version: latest
properties:
- github:
url: '{github_url}'
scm:
- git-scm:
git_url: '{scm_git_url}'
git_basedir: ''
wrappers:
- ansicolor
- vault-secrets:
<<: *vault_defaults
secrets:
- secret-path: 'devtools-osio-ci/contract-tests-creds'
secret-values:
- env-var: 'PACT_BROKER_USERNAME'
vault-key: '{pact_broker_creds_username}'
- env-var: 'PACT_BROKER_PASSWORD'
vault-key: '{pact_broker_creds_password}'
builders:
- shell: |
set +e
set +x
export PACT_CONSUMER="{pact_consumer}"
export PACT_VERSION="{pact_version}"
export PACT_BROKER_URL="{pact_broker_url}"
export ARCHIVE_ARTIFACTS="{archive_artifacts}"
cp ~/cico-tools/env-toolkit .
./env-toolkit dump -f jenkins-env.json
env > jenkins-env
cp ~/artifacts.key .
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
echo 'Using Host' $CICO_hostname
set -x
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
$ssh_cmd "yum -y -d1 --setopt tsflags='nodocs' install rsync"
rsync --delete -e "ssh $sshopts" -Ha $(pwd)/ $CICO_hostname:payload
/usr/bin/timeout {timeout} $ssh_cmd -t "cd payload && /bin/bash cico_run_contract_tests_provider.sh"
rtn_code=$?
if [[ $rtn_code -eq 124 ]]; then
echo "BUILD TIMEOUT";
else
rsync --delete -Ha -e "ssh $sshopts" $CICO_hostname:payload/ $(pwd) || rtn_code=$?
fi
cico node done $CICO_ssid
exit $rtn_code
publishers:
- email:
recipients: pmacik@redhat.com
notify-every-unstable-build: true
- job-template:
name: 'devtools-contract-test-provider-{consumer}-{provider}'
triggers:
- github-pull-request:
status-context: "ci.centos.org PR build (contract tests)"
<<: *github_pull_request_defaults
<<: *contract_tests_provider_template
- job-template:
name: 'devtools-contract-test-provider-{consumer}-fabric8-auth'
triggers:
- github-pull-request:
status-context: "ci.centos.org PR build (contract tests)"
<<: *github_pull_request_defaults
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- secret-path: 'devtools-osio-ci/contract-tests-creds'
secret-values:
- env-var: 'PACT_BROKER_USERNAME'
vault-key: '{pact_broker_creds_username}'
- env-var: 'PACT_BROKER_PASSWORD'
vault-key: '{pact_broker_creds_password}'
- env-var: 'OSIO_USERNAME'
vault-key: '{osio_username_cred}'
- env-var: 'OSIO_PASSWORD'
vault-key: '{osio_password_cred}'
- env-var: 'OSIO_CLUSTER_URL'
vault-key: '{osio_cluster_url_cred}'
- env-var: 'ONLINE_REGISTRATION_SERVICE_ACCOUNT_CLIENT_ID'
vault-key: '{service_account_client_id_cred}'
- env-var: 'ONLINE_REGISTRATION_SERVICE_ACCOUNT_CLIENT_SECRET'
vault-key: '{service_account_client_secret_cred}'
<<: *contract_tests_provider_template
- saas_prcheck_rhche_template: &saas_prcheck_rhche_template
name: 'saas_prcheck_rhche_template'
description: |
{jobdescription}
node: "{ci_project}"
concurrent: false
properties:
- github:
url: https://github.com/{git_organization}/{git_repo}/
- build-discarder:
days-to-keep: '{discarder_days}'
num-to-keep: '{discarder_num}'
scm:
- git-scm:
git_url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
git_basedir: ''
triggers:
- githubprb:
github_hooks: '{github_hooks}'
builders:
- shell: |
# testing out the cico client
set +e
cp ~/artifacts.key .
export CICO_API_KEY=$(cat ~/duffy.key )
# get node
n=1
while true
do
cico_output=$(cico node get -f value -c ip_address -c comment)
if [ $? -eq 0 ]; then
read CICO_hostname CICO_ssid <<< $cico_output
if [ ! -z "$CICO_hostname" ]; then
# we got hostname from cico
break
fi
echo "'cico node get' succeed, but can't get hostname from output"
fi
if [ $n -gt 15 ]; then
# give up after 15 tries
echo "giving up on 'cico node get'"
exit 1
fi
echo "'cico node get' failed, trying again in 60s ($n/15)"
n=$[$n+1]
sleep 60
done
sshopts="-t -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root"
ssh_cmd="ssh $sshopts $CICO_hostname"
cp ~/cico-tools/env-toolkit .
./env-toolkit dump --force -f jenkins-env.json
env > jenkins-env
$ssh_cmd yum -y install rsync
rsync -e "ssh $sshopts" -Ha $(pwd)/rhche/ $(pwd)/artifacts.key $(pwd)/env-toolkit $(pwd)/jenkins-env.json $CICO_hostname:payload \
&& /usr/bin/timeout {timeout} $ssh_cmd -t "cd payload && {ci_cmd}"
rtn_code=$?
if [ $rtn_code -eq 0 ]; then
cico node done $CICO_ssid
else
if [[ $rtn_code -eq 124 ]]; then
echo "BUILD TIMEOUT";
cico node done $CICO_ssid
else
# fail mode gives us 12 hrs to debug the machine
curl "http://admin.ci.centos.org:8080/Node/fail?key=$CICO_API_KEY&ssid=$CICO_ssid"
fi
fi
exit $rtn_code
- job-template:
name: '{ci_project}-{git_repo}-pr-check-rh-che'
scm:
- git-scm:
git_url: https://{github_user}@github.com/{git_organization}/{git_repo}.git
git_basedir: '{git_repo}'
- git:
url: https://github.com/redhat-developer/rh-che/
shallow_clone: true
branches:
- master
basedir: rhche
triggers:
- github-pull-request:
github_hooks: '{github_hooks}'
status-context: 'ci.centos.org rh-che test against prod-preview'
failure-comment: "**The rh-che test against prod-preview failed.**\n\n
| Link | URL |\n
| ---- | :-: |\n
| job log | https://ci.centos.org/job/$JOB_NAME/$BUILD_NUMBER/console |\n
| artifacts | http://artifacts.ci.centos.org/devtools/saas-openshiftio/$JOB_NAME/$BUILD_NUMBER |\n\n
**Please review the job results and re-run the job by commenting [test] if necessary.**"
error-comment: "**The rh-che test against prod-preview failed.**\n\n
| Link | URL |\n
| ---- | :-: |\n
| job log | https://ci.centos.org/job/$JOB_NAME/$BUILD_NUMBER/console |\n
| artifacts | http://artifacts.ci.centos.org/devtools/saas-openshiftio/$JOB_NAME/$BUILD_NUMBER |\n\n
**Please review the job results and re-run the job by commenting [test] if necessary.**"
<<: *github_pull_request_defaults
wrappers:
- vault-secrets:
<<: *vault_defaults
secrets:
- secret-path: 'devtools-osio-ci/rhche-saas-prcheck'
secret-values:
- env-var: 'PASSWORD'
vault-key: 'password'
- env-var: 'USERNAME'
vault-key: 'username'
- env-var: 'EMAIL'
vault-key: 'email'
<<: *saas_prcheck_rhche_template
- project:
name: devtools
disabled: false
jobs:
- '{ci_project}-{git_repo}-jjb-test':
git_organization: openshiftio
git_repo: openshiftio-cico-jobs
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_pr_test.sh'
- '{ci_project}-{git_repo}':
git_repo: fabric8-wit
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '20m'
discarder_days: 30
- '{ci_project}-{git_repo}-coverage':
git_repo: fabric8-wit
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_coverage.sh'
timeout: '4h'
discarder_days: 30
- '{ci_project}-{git_repo}-e2e':
git_repo: fabric8-wit
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_e2e_tests.sh'
timeout: '3h'
discarder_days: 30
- '{ci_project}-{git_repo}':
git_organization: openshiftio
git_repo: openshift.io
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '30m'
github_hooks: true
- '{ci_project}-{git_repo}-fabric8-create-comment':
git_organization: fabric8-services
git_repo: fabric8-tenant
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '30m'
- '{ci_project}-{git_repo}':
git_organization: fabric8-services
git_repo: fabric8-toggles-service
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '10m'
- '{ci_project}-{git_repo}':
git_organization: fabric8-services
git_repo: fabric8-notification
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '10m'
- '{ci_project}-{git_repo}-coverage':
git_organization: fabric8-services
git_repo: fabric8-notification
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_coverage.sh'
timeout: '30m'
- '{ci_project}-{git_repo}-build-master-coverage':
git_organization: fabric8-services
git_repo: fabric8-notification
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_coverage.sh'
timeout: '30m'
- '{ci_project}-{git_repo}-build-master':
git_organization: fabric8-services
git_repo: fabric8-notification
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
saas_git: saas-openshiftio
timeout: '10m'
extra_target: rhel
- '{ci_project}-{git_repo}':
git_organization: fabric8-services
git_repo: toolchain-operator
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '10m'
- '{ci_project}-{git_repo}-coverage':
git_organization: fabric8-services
git_repo: toolchain-operator
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_coverage.sh'
timeout: '30m'
- '{ci_project}-{git_repo}-build-master-coverage':
git_organization: fabric8-services
git_repo: toolchain-operator
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_coverage.sh'
timeout: '30m'
- '{ci_project}-{git_repo}-build-master':
git_organization: fabric8-services
git_repo: toolchain-operator
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
timeout: '10m'
extra_target: rhel
- '{ci_project}-{git_repo}':
git_organization: fabric8-services
git_repo: fabric8-toggles
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '10m'
- '{ci_project}-{git_repo}':
git_organization: fabric8-services
git_repo: fabric8-oso-proxy
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '10m'
- '{ci_project}-{git_repo}-build-master':
git_repo: fabric8-wit
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
saas_git: saas-openshiftio
timeout: '20m'
extra_target: rhel
- '{ci_project}-{git_repo}-build-master-coverage':
git_repo: fabric8-wit
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_coverage.sh'
svc_name: core
timeout: '3h'
- '{ci_project}-{git_repo}-build-master':
git_organization: openshiftio
git_repo: openshift.io
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
saas_git: saas-openshiftio
timeout: '20m'
extra_target: rhel
- '{ci_project}-{git_repo}':
git_repo: fabric8-common
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '20m'
discarder_days: 30
- '{ci_project}-{git_repo}-coverage':
git_repo: fabric8-common
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_coverage.sh'
timeout: '45m'
discarder_days: 30
- '{ci_project}-{git_repo}-build-master-coverage':
git_repo: fabric8-common
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_coverage.sh'
timeout: '25m'
- '{ci_project}-{git_repo}-build-master':
git_organization: fabric8-services
git_repo: fabric8-tenant
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
saas_git: saas-openshiftio
timeout: '10m'
extra_target: rhel
- '{ci_project}-{git_repo}-build-master':
git_organization: fabric8-services
git_repo: fabric8-toggles
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
saas_git: saas-openshiftio
timeout: '10m'
extra_target: rhel
- '{ci_project}-{git_repo}-build-master':
git_organization: fabric8-services
git_repo: fabric8-toggles-service
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
saas_git: saas-openshiftio
timeout: '10m'
extra_target: rhel
- '{ci_project}-{git_repo}-build-master':
git_organization: fabric8-services
git_repo: che-tenant-maintainer
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
saas_git: saas-openshiftio
timeout: '10m'
extra_target: rhel
- '{ci_project}-{git_repo}-build-master':
git_organization: fabric8-services
git_repo: fabric8-oso-proxy
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
saas_git: saas-openshiftio
timeout: '10m'
extra_target: rhel
- '{ci_project}-{git_repo}-build-master':
git_organization: redhat-developer
git_repo: che-vertx-server
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
timeout: '20m'
- '{ci_project}-{git_repo}-rh-che-compatibility-test-{test_url}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: 'TARGET="rhel" /bin/bash ./.ci/cico_rhche_compatibility_test.sh'
test_url: 'dev.rdu2c.fabric8.io'
timeout: '60m'
- '{ci_project}-{git_repo}-rh-che-prcheck-{test_url}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: 'TARGET="rhel" /bin/bash ./.ci/cico_rhche_prcheck.sh'
test_url: 'dev.rdu2c.fabric8.io'
timeout: '75m'
- '{ci_project}-{git_repo}-prcheck-cleanup':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: '/bin/bash ./.ci/cico_cleanup_dev_cluster.sh'
timeout: '15m'
- '{ci_project}-{git_repo}-rollout-test-{test_url}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: '/bin/bash ./.ci/cico_rollout_test.sh'
test_url: 'devtools-dev.ext.devshift.net'
timeout: '60m'
- '{ci_project}-{git_repo}-prcheck-build-dep':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: '/bin/bash ./.ci/cico_build_prcheck_dep.sh'
timeout: '120m'
- '{ci_project}-{git_repo}-periodic-route-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: './functional-tests/devscripts/route_tests.sh -u $USERNAME -p $PASSWORD -f ./functional-tests/devscripts/resources/route.yml'
timeout: '5m'
cluster: '2'
- '{ci_project}-{git_repo}-periodic-route-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: './functional-tests/devscripts/route_tests.sh -u $USERNAME -p $PASSWORD -f ./functional-tests/devscripts/resources/route.yml'
timeout: '5m'
cluster: '2a'
- '{ci_project}-{git_repo}-periodic-route-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: './functional-tests/devscripts/route_tests.sh -u $USERNAME -p $PASSWORD -f ./functional-tests/devscripts/resources/route.yml'
timeout: '5m'
cluster: '1b'
- '{ci_project}-{git_repo}-periodic-route-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: './functional-tests/devscripts/route_tests.sh -u $USERNAME -p $PASSWORD -f ./functional-tests/devscripts/resources/route.yml'
timeout: '5m'
cluster: '1a'
- '{ci_project}-{git_repo}-build-func-dep':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: '/bin/bash ./.ci/cico_build_func_dep.sh'
timeout: '120m'
- '{ci_project}-{git_repo}-flaky-{env}-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: 'export HOST_URL="che.openshift.io" && source ./functional-tests/devscripts/prepare_env.sh && ./functional-tests/devscripts/run_tests.sh'
env: 'prod'
timeout: '50m'
cluster: '2'
- '{ci_project}-{git_repo}-periodic-{env}-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: 'export HOST_URL="che.prod-preview.openshift.io" && source ./functional-tests/devscripts/prepare_env.sh && ./functional-tests/devscripts/run_tests.sh'
env: 'prod-preview'
timeout: '60m'
cluster: '2a'
- '{ci_project}-{git_repo}-periodic-{env}-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: 'export HOST_URL="che.openshift.io" && source ./functional-tests/devscripts/prepare_env.sh && ./functional-tests/devscripts/run_tests.sh'
env: 'prod'
timeout: '60m'
cluster: '2aProd'
- '{ci_project}-{git_repo}-periodic-{env}-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: 'export HOST_URL="che.openshift.io" && source ./functional-tests/devscripts/prepare_env.sh && ./functional-tests/devscripts/run_tests.sh'
env: 'prod'
timeout: '60m'
cluster: '2'
- '{ci_project}-{git_repo}-periodic-{env}-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: 'export HOST_URL="che.openshift.io" && source ./functional-tests/devscripts/prepare_env.sh && ./functional-tests/devscripts/run_tests.sh'
env: 'prod'
timeout: '60m'
cluster: '1b'
- '{ci_project}-{git_repo}-periodic-{env}-{cluster}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
ci_cmd: 'export HOST_URL="che.openshift.io" && source ./functional-tests/devscripts/prepare_env.sh && ./functional-tests/devscripts/run_tests.sh'
env: 'prod'
timeout: '60m'
cluster: '1a'
- '{ci_project}-{git_repo}-build-che-credentials-{branch}':
git_organization: redhat-developer
git_repo: rh-che
ci_project: 'devtools'
branch: master
ci_cmd: '/bin/bash .ci/cico_build.sh && /bin/bash .ci/cico_deploy.sh'
saas_git: saas-openshiftio
saas_service_name: rh-che6
timeout: '30m'
extra_target: rhel
- '{ci_project}-{git_repo}-build-master':
git_organization: redhat-developer
git_repo: kubernetes-image-puller
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
saas_git: saas-openshiftio
extra_target: rhel
timeout: 15m
- '{ci_project}-{git_repo}':
git_organization: fabric8-ui
git_repo: ngx-widgets
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '20m'
- '{ci_project}-{git_repo}-npm-publish-build-master':
git_organization: fabric8-ui
git_repo: ngx-widgets
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
- '{ci_project}-{git_repo}':
git_organization: fabric8-ui
git_repo: ngx-login-client
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '20m'
- '{ci_project}-{git_repo}-npm-publish-build-master':
git_organization: fabric8-ui
git_repo: ngx-login-client
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
- '{ci_project}-{git_repo}':
git_organization: fabric8-ui
git_repo: ngx-fabric8-wit
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '20m'
extra_target: rhel
- '{ci_project}-{git_repo}-wit-go-benchmarks':
git_organization: fabric8-services
git_repo: fabric8-wit
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_go_benchmarks.sh'
timeout: '20m'
- '{ci_project}-{git_repo}-npm-publish-build-master':
git_organization: fabric8-ui
git_repo: ngx-fabric8-wit
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
- '{ci_project}-{git_repo}-build-master':
git_organization: fabric8-services
git_repo: keycloak-deployment
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_build_deploy.sh'
timeout: '50m'
saas_git: saas-openshiftio:keycloak
prj_name: dsaas-keycloak-preview
extra_target: rhel
- '{ci_project}-{git_repo}':
git_organization: fabric8-services
git_repo: keycloak-deployment
ci_project: 'devtools'
ci_cmd: '/bin/bash cico_run_tests.sh'
timeout: '120m'