forked from mozilla/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add .gitlab-ci.yml and bin/update_config.sh (mozilla#8141)
Add .gitlab-ci.yml and bin/update_config.sh for mozilla#6794 Build and deploy to iowa-a/bedrock-dev on gitlab-ci-dev & master Remove jenkins/branches/master.yml
- Loading branch information
Showing
3 changed files
with
61 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
variables: | ||
CLUSTER_NAME: iowa-a | ||
CONFIG_REPO: git@github.com:mozmeao/www-config | ||
CONFIG_BRANCH: master | ||
|
||
stages: | ||
- build | ||
- update-config | ||
|
||
build: | ||
stage: build | ||
only: | ||
- gitlab-ci-dev | ||
- master | ||
tags: | ||
- oregon-b-shell | ||
script: | ||
- make clean build-ci | ||
- FROM_DOCKER_REPOSITORY=mozorg/bedrock_test docker/bin/push2dockerhub.sh | ||
- FROM_DOCKER_REPOSITORY=mozorg/bedrock_assets docker/bin/push2dockerhub.sh | ||
- FROM_DOCKER_REPOSITORY=mozorg/bedrock_code docker/bin/push2dockerhub.sh | ||
- FROM_DOCKER_REPOSITORY=mozorg/bedrock_build docker/bin/push2dockerhub.sh | ||
- FROM_DOCKER_REPOSITORY=mozorg/bedrock docker/bin/push2dockerhub.sh | ||
- bin/upload-staticfiles.sh | ||
|
||
.update-config: | ||
stage: update-config | ||
tags: | ||
- oregon-b-shell | ||
script: | ||
- bin/update_config.sh | ||
|
||
dev: | ||
extends: .update-config | ||
only: | ||
- gitlab-ci-dev | ||
- master | ||
variables: | ||
NAMESPACE: bedrock-dev |
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,22 @@ | ||
#!/bin/bash | ||
set -ex | ||
# required env vars: CLUSTER_NAME, CONFIG_BRANCH, CONFIG_REPO, NAMESPACE, | ||
# DEPLOYMENT_YAML, DEPLOYMENT_LOG_BASE_URL, DEPLOYMENT_NAME, DEPLOYMENT_VERSION | ||
|
||
. ${BASH_SOURCE%/*}/../docker/bin/set_git_env_vars.sh # sets DEPLOYMENT_DOCKER_IMAGE | ||
pushd $(mktemp -d) | ||
git clone --depth=1 -b ${CONFIG_BRANCH:=master} ${CONFIG_REPO} config_checkout | ||
cd config_checkout | ||
|
||
set -u | ||
for CLUSTER in ${CLUSTERS:=iowa-a}; do | ||
for DEPLOYMENT in {clock-,}deploy.yaml; do | ||
DEPLOYMENT_FILE=${CLUSTER}/${NAMESPACE:=bedrock-dev}/${DEPLOYMENT} | ||
if [[ -f ${DEPLOYMENT_FILE} ]]; then | ||
sed -i -e "s|image: .*|image: ${DEPLOYMENT_DOCKER_IMAGE}|" ${DEPLOYMENT_FILE} | ||
git add ${DEPLOYMENT_FILE} | ||
fi | ||
done | ||
done | ||
git commit -m "set image to ${DEPLOYMENT_DOCKER_IMAGE} in ${CLUSTERS}" || echo "nothing new to commit" | ||
git push |
This file was deleted.
Oops, something went wrong.