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

Cr 4158 #28

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
da10fd2
add lb
idan-codefresh Jul 25, 2022
5e61a7c
add action and service yaml
ziv-codefresh Jul 25, 2022
58f01d6
change manifest repo
ziv-codefresh Jul 25, 2022
a615560
red
idan-codefresh Jul 25, 2022
510c18c
cf host
idan-codefresh Jul 25, 2022
e8f14d7
pass color as arg
ziv-codefresh Jul 25, 2022
37a720b
remove
ziv-codefresh Jul 25, 2022
137f212
cr-1234
idan-codefresh Jul 25, 2022
df57367
Merge pull request #1 from idan-codefresh/idan-codefresh-patch-1
idan-codefresh Jul 25, 2022
6472e0b
fix color
ziv-codefresh Jul 25, 2022
6e01b65
Merge branch 'master' of github.com:idan-codefresh/rollouts-demo
ziv-codefresh Jul 25, 2022
276d187
cr-12
idan-codefresh Jul 25, 2022
6e65b0a
purple
idan-codefresh Jul 25, 2022
26685b2
CR-12812
idan-codefresh Jul 25, 2022
4c931a3
Merge pull request #2 from idan-codefresh/idan-codefresh-patch-2
idan-codefresh Jul 25, 2022
8df7ec3
CR-12812
idan-codefresh Jul 25, 2022
b7ec437
Merge pull request #3 from idan-codefresh/idan-codefresh-patch-3
idan-codefresh Jul 25, 2022
d71efa8
fix color
ziv-codefresh Jul 25, 2022
25423d6
blue
ziv-codefresh Jul 25, 2022
24713ae
CR-1234
idan-codefresh Jul 26, 2022
780fc40
Merge pull request #4 from idan-codefresh/idan-codefresh-patch-4
idan-codefresh Jul 26, 2022
4700115
cr-1234
idan-codefresh Jul 26, 2022
c73e009
upated from sinppet
idan-codefresh Jul 27, 2022
10208fb
CR-1234
idan-codefresh Jul 27, 2022
7bc91b9
Merge pull request #5 from idan-codefresh/idan-codefresh-patch-5
idan-codefresh Jul 27, 2022
8c68af0
Update ci.yml
idan-codefresh Jul 27, 2022
21aefe4
Update ci.yml
idan-codefresh Jul 27, 2022
43c0196
CR-13399
idan-codefresh Jul 27, 2022
8d406f3
CR-1234
idan-codefresh Jul 27, 2022
796ab37
Update ci.yml
idan-codefresh Aug 7, 2022
6419a5c
Update service.yaml
idan-codefresh Aug 9, 2022
6aacb4b
CR-1234
idan-codefresh Aug 9, 2022
b9aa75c
Merge pull request #7 from idan-codefresh/idan-codefresh-patch-6
idan-codefresh Aug 9, 2022
1bae264
Update service.yaml
idan-codefresh Aug 11, 2022
131808f
Merge pull request #8 from idan-codefresh/CR-1234
idan-codefresh Aug 11, 2022
da6b0c0
CR-1234
idan-codefresh Aug 14, 2022
6fe7cca
Merge pull request #9 from idan-codefresh/idan-codefresh-patch-7
idan-codefresh Aug 14, 2022
73b8bf4
Update ci.yml
idan-codefresh Aug 14, 2022
f2242d5
Update service.yaml
idan-codefresh Aug 14, 2022
28611dc
Merge pull request #10 from idan-codefresh/CR-1234-1
idan-codefresh Aug 14, 2022
4708efb
Update service.yaml
idan-codefresh Aug 15, 2022
bdeb93a
Merge pull request #11 from idan-codefresh/CR-1234-2
idan-codefresh Aug 15, 2022
61dfb43
Update service.yaml
idan-codefresh Aug 21, 2022
eb9c9dc
Merge pull request #12 from idan-codefresh/CR-1234-3
idan-codefresh Aug 21, 2022
9f8af68
update report image
idan-codefresh Aug 21, 2022
e5960cf
CR-1234
idan-codefresh Aug 21, 2022
46fab00
Merge pull request #13 from idan-codefresh/idan-codefresh-patch-8
idan-codefresh Aug 21, 2022
3c8be3a
Update ci.yml
idan-codefresh Aug 21, 2022
6e5f62d
Update ci.yml
idan-codefresh Aug 21, 2022
35e8425
Update ci.yml
idan-codefresh Aug 21, 2022
1e3b054
Update ci.yml
idan-codefresh Aug 21, 2022
ce2cbe4
Update ci.yml
idan-codefresh Aug 21, 2022
6048220
Update ci.yml
idan-codefresh Aug 21, 2022
8a74ffa
Update ci.yml
idan-codefresh Aug 21, 2022
c1ec8ab
Update ci.yml
idan-codefresh Aug 21, 2022
c1ca6b2
Update ci.yml
idan-codefresh Aug 21, 2022
3bad3cd
Update ci.yml
idan-codefresh Aug 21, 2022
9b9b4e3
Update ci.yml
eti-codefresh Aug 21, 2022
026104b
Merge pull request #15 from eti-codefresh/patch-2
eti-codefresh Aug 21, 2022
62a46fd
Update ci.yml
eti-codefresh Aug 21, 2022
a7e85d3
Update ci.yml
eti-codefresh Aug 21, 2022
38de8c7
Update ci.yml
eti-codefresh Aug 21, 2022
fa287a6
Update service.yaml
eti-codefresh Aug 21, 2022
46221a1
Update ci.yml
eti-codefresh Aug 21, 2022
2588387
Update ci.yml
idan-codefresh Aug 23, 2022
e64962d
Update service.yaml
idan-codefresh Aug 23, 2022
a5d0cb9
Merge pull request #16 from idan-codefresh/CR-1234-4
idan-codefresh Aug 23, 2022
36a5bca
Update ci.yml
idan-codefresh Aug 23, 2022
307ea3b
Update ci.yml
idan-codefresh Aug 23, 2022
c598a7c
Update service.yaml
idan-codefresh Aug 23, 2022
a27ec4f
Merge pull request #17 from idan-codefresh/CR-1234-5
idan-codefresh Aug 23, 2022
cf4bd25
Update service.yaml
idan-codefresh Aug 23, 2022
c00d802
Merge pull request #18 from idan-codefresh/CR-1234-6
idan-codefresh Aug 23, 2022
b0394a6
Update ci.yml
idan-codefresh Aug 23, 2022
2c283f2
Update service.yaml
idan-codefresh Aug 23, 2022
946a47b
Merge pull request #19 from idan-codefresh/CR-1234-7
idan-codefresh Aug 23, 2022
bf27906
Update service.yaml
idan-codefresh Aug 23, 2022
b3edc2e
Merge pull request #20 from idan-codefresh/CR-1234-8
idan-codefresh Aug 23, 2022
e6d110f
Update ci.yml
idan-codefresh Sep 11, 2022
aeb7638
Merge pull request #23 from idan-codefresh/CR-1234-9
idan-codefresh Sep 11, 2022
54164f9
runtime change
idan-codefresh Sep 11, 2022
f066731
Update ci.yml
idan-codefresh Feb 21, 2023
0c12320
Update ci.yml
idan-codefresh Feb 21, 2023
4e63764
green
idan-codefresh Feb 21, 2023
a199153
Update service.yaml
idan-codefresh Feb 21, 2023
f652688
Merge pull request #28 from idan-codefresh/idan-codefresh-patch-9
idan-codefresh Feb 21, 2023
c82900c
Merge branch 'master' into CR-4158
idan-codefresh Feb 21, 2023
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
121 changes: 121 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Github-action-demo

on:
pull_request:
branches:
- master
types:
- closed
jobs:
build:
environment:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & push the Docker image
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
run: |
export VERSION=$(cat service.yaml)
export CF_IMAGE=$DOCKERHUB_USERNAME/${{ github.event.repository.name }}:$VERSION
echo "CF_IMAGE=$CF_IMAGE" >> $GITHUB_ENV
docker build . --file Dockerfile --build-arg COLOR=$VERSION --tag $CF_IMAGE && docker push $CF_IMAGE

- name: report image
with:
# Runtime to use for the enrichment.
CF_RUNTIME_NAME: 'codefresh-hosted'

# API key for authentication to Codefresh. !! Committing a plain text token is a security risk. We highly recommend using encrypted secrets. !!
# Documentation - https://docs.github.com/en/actions/security-guides/encrypted-secrets
CF_API_KEY: ${{secrets.CF2_API_KEY}}

# Image reported and enriched in Codefresh. Pass the [account-name]/[image-name]:[tag] built in your CI.
CF_IMAGE: ${{env.CF_IMAGE}}

# Container registry integration where the image is stored.
CF_CONTAINER_REGISTRY_INTEGRATION: 'docker'

# Git branch with the commit Pull Request data to add to the image. Pass the branch from the event payload used to trigger your action.
CF_GIT_BRANCH: ${{ github.event.pull_request.head.ref }}

# GitHub authentication token. !! Committing a plain text token is a security risk. We highly recommend using encrypted secrets. !!
# Documentation - https://docs.github.com/en/actions/security-guides/encrypted-secrets
CF_GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

# Issue tracking integration to use to enrich the image.
CF_JIRA_INTEGRATION: 'jira'

# Jira project prefix identifying the ticket number to use.
CF_JIRA_PROJECT_PREFIX: 'CR'

# Search for issue IDs matching this string to associate with your image.
CF_JIRA_MESSAGE: ${{ github.event.pull_request.head.ref }}
uses: codefresh-io/codefresh-report-image@latest
# - name: report image
# with:
# Name of runtime to implement the enrichment
# CF_RUNTIME_NAME: 'codefresh-hosted'

# Codefresh API key !! Committing a plain text token is a security risk. We highly recommend using an encrypted secrets. !!
# Documentation - https://docs.github.com/en/actions/security-guides/encrypted-secrets
# CF_API_KEY: ${{secrets.CF_API_KEY}}

# Name of Container registry integration
# CF_CONTAINER_REGISTRY_INTEGRATION: 'docker'

# Name of Jira integration
#CF_JIRA_INTEGRATION: 'jira'

# Image path to enrich
#CF_IMAGE: ${{ env.CF_IMAGE }}
# CF_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}:green
# GitHub Access token !! Committing a plain text token is a security risk. We highly recommend using an encrypted secrets. !!
# Documentation - https://docs.github.com/en/actions/security-guides/encrypted-secrets
# CF_GITHUB_TOKEN: ${{secrets.PAT}}

# Jira project filter
#CF_JIRA_PROJECT_PREFIX: 'CR'


# CF_JIRA_MESSAGE: 'test'
# CF_GIT_BRANCH: 'master'
# String starting with the issue ID to associate with image
# CF_JIRA_MESSAGE: "${{ github.event.pull_request.head.ref }}"
# CF_GIT_BRANCH: "${{ github.event.pull_request.head.ref }}"


# uses: codefresh-io/codefresh-report-image@latest

- name: Checkout csdp-salesdemo_applications
uses: actions/checkout@v3
with:
repository: idan-codefresh/canary-rollout # change to real repo
path: .
- name: Update application version
run: |
IMAGE=${{ env.CF_IMAGE }} yq -i '.spec.template.spec.containers.[0].image = strenv(IMAGE)' canary-rollout.yaml
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PAT }}
commit-message: Update version
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update-application-version
delete-branch: true
title: 'Update application version'
body: |
Update deployment version
- Updated new version for hello-world application
labels: |
automated pr
draft: false
1 change: 1 addition & 0 deletions examples/canary/canary-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ spec:
name: http
selector:
app: canary-demo
type: LoadBalancer
1 change: 1 addition & 0 deletions service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
orange