metaractor 3.3.0 → 3.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,93 +0,0 @@
1
- env:
2
- BUILDKITE_PLUGIN_DOCKER_CACHE_S3_BUCKET: "outstand-buildkite-cache"
3
- # BUILDKITE_PLUGIN_DOCKER_CACHE_VOLUME_DEBUG: "true"
4
- BUILDKITE_PLUGIN_DOCKER_COMPOSE_SHELL: "false"
5
- # BUILDKITE_PLUGIN_DOCKER_COMPOSE_UPLOAD_CONTAINER_LOGS: "always"
6
- BUILDKITE_PLUGIN_DOCKER_COMPOSE_PULL_RETRIES: 5
7
- BUILDKITE_PLUGIN_DOCKER_COMPOSE_PUSH_RETRIES: 5
8
- PLUGIN_DOCKER_COMPOSE_VERSION: "03d746fbf5171b217b732ff7d8a3e417d664df1c"
9
- PLUGIN_DOCKER_CACHE_VERSION: "50ecc80f736a4a3a0ab1f5990e58ae8e536c85e1"
10
- WORKSPACE_DIR: "${BUILDKITE_BUILD_CHECKOUT_PATH}"
11
-
12
- steps:
13
- - label: ":docker: Build"
14
- key: build
15
- plugins:
16
- - seek-oss/aws-sm#v2.3.1:
17
- env:
18
- DOCKER_LOGIN_PASSWORD: "/buildkite/docker_password"
19
-
20
- - docker-login#v2.1.0:
21
- username: outstandci
22
- retries: 2
23
-
24
- - ecr#v2.5.0:
25
- login: true
26
- region: "us-east-1"
27
-
28
- - https://github.com/outstand/docker-compose-buildkite-plugin.git#${PLUGIN_DOCKER_COMPOSE_VERSION}:
29
- build: metaractor
30
- image-repository: 786715713882.dkr.ecr.us-east-1.amazonaws.com/ci-images
31
- config:
32
- - compose.yml
33
-
34
- - label: ":bundler: :rubygems:"
35
- key: bundle_install
36
- command: bundle install
37
- depends_on: build
38
- plugins:
39
- - seek-oss/aws-sm#v2.3.1:
40
- env:
41
- DOCKER_LOGIN_PASSWORD: "/buildkite/docker_password"
42
-
43
- - docker-login#v2.1.0:
44
- username: outstandci
45
- retries: 2
46
-
47
- - ecr#v2.5.0:
48
- login: true
49
- region: "us-east-1"
50
-
51
- - https://github.com/outstand/docker-compose-buildkite-plugin.git#${PLUGIN_DOCKER_COMPOSE_VERSION}:
52
- run: metaractor
53
- dependencies: false
54
- config:
55
- - compose.yml
56
-
57
- - https://github.com/outstand/docker-cache-buildkite-plugin.git#${PLUGIN_DOCKER_CACHE_VERSION}:
58
- name: bundler-cache
59
- keys:
60
- - v2-bundler-cache-{{ arch }}-{{ checksum "metaractor.gemspec" }}-{{ checksum "Gemfile" }}
61
- - v2-bundler-cache-{{ arch }}-
62
- save: true
63
- volumes:
64
- - bundler-data
65
-
66
- - label: ":ruby: Specs"
67
- command: rspec spec
68
- depends_on: bundle_install
69
- plugins:
70
- - seek-oss/aws-sm#v2.3.1:
71
- env:
72
- DOCKER_LOGIN_PASSWORD: "/buildkite/docker_password"
73
-
74
- - docker-login#v2.1.0:
75
- username: outstandci
76
- retries: 2
77
-
78
- - ecr#v2.5.0:
79
- login: true
80
- region: "us-east-1"
81
-
82
- - https://github.com/outstand/docker-compose-buildkite-plugin.git#${PLUGIN_DOCKER_COMPOSE_VERSION}:
83
- run: metaractor
84
- config:
85
- - compose.yml
86
-
87
- - https://github.com/outstand/docker-cache-buildkite-plugin.git#${PLUGIN_DOCKER_CACHE_VERSION}:
88
- name: bundler-cache
89
- keys:
90
- - v2-bundler-cache-{{ arch }}-{{ checksum "metaractor.gemspec" }}-{{ checksum "Gemfile" }}
91
- - v2-bundler-cache-{{ arch }}-
92
- volumes:
93
- - bundler-data
data/Deskfile DELETED
@@ -1,3 +0,0 @@
1
- rspec() {
2
- docker compose run --rm metaractor rspec "$@"
3
- }
data/Dockerfile DELETED
@@ -1,78 +0,0 @@
1
- FROM outstand/su-exec:latest as su-exec
2
- FROM outstand/fixuid as fixuid
3
-
4
- FROM ruby:3.1.2-bullseye
5
- LABEL maintainer="Ryan Schlesinger <ryan@outstand.com>"
6
-
7
- SHELL ["/bin/bash", "-o", "pipefail", "-c"]
8
- ENV DEBIAN_FRONTEND=noninteractive
9
-
10
- RUN set -eux; \
11
- \
12
- groupadd -g 1000 metaractor && \
13
- useradd -u 1000 -g metaractor -ms /bin/bash metaractor && \
14
- \
15
- apt-get update -y; \
16
- apt-get install -y \
17
- ca-certificates \
18
- curl \
19
- git \
20
- build-essential \
21
- tini \
22
- ; \
23
- apt-get clean; \
24
- rm -f /var/lib/apt/lists/*_*
25
-
26
- # install su-exec
27
- COPY --from=su-exec /sbin/su-exec /sbin/su-exec
28
-
29
- # install fixuid
30
- COPY --from=fixuid /usr/local/bin/fixuid /usr/local/bin/fixuid
31
- RUN set -eux; \
32
- \
33
- chmod 4755 /usr/local/bin/fixuid; \
34
- USER=metaractor; \
35
- GROUP=metaractor; \
36
- mkdir -p /etc/fixuid; \
37
- printf "user: $USER\ngroup: $GROUP\n" > /etc/fixuid/config.yml
38
-
39
- ENV BUNDLER_VERSION 2.3.21
40
- ENV GITHUB_CLI_VERSION 2.14.4
41
- ENV GITHUB_CLI_CHECKSUM b0073fdcc07d1de5a19a1a782c7ad9f593f991da06a809ea39f0b6148869aa96
42
- RUN set -eux; \
43
- \
44
- mkdir -p /tmp/build; \
45
- cd /tmp/build; \
46
- \
47
- gem install bundler -v ${BUNDLER_VERSION} -i /usr/local/lib/ruby/gems/$(ls /usr/local/lib/ruby/gems) --force; \
48
- curl -fsSL https://github.com/cli/cli/releases/download/v${GITHUB_CLI_VERSION}/gh_${GITHUB_CLI_VERSION}_linux_amd64.deb -o gh_${GITHUB_CLI_VERSION}_linux_amd64.deb; \
49
- echo "${GITHUB_CLI_CHECKSUM} gh_${GITHUB_CLI_VERSION}_linux_amd64.deb" | sha256sum --check; \
50
- apt-get update -y; \
51
- apt-get install -y --no-install-recommends \
52
- ./gh_${GITHUB_CLI_VERSION}_linux_amd64.deb \
53
- ; \
54
- apt-get clean; \
55
- rm -f /var/lib/apt/lists/*_*; \
56
- rm -rf /tmp/build
57
-
58
- COPY brew-shim /usr/bin/brew
59
-
60
- WORKDIR /metaractor
61
- RUN set -eux; \
62
- \
63
- chown -R metaractor:metaractor /metaractor
64
-
65
- USER metaractor
66
-
67
- COPY --chown=metaractor:metaractor Gemfile metaractor.gemspec /metaractor/
68
- COPY --chown=metaractor:metaractor lib/metaractor/version.rb /metaractor/lib/metaractor/
69
- RUN set -eux; \
70
- \
71
- git config --global push.default simple
72
- COPY --chown=metaractor:metaractor . /metaractor/
73
-
74
- USER root
75
- COPY docker-entrypoint.sh /docker-entrypoint.sh
76
-
77
- ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/docker-entrypoint.sh"]
78
- CMD ["rspec", "spec"]
data/brew-shim DELETED
@@ -1,10 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -euo pipefail
4
-
5
- # Docker host has the following git config:
6
- # helper = !$(brew --prefix)/bin/gh auth git-credential
7
- #
8
- # We're going to lie inside the container so we can find the local gh
9
-
10
- echo "/usr"
data/compose.yml DELETED
@@ -1,35 +0,0 @@
1
- services:
2
- metaractor:
3
- build: .
4
- image: outstand/metaractor:dev
5
- stdin_open: true
6
- tty: true
7
- environment:
8
- FIXUID:
9
- FIXGID:
10
- BUILDKITE:
11
- BUILDKITE_BUILD_URL:
12
- BUILDKITE_JOB_ID:
13
- BUILDKITE_AGENT_ACCESS_TOKEN:
14
- volumes:
15
- - bundler-data:/usr/local/bundle
16
- - .:/metaractor
17
-
18
- release:
19
- image: outstand/metaractor:dev
20
- stdin_open: true
21
- tty: true
22
- command: rake release
23
- environment:
24
- FIXUID:
25
- FIXGID:
26
- volumes:
27
- - bundler-data:/usr/local/bundle
28
- - ~/.gitconfig:/home/metaractor/.gitconfig
29
- - ~/.gitconfig.user:/home/metaractor/.gitconfig.user
30
- - ~/.config/gh/hosts.yml:/home/metaractor/.config/gh/hosts.yml
31
- - ~/.local/share/gem/credentials:/home/metaractor/.local/share/gem/credentials
32
- - ~/.local/share/gem/credentials:/home/metaractor/.gem/credentials
33
-
34
- volumes:
35
- bundler-data:
data/docker-entrypoint.sh DELETED
@@ -1,39 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -euo pipefail
4
-
5
- su-exec ${FIXUID:?Missing FIXUID var}:${FIXGID:?Missing FIXGID var} fixuid
6
-
7
- chown_dir() {
8
- dir=$1
9
- if [[ -d ${dir} ]] && [[ "$(stat -c %u:%g ${dir})" != "${FIXUID}:${FIXGID}" ]]; then
10
- echo chown $dir
11
- chown metaractor:metaractor $dir
12
- fi
13
- }
14
-
15
- chown_dir /usr/local/bundle
16
- chown_dir /home/metaractor/.local/share/gem
17
- chown_dir /home/metaractor/.gem
18
-
19
- if [ "$(which "$1")" = '' ]; then
20
- if [ "$(ls -A /usr/local/bundle/bin)" = '' ]; then
21
- echo 'command not in path and bundler not initialized'
22
- echo 'running bundle install'
23
- su-exec metaractor bundle install
24
- fi
25
- fi
26
-
27
- if [ "$1" = 'bundle' ]; then
28
- set -- su-exec metaractor "$@"
29
- elif [ "$1" = 'rake' ]; then
30
- set -- su-exec metaractor bundle exec "$@"
31
-
32
- su-exec metaractor bash -c 'bundle check || bundle install'
33
- elif ls /usr/local/bundle/bin | grep -q "\b$1\b"; then
34
- set -- su-exec metaractor bundle exec "$@"
35
-
36
- su-exec metaractor bash -c 'bundle check || bundle install'
37
- fi
38
-
39
- exec "$@"