Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(packaging/docker): Support multiple architectures #762

Merged
merged 22 commits into from
Aug 1, 2019
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(ci): re-enable helm
  • Loading branch information
sh0rez committed Jul 30, 2019
commit da8b322bf6c6ec3407530cae479f4f48c2e62e28
126 changes: 47 additions & 79 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ workflows:
requires: [ lint, test ]
filters: { <<: *tag-or-master }

# - test-helm:
# requires: [ lint, test ]
# filters: {<<: *tags}
# - publish-helm:
# requires: [ test-helm ]
# filters: {<<: *tags}
- test-helm:
requires: [ lint, test ]
filters: {<<: *tags}
- publish-helm:
requires: [ test-helm ]
filters: {<<: *tag-or-master}


# https://circleci.com/blog/circleci-hacks-reuse-yaml-in-your-circleci-config-with-yaml/
Expand Down Expand Up @@ -158,76 +158,44 @@ jobs:
environment:
APP: promtail

# test-helm:
# environment:
# CT_VERSION: 2.3.3
# machine:
# image: ubuntu-1604:201903-01
# steps:
# - checkout
# - run:
# name: Install k3s
# command: |
# curl -sfL https://get.k3s.io | sh -
# sudo chmod 755 /etc/rancher/k3s/k3s.yaml
# mkdir -p ~/.kube
# cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
# - run:
# name: Install Helm
# command: |
# curl -L https://git.io/get_helm.sh | bash
# kubectl apply -f tools/helm.yaml
# helm init --service-account helm --wait
# - run:
# name: Install Chart Testing tool
# command: |
# pip install yamale yamllint
# curl -Lo ct.tgz https://github.com/helm/chart-testing/releases/download/v${CT_VERSION}/chart-testing_${CT_VERSION}_linux_amd64.tar.gz
# sudo tar -C /usr/local/bin -xvf ct.tgz
# sudo mv /usr/local/bin/etc /etc/ct/
# - run:
# name: Run Chart Tests
# command: |
# ct lint --chart-dirs=production/helm --check-version-increment=false --validate-maintainers=false
# ct install --build-id=${CIRCLE_BUILD_NUM} --charts production/helm/loki-stack

# publish-helm:
# <<: *defaults
# steps:
# - add_ssh_keys:
# fingerprints:
# - "5a:d3:08:5e:f7:53:a0:c4:e9:5d:83:c6:02:6a:d9:bd"
# - checkout
# - run: make helm-publish

# deploy:
# <<: *defaults
# steps:
# - checkout

# - run: |
# curl -s --header "Content-Type: application/json" \
# --data "{\"build_parameters\": {\"CIRCLE_JOB\": \"deploy\", \"IMAGE_NAMES\": \"$(make images)\"}}" \
# --request POST \
# https://circleci.com/api/v1.1/project/github/raintank/deployment_tools/tree/master?circle-token=$CIRCLE_TOKEN

# release:
# <<: *defaults
# steps:
# - checkout
# - setup_remote_docker
# - restore_cache:
# key: v1-loki-{{ .Branch }}-{{ .Revision }}
# - run:
# name: Load Images
# command: |
# touch loki-build-image/.uptodate &&
# make BUILD_IN_CONTAINER=false load-images
# - run:
# name: "Print Tag"
# command: echo ${CIRCLE_TAG}
# - run:
# name: "Release"
# command: |
# docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" &&
# make VERSION=${CIRCLE_TAG} release-perform
test-helm:
environment:
CT_VERSION: 2.3.3
machine:
image: ubuntu-1604:201903-01
steps:
- checkout
- run:
name: Install k3s
command: |
curl -sfL https://get.k3s.io | sh -
sudo chmod 755 /etc/rancher/k3s/k3s.yaml
mkdir -p ~/.kube
cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
- run:
name: Install Helm
command: |
curl -L https://git.io/get_helm.sh | bash
kubectl apply -f tools/helm.yaml
helm init --service-account helm --wait
- run:
name: Install Chart Testing tool
command: |
pip install yamale yamllint
curl -Lo ct.tgz https://github.com/helm/chart-testing/releases/download/v${CT_VERSION}/chart-testing_${CT_VERSION}_linux_amd64.tar.gz
sudo tar -C /usr/local/bin -xvf ct.tgz
sudo mv /usr/local/bin/etc /etc/ct/
- run:
name: Run Chart Tests
command: |
ct lint --chart-dirs=production/helm --check-version-increment=false --validate-maintainers=false
ct install --build-id=${CIRCLE_BUILD_NUM} --charts production/helm/loki-stack

publish-helm:
<<: *defaults
steps:
- add_ssh_keys:
fingerprints:
- "5a:d3:08:5e:f7:53:a0:c4:e9:5d:83:c6:02:6a:d9:bd"
- checkout
- run: make helm-publish