Skip to content

Commit

Permalink
Update GitLab CI with Quay credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyil committed Aug 20, 2020
1 parent b6ed33a commit fe15695
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
7 changes: 6 additions & 1 deletion .builds/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ sources:
- https://git.sr.ht/~tyil/www-fglt.nl
packages:
- docker
- ruby-bundler
- ruby-dev
secrets:
- 4577a183-953e-4612-a48b-e48c4c4763c9
tasks:
- prepare: |
# Configure Docker
sudo mkdir -p /etc/docker
cat <<-EOF > /tmp/dockerd.json
{
Expand All @@ -17,6 +17,11 @@ tasks:
EOF
sudo mv /tmp/dockerd.json /etc/docker/daemon.json
sudo rc-service docker start
# Install latest bundler gem
sudo gem install bundler
hash -r
- build: |
cd www-fglt.nl
bundle install --verbose
Expand Down
13 changes: 4 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Build Docker image:
stage: build
image: ruby:latest
before_script:
- gem install bundler:1.17.2
- gem install bundler
- bundle install
script:
- bundle exec jekyll build
Expand All @@ -21,13 +21,8 @@ Push Docker image:
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker login -u $QUAY_USER -p $QUAY_PASSWORD quay.io
script:
- docker build -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:latest
- docker tag $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:ci-$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:ci-$CI_COMMIT_SHA
- docker build -t $QUAY_REPOSITORY:latest $QUAY_REPOSITORY:ci-$CI_COMMIT_SHA .
- docker push $QUAY_REPOSITORY:latest $QUAY_REPOSITORY:ci-$CI_COMMIT_SHA

0 comments on commit fe15695

Please sign in to comment.