From 21510136cbf595e1dd1a5ff89f1cc45de905191f Mon Sep 17 00:00:00 2001 From: Yorick Horrie Date: Wed, 23 Dec 2020 12:06:35 +0100 Subject: [PATCH 1/6] Add pipeline again --- Makefile | 8 ++ ci/.yamllint | 5 + ci/common-vars.yaml | 32 ++++++ ci/fly-validate.yaml | 13 +++ ci/params.yaml | 4 + ci/pipeline.yaml | 238 +++++++++++++++++++++++++++++++++++++++++++ ci/yamllint.yaml | 13 +++ 7 files changed, 313 insertions(+) create mode 100644 Makefile create mode 100644 ci/.yamllint create mode 100644 ci/common-vars.yaml create mode 100644 ci/fly-validate.yaml create mode 100644 ci/params.yaml create mode 100644 ci/pipeline.yaml create mode 100644 ci/yamllint.yaml diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..980e5ce6a --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +yamllint: + docker run --rm -ti -v $(shell pwd):/design-ui -w /design-ui/ci teamleader/yamllint:latest . -d .yamllint + +fly-validate: + docker run --rm -ti -v $(shell pwd):/design-ui -w /design-ui/ci teamleader/concourse-fly:6.2 + +set-pipeline: + fly -t tl set-pipeline -p design-ui -c ci/pipeline.yaml -l ci/params.yaml -l ci/common-vars.yaml diff --git a/ci/.yamllint b/ci/.yamllint new file mode 100644 index 000000000..ae8f565a2 --- /dev/null +++ b/ci/.yamllint @@ -0,0 +1,5 @@ +--- +extends: default + +rules: + line-length: disable diff --git a/ci/common-vars.yaml b/ci/common-vars.yaml new file mode 100644 index 000000000..8683dc15d --- /dev/null +++ b/ci/common-vars.yaml @@ -0,0 +1,32 @@ +--- +SLACK_ON_FAILURE: + put: slack-alert + params: + attachments: + - color: danger + text: | + [$BUILD_PIPELINE_NAME] - [$BUILD_JOB_NAME] Failed. Check it out at: https://ci.teamleader.eu/builds/$BUILD_ID + +SLACK_ON_SUCCESS: + put: slack-alert + params: + attachments: + - color: good + text: | + [$BUILD_PIPELINE_NAME] - [$BUILD_JOB_NAME] Successful. Check it out at: https://ci.teamleader.eu/builds/$BUILD_ID + +SLACK_ON_SUCCESS_DEPLOYMENT: + put: slack-alert + params: + attachments: + - color: good + text: | + [$BUILD_PIPELINE_NAME] - [$BUILD_JOB_NAME] Successful deployment (). + +SLACK_ON_FAILURE_DEPLOYMENT: + put: slack-alert + params: + attachments: + - color: danger + text: | + [$BUILD_PIPELINE_NAME] - [$BUILD_JOB_NAME] Failed deployment (). diff --git a/ci/fly-validate.yaml b/ci/fly-validate.yaml new file mode 100644 index 000000000..1f491e2bf --- /dev/null +++ b/ci/fly-validate.yaml @@ -0,0 +1,13 @@ +--- +platform: linux + +inputs: + - name: git-ci-design-ui + +run: + path: sh + args: + - -exec + - | + cd git-ci-design-ui + fly validate-pipeline -s -c ci/pipeline.yaml -l ci/common-vars.yaml diff --git a/ci/params.yaml b/ci/params.yaml new file mode 100644 index 000000000..4d1c29182 --- /dev/null +++ b/ci/params.yaml @@ -0,0 +1,4 @@ +--- +DESIGN_UI_DEPLOY_PARAMS: + BUCKET: components.teamleader.design + DISTRIBUTION_ID: E32J2T4LJYMPK0 diff --git a/ci/pipeline.yaml b/ci/pipeline.yaml new file mode 100644 index 000000000..1a7ac0f5e --- /dev/null +++ b/ci/pipeline.yaml @@ -0,0 +1,238 @@ +--- +resource_types: + - name: slack-notification + type: docker-image + source: + repository: cfcommunity/slack-notification-resource + tag: latest + - name: s3 + type: docker-image + source: + repository: teamleader/s3-simple-resource + tag: latest + - name: cf + type: docker-image + source: + repository: teamleader/cf-simple-resource + tag: latest + - name: pull-request + type: docker-image + source: + repository: teliaoss/github-pr-resource + + +resources: + + - name: git-design-ui + type: git + source: + uri: git@github.com:teamleadercrm/ui.git + branch: master + private_key: ((TEAMLEADER_PRIVATE_KEY)) + icon: github-circle + - name: git-ci-design-ui + type: git + source: + uri: git@github.com:teamleadercrm/ui.git + branch: master + private_key: ((TEAMLEADER_PRIVATE_KEY)) + icon: github-circle + - name: git-ci-pull-request + type: pull-request + source: + access_token: ((GITHUB_ACCESS_TOKEN)) + repository: teamleadercrm/ui + paths: ['ci/*'] + icon: github + + # Docker image + - name: docker-node + type: docker-image + check_every: 24h + source: + repository: node + tag: '14-slim' + icon: docker + - name: docker-fly-validate + type: docker-image + source: + repository: teamleader/concourse-fly + tag: ((DOCKER_FLY_VALIDATE_TAG)) + username: ((DOCKER_HUB_USERNAME)) + password: ((DOCKER_HUB_PASSWORD)) + - name: docker-yamllint + type: docker-image + source: + repository: teamleader/yamllint + tag: latest + username: ((DOCKER_HUB_USERNAME)) + password: ((DOCKER_HUB_PASSWORD)) + + - name: slack-alert + type: slack-notification + check_every: 24h + source: + # slack channel: dev-ci + url: https://hooks.slack.com/services/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 + icon: slack + + - name: s3-bucket-ui + type: s3 + source: + access_key_id: ((AWS_ACCESS_KEY)) + secret_access_key: ((AWS_ACCESS_SECRET)) + bucket: ((DESIGN_UI_DEPLOY_PARAMS.BUCKET)) + region: eu-west-1 + icon: amazon-drive + + - name: cloudfront-ui + type: cf + source: + access_key_id: ((AWS_ACCESS_KEY)) + secret_access_key: ((AWS_ACCESS_SECRET)) + distribution_id: ((DESIGN_UI_DEPLOY_PARAMS.DISTRIBUTION_ID)) + path: "/*" + region: eu-west-1 + icon: amazon-drive + +groups: + - name: design-ui + jobs: + - deploy-components + - name: design-ui-ops + jobs: + - pr-yamllint + - pr-fly-validate + - yamllint + - fly-validate + - set-pipeline +jobs: + - name: deploy-components + plan: + - in_parallel: + - get: git-design-ui + trigger: true + - get: docker-node + params: {save: true} + - task: build-components + image: docker-node + config: + platform: linux + inputs: + - name: git-design-ui + outputs: + - name: build-output + run: + path: sh + args: + - -exec + - | + cd git-design-ui + yarn + yarn deploy:prod + cp -a dist/. ../build-output + on_failure: ((SLACK_ON_FAILURE)) + - put: s3-bucket-ui + params: + dir: build-output + - put: cloudfront-ui + on_failure: ((SLACK_ON_FAILURE_DEPLOYMENT)) + on_success: ((SLACK_ON_SUCCESS_DEPLOYMENT)) + + # OPS jobs + + - name: pr-yamllint + plan: + - in_parallel: + - get: git-ci-pull-request + trigger: true + version: every + - get: docker-yamllint + params: {save: true} + - put: git-ci-pull-request + params: + path: git-ci-pull-request + status: pending + context: yamllint + - task: yamllint + image: docker-yamllint + file: git-ci-pull-request/ci/yamllint.yaml + input_mapping: + git-ci-design-ui: git-ci-pull-request + on_success: + put: git-ci-pull-request + params: + path: git-ci-pull-request + status: success + context: yamllint + on_failure: + put: git-ci-pull-request + params: + path: git-ci-pull-request + status: failure + context: yamllint + + - name: pr-fly-validate + plan: + - in_parallel: + - get: git-ci-pull-request + trigger: true + version: every + - get: docker-fly-validate + params: {save: true} + - put: git-ci-pull-request + params: + path: git-ci-pull-request + status: pending + context: fly-validate + - task: fly-validate + image: docker-fly-validate + file: git-ci-pull-request/ci/fly-validate.yaml + input_mapping: + git-ci-design-ui: git-ci-pull-request + on_success: + put: git-ci-pull-request + params: + path: git-ci-pull-request + status: success + context: fly-validate + on_failure: + put: git-ci-pull-request + params: + path: git-ci-pull-request + status: failure + context: fly-validate + + - name: fly-validate + plan: + - in_parallel: + - get: docker-fly-validate + params: {save: true} + - get: git-ci-design-ui + trigger: true + - task: fly-validate + image: docker-fly-validate + file: git-ci-design-ui/ci/fly-validate.yaml + + - name: yamllint + plan: + - in_parallel: + - get: docker-yamllint + params: {save: true} + - get: git-ci-design-ui + trigger: true + - task: yamllint + image: docker-yamllint + file: git-ci-design-ui/ci/yamllint.yaml + + - name: set-pipeline + plan: + - get: git-ci-design-ui + trigger: true + passed: [fly-validate, yamllint] + - set_pipeline: design-ui + file: git-ci-design-ui/ci/pipeline.yaml + var_files: + - git-ci-design-ui/ci/common-vars.yaml + - git-ci-design-ui/ci/params.yaml + on_failure: ((SLACK_ON_FAILURE)) diff --git a/ci/yamllint.yaml b/ci/yamllint.yaml new file mode 100644 index 000000000..b2c9d8d65 --- /dev/null +++ b/ci/yamllint.yaml @@ -0,0 +1,13 @@ +--- +platform: linux + +inputs: + - name: git-ci-design-ui + +run: + path: sh + args: + - -exec + - | + cd git-ci-design-ui/ci + yamllint . -d .yamllint From b98224bc382b4b75a62dc73efc20be8537076028 Mon Sep 17 00:00:00 2001 From: Yorick Horrie Date: Wed, 5 May 2021 12:33:34 +0200 Subject: [PATCH 2/6] Update check or pull frequency from docker hub --- ci/pipeline.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/pipeline.yaml b/ci/pipeline.yaml index 3c9c79a28..fcdbf8eb3 100644 --- a/ci/pipeline.yaml +++ b/ci/pipeline.yaml @@ -2,6 +2,7 @@ resource_types: - name: slack-notification type: docker-image + check_every: 24h source: repository: cfcommunity/slack-notification-resource tag: latest @@ -9,6 +10,7 @@ resource_types: password: ((DOCKER_HUB_PASSWORD)) - name: s3 type: docker-image + check_every: 24h source: repository: teamleader/s3-simple-resource tag: latest @@ -16,6 +18,7 @@ resource_types: password: ((DOCKER_HUB_PASSWORD)) - name: cf type: docker-image + check_every: 24h source: repository: teamleader/cf-simple-resource tag: latest @@ -23,12 +26,14 @@ resource_types: password: ((DOCKER_HUB_PASSWORD)) - name: pull-request type: docker-image + check_every: 24h source: repository: teliaoss/github-pr-resource username: ((DOCKER_HUB_USERNAME)) password: ((DOCKER_HUB_PASSWORD)) - name: github-webhook-resource type: docker-image + check_every: 24h source: repository: homedepottech/github-webhook-resource tag: latest From df23bcb4f3aabc607bd27be0b55c19a518c34868 Mon Sep 17 00:00:00 2001 From: Yorick Horrie Date: Wed, 5 May 2021 14:12:44 +0200 Subject: [PATCH 3/6] Fix linting --- ci/pipeline.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/pipeline.yaml b/ci/pipeline.yaml index fcdbf8eb3..cfd0f5190 100644 --- a/ci/pipeline.yaml +++ b/ci/pipeline.yaml @@ -154,7 +154,7 @@ jobs: - get: git-design-ui trigger: true - get: docker-node - params: { save: true } + params: {save: true} - task: build-components image: docker-node config: @@ -187,7 +187,7 @@ jobs: trigger: true version: every - get: docker-node - params: { save: true } + params: {save: true} - put: git-pull-request params: path: git-pull-request @@ -231,7 +231,7 @@ jobs: trigger: true version: every - get: docker-yamllint - params: { save: true } + params: {save: true} - put: git-ci-pull-request params: path: git-ci-pull-request @@ -262,7 +262,7 @@ jobs: trigger: true version: every - get: docker-fly-validate - params: { save: true } + params: {save: true} - put: git-ci-pull-request params: path: git-ci-pull-request @@ -290,7 +290,7 @@ jobs: plan: - in_parallel: - get: docker-fly-validate - params: { save: true } + params: {save: true} - get: git-ci-design-ui trigger: true - task: fly-validate @@ -301,7 +301,7 @@ jobs: plan: - in_parallel: - get: docker-yamllint - params: { save: true } + params: {save: true} - get: git-ci-design-ui trigger: true - task: yamllint From 2ae2c088acc496719d4dbac3e5f3f71ae9e23369 Mon Sep 17 00:00:00 2001 From: EOSullivanBerlin Date: Tue, 29 Jun 2021 16:37:32 +0200 Subject: [PATCH 4/6] update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05399de5d..4da17c7a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ ### Dependency updates +## [6.5.2] - 2021-06-29 + +### Fixed + +- `Popover`: Check each direction when rendering the popover for the best fit ([@EOSullivanBerlin](https://github.com/EOSullivanBerlin) in [#1710](https://github.com/teamleadercrm/ui/pull/1710)) + ## [6.5.1] - 2021-06-29 ### Fixed From af036138479c90ab0fe42eae9eb3fc6576e61004 Mon Sep 17 00:00:00 2001 From: Michiel Devriese Date: Fri, 8 Sep 2023 11:57:38 +0200 Subject: [PATCH 5/6] Create tag through CI --- .github/workflows/create-tag.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/create-tag.yaml diff --git a/.github/workflows/create-tag.yaml b/.github/workflows/create-tag.yaml new file mode 100644 index 000000000..358d81e52 --- /dev/null +++ b/.github/workflows/create-tag.yaml @@ -0,0 +1,13 @@ +--- +name: Create new tag + +on: + push: + branches: + - master + paths: + - "package.json" +jobs: + create-new-tag: + uses: teamleadercrm/teamleader-github-workflows/.github/workflows/create-tag-node.yaml@v1.12.3 + secrets: inherit From fd05b5b8f8c967061575efbf8bec6996757f3bf4 Mon Sep 17 00:00:00 2001 From: Michiel Devriese Date: Fri, 8 Sep 2023 12:19:45 +0200 Subject: [PATCH 6/6] Revert "Create tag through CI" This reverts commit af036138479c90ab0fe42eae9eb3fc6576e61004. --- .github/workflows/create-tag.yaml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .github/workflows/create-tag.yaml diff --git a/.github/workflows/create-tag.yaml b/.github/workflows/create-tag.yaml deleted file mode 100644 index 358d81e52..000000000 --- a/.github/workflows/create-tag.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Create new tag - -on: - push: - branches: - - master - paths: - - "package.json" -jobs: - create-new-tag: - uses: teamleadercrm/teamleader-github-workflows/.github/workflows/create-tag-node.yaml@v1.12.3 - secrets: inherit