-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Devops 131/concourse core integration (#505)
* Concourse pipelines * Use secrets for Slack webhook URLs * Updated secret references * Production readiness updates * Add dockerfiles * Update secrets * Fix resource order * Updte pipeline secrets * Concourse pipelines * Use secrets for Slack webhook URLs * Updated secret references * Production readiness updates * Add dockerfiles * Update secrets * Fix resource order * Updte pipeline secrets * DEVOPS-131/concourse-core-integration * Remove `-j 1` fallback builds * Don't sync `cargo build` and `cargo test` caches. * DEVOPS-131/concourse-core-integration * Add timeout to integration tests * DEVOPS-131/concourse-core-integration Make disabling of fork PRs explicit * Enable submodule cloning * Add dev tag to github-pr resource docker image Workaround to enable submodules. See telia-oss/github-pr-resource#206 * DEVOPS-131/concourse-core-integration Submodule credentials workaround * DEVOPS-131/concourse-core-integration Fix file path in condition * DEVOPS-131/concourse-core-integration * Update cargo test step to fetch submodules * DEVOPS-131/concourse-core-integration * Update cargo test packages * DEVOPS-131/concourse-core-integration Enable toolchain for `cargo test` * DEVOPS-131/concourse-core-integration * Update `cargo test` container * DEVOPS-131/concourse-core-integration * Update `master` and `tooling` branch and PR pipelines * Update build step to have the binary report the build version
- Loading branch information
1 parent
2f6792f
commit 5a05972
Showing
13 changed files
with
1,161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM debian:stable-slim | ||
|
||
|
||
COPY --chown=4001:4001 usr/local/bin/polymesh /usr/local/bin/polymesh | ||
RUN mkdir /var/lib/polymesh && \ | ||
chown 4001:4401 /var/lib/polymesh | ||
|
||
USER 4001:4001 | ||
|
||
ENTRYPOINT ["/usr/local/bin/polymesh"] | ||
CMD [ "-d", "/var/lib/polymesh" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM gcr.io/distroless/cc | ||
|
||
|
||
COPY --chown=4001:4001 . / | ||
USER 4001:4001 | ||
|
||
ENTRYPOINT ["/usr/local/bin/polymesh"] | ||
CMD [ "-d", "/var/lib/polymesh" ] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
--- | ||
|
||
resource_types: | ||
- name: slack-notifier | ||
type: docker-image | ||
source: | ||
repository: mockersf/concourse-slack-notifier | ||
|
||
resources: | ||
- name: git-polymesh | ||
type: git | ||
icon: github | ||
check_every: 5m | ||
source: | ||
uri: [email protected]:polymathnetwork/Polymesh.git | ||
branch: develop | ||
private_key: ((github-ssh-key-concourseatpolymath.id_rsa)) | ||
commit_filter: | ||
include: | ||
- merge | ||
- Merge | ||
- trigger | ||
- name: s3-polymesh | ||
type: s3 | ||
source: | ||
bucket: polymesh-testnet-artifacts | ||
region_name: ca-central-1 | ||
regexp: concourse/polymesh/polymesh-(.*) | ||
access_key_id: ((s3-polymath-concourse.access_key_id)) | ||
secret_access_key: ((s3-polymath-concourse.secret_access_key)) | ||
- name: dockerimage-polymesh | ||
type: docker-image | ||
source: | ||
repository: 414255671868.dkr.ecr.us-east-1.amazonaws.com/polymathnetwork/polymesh | ||
aws_access_key_id: ((polymath-ecr.aws-access-id)) | ||
aws_secret_access_key: ((polymath-ecr.aws-access-secret)) | ||
- name: semver-git-polymesh | ||
type: semver | ||
source: | ||
driver: git | ||
uri: [email protected]:polymathnetwork/concourse-semver-tracking | ||
branch: master | ||
file: polymesh/alcyone-version | ||
private_key: ((github-polymathnetwork-concourse-semver-tracking.id_rsa)) | ||
- name: slack-polymesh | ||
type: slack-notifier | ||
source: | ||
url: ((slack-webhook-url.concourse-notifications)) | ||
channel: concourse-notifications | ||
|
||
|
||
jobs: | ||
- name: build-polymesh | ||
plan: | ||
- put: semver-git-polymesh | ||
params: | ||
bump: patch | ||
- get: git-polymesh | ||
params: | ||
list_changed_files: true | ||
trigger: true | ||
version: every | ||
- in_parallel: | ||
- task: run-lint | ||
config: | ||
inputs: | ||
- name: git-polymesh | ||
platform: linux | ||
image_resource: | ||
type: registry-image | ||
source: | ||
repository: polymathnetwork/rust | ||
tag: debian-1.45.0 | ||
aws_access_key_id: ((polymath-ecr.aws-access-id)) | ||
aws_secret_access_key: ((polymath-ecr.aws-access-secret)) | ||
aws_region: us-east-1 | ||
run: | ||
dir: git-polymesh | ||
path: bash | ||
args: [".concourse/scripts/t-rustfmt-lint.sh"] | ||
- task: cargo-build | ||
config: | ||
inputs: | ||
- name: git-polymesh | ||
- name: semver-git-polymesh | ||
caches: | ||
- path: git-polymesh/target | ||
- path: /usr/local/cargo | ||
platform: linux | ||
image_resource: | ||
type: registry-image | ||
source: | ||
repository: polymathnetwork/rust | ||
tag: debian-1.45.0 | ||
aws_access_key_id: ((polymath-ecr.aws-access-id)) | ||
aws_secret_access_key: ((polymath-ecr.aws-access-secret)) | ||
aws_region: us-east-1 | ||
run: | ||
path: bash | ||
args: ["git-polymesh/.concourse/scripts/t-cargo-build.sh", "git-polymesh", "artifact", "semver-git-polymesh"] | ||
outputs: | ||
- name: artifact | ||
- task: npm-install | ||
config: | ||
inputs: | ||
- name: git-polymesh | ||
caches: | ||
- path: git-polymesh/scripts/cli/node_modules | ||
platform: linux | ||
image_resource: | ||
type: registry-image | ||
source: | ||
repository: polymathnetwork/node | ||
tag: 14 | ||
aws_access_key_id: ((polymath-ecr.aws-access-id)) | ||
aws_secret_access_key: ((polymath-ecr.aws-access-secret)) | ||
aws_region: us-east-1 | ||
run: | ||
path: bash | ||
args: ["git-polymesh/.concourse/scripts/t-npm-install.sh", "git-polymesh", "npm-caches"] | ||
outputs: | ||
- name: npm-caches | ||
- in_parallel: | ||
- task: cargo-test | ||
config: | ||
inputs: | ||
- name: git-polymesh | ||
caches: | ||
- path: git-polymesh/target | ||
- path: /usr/local/cargo | ||
platform: linux | ||
image_resource: | ||
type: registry-image | ||
source: | ||
repository: polymathnetwork/rust | ||
tag: debian-1.45.0 | ||
aws_access_key_id: ((polymath-ecr.aws-access-id)) | ||
aws_secret_access_key: ((polymath-ecr.aws-access-secret)) | ||
aws_region: us-east-1 | ||
run: | ||
path: bash | ||
args: ["git-polymesh/.concourse/scripts/t-cargo-test.sh", "git-polymesh"] | ||
- task: integration-test | ||
config: | ||
inputs: | ||
- name: git-polymesh | ||
- name: artifact | ||
- name: npm-caches | ||
platform: linux | ||
image_resource: | ||
type: registry-image | ||
source: | ||
repository: polymathnetwork/node | ||
tag: 14 | ||
aws_access_key_id: ((polymath-ecr.aws-access-id)) | ||
aws_secret_access_key: ((polymath-ecr.aws-access-secret)) | ||
aws_region: us-east-1 | ||
run: | ||
path: bash | ||
args: ["git-polymesh/.concourse/scripts/t-npm-test.sh", "git-polymesh", "npm-caches", "artifact"] | ||
timeout: 30m | ||
- in_parallel: | ||
- put: s3-polymesh | ||
params: | ||
file: artifact/polymesh-* | ||
acl: public-read | ||
- put: dockerimage-polymesh | ||
params: | ||
build: artifact | ||
dockerfile: artifact/Dockerfile.distroless | ||
tag_file: artifact/tag_file | ||
additional_tags: artifact/additional_tags.distroless | ||
tag_prefix: distroless- | ||
- put: dockerimage-polymesh | ||
params: | ||
build: artifact | ||
dockerfile: artifact/Dockerfile.debian | ||
tag_file: artifact/tag_file | ||
additional_tags: artifact/additional_tags.debian | ||
tag_prefix: debian- | ||
- put: slack-polymesh | ||
params: | ||
mode: normal | ||
alert_type: success | ||
message_file: semver-git-polymesh/version | ||
fail_if_message_file_missing: true | ||
on_failure: | ||
put: slack-polymesh | ||
params: | ||
mode: normal | ||
alert_type: failed | ||
|
||
|
Oops, something went wrong.