Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This pull request resolves issue-16 #17

Merged
merged 57 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
89c9c57
Update README.md
oiricaud May 11, 2020
1ce9f9c
Update README.md
oiricaud May 11, 2020
ff189f8
Update package.sh
oiricaud May 11, 2020
6228b71
Update README.md
oiricaud May 12, 2020
02b7ac3
Update README.md
oiricaud May 12, 2020
b199ce8
Update README.md
oiricaud May 12, 2020
748cbc5
Update README.md
oiricaud May 12, 2020
6041335
Update README.md
oiricaud May 12, 2020
e93afaf
Update README.md
oiricaud May 12, 2020
b16e8e1
Update README.md
oiricaud May 12, 2020
2d52114
Update README.md
oiricaud May 12, 2020
9bcaa0f
Update README.md
oiricaud May 12, 2020
0571737
Update README.md
oiricaud May 12, 2020
f5b6af5
Update README.md
oiricaud May 12, 2020
d87459d
Update README.md
oiricaud May 12, 2020
0f90575
Update README.md
oiricaud May 12, 2020
d8cefea
Update README.md
oiricaud May 12, 2020
2d54d1c
Update README.md
oiricaud May 12, 2020
01c82c5
Update README.md
oiricaud May 12, 2020
14b6b50
Update README.md
oiricaud May 12, 2020
ed29bb3
Update README.md
oiricaud May 12, 2020
5bed4dc
Update README.md
oiricaud May 12, 2020
c3957e2
Update README.md
oiricaud May 12, 2020
c7f5357
Update README.md
oiricaud May 12, 2020
d4391e6
Update README.md
oiricaud May 12, 2020
69394ae
Update README.md
oiricaud May 12, 2020
dd41c22
Update README.md
oiricaud May 12, 2020
ac4df3c
Update README.md
oiricaud May 12, 2020
a4054a6
Update README.md
oiricaud May 12, 2020
3485a10
Update README.md
oiricaud May 12, 2020
8cd427c
Update README.md
oiricaud May 12, 2020
5b459fc
Update README.md
oiricaud May 12, 2020
7236bae
Update README.md
oiricaud May 12, 2020
8f46913
Update README.md
oiricaud May 12, 2020
a795e9f
Update README.md
oiricaud May 12, 2020
f150c2d
Update README.md
oiricaud May 12, 2020
db179eb
Update README.md
oiricaud May 12, 2020
0d09200
Update README.md
oiricaud May 12, 2020
08eaa29
Update README.md
oiricaud May 12, 2020
2e5abf1
Update README.md
oiricaud May 12, 2020
3246224
Update README.md
oiricaud May 12, 2020
cda059f
Update README.md
oiricaud May 12, 2020
475ab81
Update README.md
oiricaud May 12, 2020
4874245
Update README.md
oiricaud May 12, 2020
dfa989d
Update README.md
oiricaud May 13, 2020
f2834d4
Update README.md
oiricaud May 13, 2020
7690ee1
Update README.md
oiricaud May 13, 2020
7011645
Update README.md
oiricaud May 13, 2020
c5f20ac
Update README.md
oiricaud May 13, 2020
782d0fa
Update README.md
oiricaud May 13, 2020
753efa5
Update README.md
oiricaud May 13, 2020
70d2ccc
Update README.md
oiricaud May 13, 2020
ba25c96
Update README.md
oiricaud May 13, 2020
4f51637
Update clone-ops-update-repo-task.yaml
oiricaud May 13, 2020
1086a65
Merge branch 'master' of https://github.com/ibm-cloud-architecture/de…
oiricaud May 15, 2020
c1dd9b0
updated the gitops.yaml file
oiricaud May 15, 2020
d787e09
Update gitops.yaml
oiricaud May 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ What if the default Kabanero pipelines are not enough? You've spent some time de
enter a number >

Here is a quick demo I made https://asciinema.org/a/315675
49
36 changes: 18 additions & 18 deletions ci/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ echo -e "--- Created kabanero-pipelines.tar.gz"
# expose an extension point for running after main 'package' processing
exec_hooks $script_dir/ext/post_package.d

nginx_arg=

echo "BUILDING: $IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION}" > ${build_dir}/image.$INDEX_IMAGE.${INDEX_VERSION}.log
if image_build ${build_dir}/image.$INDEX_IMAGE.${INDEX_VERSION}.log \
$nginx_arg \
-t $IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE \
-t $IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION} \
-f $script_dir/nginx/Dockerfile $script_dir
then
echo "$IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE" >> $build_dir/image_list
echo "$IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION}" >> $build_dir/image_list
echo "created $IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION}"
trace "${build_dir}/image.$INDEX_IMAGE.${INDEX_VERSION}.log"
else
stderr "${build_dir}/image.$INDEX_IMAGE.${INDEX_VERSION}.log"
stderr "failed building $IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION}"
exit 1
fi
# nginx_arg=

# echo "BUILDING: $IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION}" > ${build_dir}/image.$INDEX_IMAGE.${INDEX_VERSION}.log
# if image_build ${build_dir}/image.$INDEX_IMAGE.${INDEX_VERSION}.log \
# $nginx_arg \
# -t $IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE \
# -t $IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION} \
# -f $script_dir/nginx/Dockerfile $script_dir
# then
# echo "$IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE" >> $build_dir/image_list
# echo "$IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION}" >> $build_dir/image_list
# echo "created $IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION}"
# trace "${build_dir}/image.$INDEX_IMAGE.${INDEX_VERSION}.log"
# else
# stderr "${build_dir}/image.$INDEX_IMAGE.${INDEX_VERSION}.log"
# stderr "failed building $IMAGE_REGISTRY/$IMAGE_REGISTRY_ORG/$INDEX_IMAGE:${INDEX_VERSION}"
# exit 1
# fi
38 changes: 10 additions & 28 deletions pipelines/incubator/mcm-pipelines/tasks/gitops.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
annotations:
manifestival: new
generation: 6
name: gitops
namespace: kabanero
spec:
Expand All @@ -23,53 +26,32 @@ spec:
- >
set -e


# Export project name

echo "this is my first run!"

# echo "applicationImage: bbb" > randomtext.txt


# clone repo

git clone
https://github.com/ibm-cloud-architecture/devops-demo-dev-env.git
git clone https://github.com/ibm-cloud-architecture/devops-demo-dev-env.git

cd devops-demo-dev-env


# update value for key applicationImage

sed -i "/applicationImage: /c\applicationImage:
$(inputs.resources.image.url)" ./app-deploy.yaml
sed -i '/image:/c\ image: $(inputs.resources.image.url)' ./deployment.yaml


# verify the value for key applicationImage got updated
cat ./deployment.yaml | grep "image"

cat ./app-deploy.yaml | grep "applicationImage"


# push changes to git

# This email is not used and it not valid, you can ignore but git
requires it

# This email is not used and it not valid, you can ignore but git requires it
git config --global user.email "user@example.com"

git config --global user.name "user"


echo $(inputs.resources.source.path)

# push changes to git
git add .

git commit -m "Updated app-deploy.yaml"

git commit -m "Updated deployment.yaml"
git push
command:
- /bin/bash
image: $(inputs.params.js-image)
name: clone-update-repo
resources: {}
workingDir: $(inputs.resources.source.path)
workingDir: $(inputs.resources.source.path)