~franz/f-a.nz

10d685586cc0369bd048996f570e47b8556b5b64 — Franz Geffke 2 years ago 63f7c72
updated new post _dev, fixes, screenshots
M _dev/2018/quick-n-dirty-jekyll-yarn-gulp-gitlab-ci-s3_website-to-s3.md => _dev/2018/quick-n-dirty-jekyll-yarn-gulp-gitlab-ci-s3_website-to-s3.md +8 -4
@@ 16,6 16,8 @@ tags:

This guide assumes that you have configured [GitLab](https://about.gitlab.com/installation/) and [GitLab Runner](https://docs.gitlab.com/runner/install/) with docker and are already using gulp to build you assets, and the `s3_website` gem for deployment to S3 / CloudFront.

![GitLab Add and secure environment values](/assets/content/2018/quick-n-dirty-jekyll-yarn-gulp-gitlab-ci-s3_website-to-s3_ci.png)

This GitLab CI automation will do the following:

1. `bundle install`


@@ 28,9 30,9 @@ If you workflow differs, adjust the `.gitlab-ci.yml` config example below.

### Set-up

1. Add and secure environment values
2. Prepare your repo
3. Add `.gitlab-ci.yml` and push
1. [Add and secure environment values](#1-add-and-secure-environment-values)
2. [Prepare your repo](#2-prepare-your-repo)
3. [Add `.gitlab-ci.yml` and push](#3-add-configuration)

#### 1) Add and secure environment values



@@ 39,6 41,8 @@ Open your repository and go to `settings/ci_cd` > **Variables**
- `AWS_ACCESS_KEY_ID`, add your ID, select protected
- `AWS_SECRET_ACCESS_KEY`, add your Key, select protected

![GitLab Add and secure environment values](/assets/content/2018/quick-n-dirty-jekyll-yarn-gulp-gitlab-ci-s3_website-to-s3_environment-values.png)

... and hide the variables.

*Note: Protected environmental variables are only available during build processes on protected branches. This is especially important for public projects, with multiple contributors. The environmental values set are visible to any member with access level Maintainer and above. I'd suggest to limit AWS access to the GitLab IP.*


@@ 71,7 75,7 @@ Next go to `settings/ci_cd` > **General pipelines** and uncheck **Public pipelin
      - src
      - README.md

#### 2) Add configuration
#### 3) Add configuration

Create the `.gitlab-ci.yml` and add the following values.


M assets/content/2018/buy-and-sell-dgx-digital-gold-token-01.png => assets/content/2018/buy-and-sell-dgx-digital-gold-token-01.png +0 -0

M assets/content/2018/buy-and-sell-dgx-digital-gold-token.jpg => assets/content/2018/buy-and-sell-dgx-digital-gold-token.jpg +0 -0

A assets/content/2018/quick-n-dirty-jekyll-yarn-gulp-gitlab-ci-s3_website-to-s3_ci.png => assets/content/2018/quick-n-dirty-jekyll-yarn-gulp-gitlab-ci-s3_website-to-s3_ci.png +0 -0

A assets/content/2018/quick-n-dirty-jekyll-yarn-gulp-gitlab-ci-s3_website-to-s3_environment-values.png => assets/content/2018/quick-n-dirty-jekyll-yarn-gulp-gitlab-ci-s3_website-to-s3_environment-values.png +0 -0

M assets/content/2018/the-best-dropbox-alternative.png => assets/content/2018/the-best-dropbox-alternative.png +0 -0