-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AEIM-3241 - Upgrade to puppet 6 and update dependencies
Also added a github actions CI workflow as an alternative to Travis. Had to remove ec2tagfacts from the fixtures file due to a strange bug where github's servers kept showing sh errors like this: nebula::role::mgetit_log on debian-9-x86_64 sh: 30: Syntax error: Unterminated quoted string sh: 30: Syntax error: Unterminated quoted string sh: 30: Syntax error: Unterminated quoted string sh: 30: Syntax error: Unterminated quoted string sh: 30: Syntax error: Unterminated quoted string sh: 30: Syntax error: Unterminated quoted string is expected to compile using default hieradata This would happen for each individual test, and each error would take a few seconds, so the entire suite would time out every time. This happened using docker compose, vanilla docker, and just with github's ruby action, and I never managed to replicate it on my own workstation, so we remain completely ignorant as to why this happened. But removing ec2tagfacts from the fixtures file fixed it without breaking any tests, so away it goes.
- Loading branch information
Showing
16 changed files
with
230 additions
and
157 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
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,17 @@ | ||
name: Run CI | ||
|
||
on: | ||
push: | ||
branches: [$default-branch] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run tests | ||
run: | | ||
docker-compose --file docker-compose.test.yml build | ||
docker-compose --file docker-compose.test.yml run lint | ||
docker-compose --file docker-compose.test.yml run specs |
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 |
---|---|---|
@@ -1,12 +1,23 @@ | ||
FROM ruby:2.5-stretch | ||
FROM ruby:2.5 | ||
ARG UNAME=app | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
ARG APP_HOME=/app | ||
ARG GEM_HOME=/gems | ||
|
||
RUN gem install 'bundler:~>1.17.3' 'bundler:~>2.0.2' | ||
RUN groupadd -g $GID -o $UNAME | ||
RUN useradd -m -d $APP_HOME -u $UID -g $GID -o -s /bin/bash $UNAME | ||
RUN mkdir -p $GEM_HOME && chown $UID:$GID $GEM_HOME | ||
|
||
COPY Gemfile* /usr/src/nebula/ | ||
WORKDIR /usr/src/nebula | ||
USER $UNAME | ||
RUN gem install 'bundler:~>1.17.3' 'bundler:~>2.0.2' | ||
COPY --chown=$UID:$GID Gemfile* ${APP_HOME}/ | ||
ENV BUNDLE_GEMFILE=${APP_HOME}/Gemfile | ||
ENV BUNDLE_PATH=${GEM_HOME} | ||
WORKDIR ${APP_HOME} | ||
|
||
ENV BUNDLE_PATH /gems | ||
RUN bundle install | ||
|
||
COPY . /usr/src/nebula/ | ||
CMD ["/bin/bash"] | ||
COPY --chown=$UID:$GID . ${APP_HOME} | ||
|
||
CMD ["bundle exec rake spec"] |
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
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
Oops, something went wrong.