Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
1d05afd
adapted for AWS deploy
emanuelhjertzen Mar 22, 2018
c2b8fe9
changed region
emanuelhjertzen Mar 22, 2018
673e4cf
changed to port 80
emanuelhjertzen Mar 22, 2018
67237de
correct container name
emanuelhjertzen Mar 22, 2018
b706741
added bootstrap version of UI
robinandeer Apr 10, 2018
eed0b86
changed code for eu-west-1
emanuelhjertzen Jun 28, 2018
4af2b8c
Removing region hardcoding
Sep 10, 2018
0b2dac8
Merge branch 'master' into greg-dev
gyachuk Sep 10, 2018
a739e27
Display the entire pipeline name. Don't truncate to first 3 sections …
gyachuk Sep 10, 2018
9dc6893
Merge pull request #1 from uplift-inc/greg-dev
gyachuk Sep 10, 2018
9751ad4
Highlight the entire "Human" line if it is "inprogress", to reinforce…
gyachuk Sep 10, 2018
c4b5773
Merge pull request #2 from uplift-inc/greg-highlight-human-line
gyachuk Sep 10, 2018
e723a92
Highlight entire line. Move configurable stuff to index.html
gyachuk Sep 11, 2018
f31cebe
Merge pull request #3 from uplift-inc/greg-highlight-full-line
gyachuk Sep 11, 2018
b08772b
Pick up dashboard header display from the configurable "title" element.
gyachuk Sep 11, 2018
47b4c51
Match regexps for stage name and status, so you can e.g. match *all* …
gyachuk Sep 12, 2018
7eb931b
badge-danger (not badge-fail). highlight full failure line.
gyachuk Sep 12, 2018
2d3d7cf
call .parent() (not referencing .parent) when applying ".stage-failed…
gyachuk Sep 12, 2018
e0fa66e
this.isFailed, not $this.isFailed!
gyachuk Sep 12, 2018
3eeae01
Removing Prod and fixing missing bracket
Sep 12, 2018
4444a72
Fetch prod pipeline data
gyachuk Sep 12, 2018
42af920
CORS
gyachuk Sep 12, 2018
1ed3087
CORS
gyachuk Sep 12, 2018
4aa3949
Disabled remote prod server, til CORS is sorted out.
gyachuk Sep 12, 2018
cf5a4e5
Try to load the extra className in the "li" element.
gyachuk Sep 12, 2018
7124d00
Move extraClass computation down into stage element.
gyachuk Sep 12, 2018
281938e
CORS enabled. Fetch prod data.
gyachuk Sep 12, 2018
2ec01f5
Merge branch 'greg-fetch-prod-data' into greg-better-class-computation
gyachuk Sep 12, 2018
bb61841
Slight reformat of "stage" component template.
gyachuk Sep 12, 2018
c27cba2
Display all stages, even if no data is available other than name.
gyachuk Sep 13, 2018
dd97df4
Merge remote-tracking branch 'origin/master'
gyachuk Sep 13, 2018
0b7532b
Merge branch 'master' into greg-better-class-computation
gyachuk Sep 13, 2018
1d89ec6
Revert changes for fetching production data. Done through Apache Rewr…
gyachuk Sep 13, 2018
c7a6ee6
Merge branch 'master' into greg-regex-match-human-interaction-values
gyachuk Sep 13, 2018
7c25a82
Merge branch 'master' into greg-vue-router
gyachuk Sep 13, 2018
9859210
Revert changes for fetching production data. Done through Apache Rewr…
gyachuk Sep 13, 2018
91e8860
Show revision id
gyachuk Sep 13, 2018
8771a90
Expose errorDetails from pipelineService
gyachuk Sep 13, 2018
34b4e98
Move revisionId over to the right.
gyachuk Sep 13, 2018
706c59d
Add left and right padding on revisionId
gyachuk Sep 13, 2018
66fbe50
Merge branch 'master' into greg-error-details
gyachuk Sep 13, 2018
f1719e2
Display errorDetails if they exist.
gyachuk Sep 13, 2018
b8447eb
Merge branch 'master' into greg-better-class-computation
gyachuk Sep 13, 2018
63a339c
Humanize how long it takes to complete all stages in a pipeline.
gyachuk Sep 13, 2018
c3a681d
Updating the ECR login per Amazon's update
Sep 14, 2018
ea0e282
Merge branch 'master' into greg-vue-router
gyachuk Sep 14, 2018
c865c9e
Temporary workaround
Sep 15, 2018
e774014
Functional Docker BuildSpec
Sep 17, 2018
773859b
Use router to navigate to detail page
gyachuk Sep 17, 2018
cd970da
Merge branch 'greg-vue-router'
gyachuk Sep 17, 2018
641f6ab
Ignore local data files
gyachuk Sep 17, 2018
b550727
Pass "stages" data to <pipelineheader>, rather than fetching data twice.
gyachuk Sep 18, 2018
7b55f04
Docker Elastic Beanstalk Build V1
Sep 18, 2018
477b1da
ElasticBeanstalk Containerized Buildspec and instructions
Sep 19, 2018
88fc9a9
Updated docs
Sep 19, 2018
e6fa13a
Merge pull request #4 from uplift-inc/ebtest
m8786 Sep 19, 2018
4197fd3
Proper support for Multistage build
Sep 19, 2018
1c52210
Fixing broken cleanup.
Sep 19, 2018
13dd603
Add AjaxSequencer, to limit the number of simultaneous ajax requests …
gyachuk Sep 19, 2018
7ec07d3
Merge branch 'master' of github.com:uplift-inc/aws-codepipelines-dash…
gyachuk Sep 19, 2018
5278916
AjaxSequencer now uses promises
gyachuk Sep 20, 2018
812ae2c
Better use of promises. Rewrite AjaxSequencer to always return promises.
gyachuk Sep 20, 2018
bed34c4
Readme cleanup
Sep 20, 2018
8265cfc
Merge branch 'master' of github.com:uplift-inc/aws-codepipelines-dash…
Sep 20, 2018
37efb13
Merge pull request #5 from uplift-inc/master
m8786 Sep 20, 2018
30dc49c
Fixed th:src syntax for ajaxSequencer.js script
gyachuk Sep 20, 2018
43cfceb
Merge branch 'develop' into greg-resolve-promise
gyachuk Sep 20, 2018
e133be0
Ignore .vscode folder
gyachuk Sep 20, 2018
2e3bebb
Merge pull request #6 from uplift-inc/develop
m8786 Sep 20, 2018
813ccaf
Merge branch 'master' into greg-resolve-promises
gyachuk Sep 20, 2018
7272d97
Add loading indicator, and sort pipelines most recent changes first
gyachuk Sep 26, 2018
d607dea
Cleaned out unused code; increased size of loading indicator.
gyachuk Sep 26, 2018
f90316f
Merge branch 'master' into develop
gyachuk Sep 26, 2018
cfdb03c
Merge pull request #7 from uplift-inc/develop
gyachuk Sep 26, 2018
c9fdd78
Merge branch 'develop' into greg-regex-match-human-interaction-values
gyachuk Sep 26, 2018
52defc9
Added "?static" query param to avoid 60-second refresh
gyachuk Sep 28, 2018
35977f5
List all actions states for each stage.
gyachuk Sep 28, 2018
17c657d
Don't duplicate commit message in every stage.
gyachuk Oct 2, 2018
186f942
Merge branch 'greg-static' into develop
gyachuk Oct 2, 2018
fd80971
Fixed comments in index.html, so SAX parser doesn't puke
gyachuk Oct 2, 2018
91f0f52
refresh interval back to 1 minute
gyachuk Oct 3, 2018
721ddd7
Merge pull request #8 from uplift-inc/develop
m8786 Oct 3, 2018
6f3e53d
Merge branch 'develop' into greg-regex-match-human-interaction-values
gyachuk Oct 3, 2018
1a45195
case-insensitive, partial matches on stage names
gyachuk Oct 8, 2018
3800439
Merge branch 'master' into develop
gyachuk Oct 9, 2018
e457dd5
Merge pull request #9 from uplift-inc/develop
m8786 Oct 9, 2018
c8e23b4
Group states together within a "Stage" container.
gyachuk Oct 17, 2018
08a2f8f
Fixed sort when a lastStatusChange is undefined
gyachuk Oct 18, 2018
d78a020
Merge branch 'master' into develop
gyachuk Oct 18, 2018
735a702
Merge pull request #10 from uplift-inc/develop
m8786 Oct 18, 2018
cdb3bda
Propagate lastest status changes through to actionStates and pipeline…
gyachuk Oct 20, 2018
7370c33
router.go(0) doesn't refresh page on Safari. Use window.location.relo…
gyachuk Oct 22, 2018
cb0ce9b
Merge branch 'master' into develop
gyachuk Oct 22, 2018
35b5de4
Merge pull request #11 from uplift-inc/develop
m8786 Oct 22, 2018
6d3a401
Added "?refresh=NN" to refresh data every NN seconds.
gyachuk Oct 23, 2018
ea8f06c
Merge branch 'greg-better-refresh' into develop
gyachuk Oct 23, 2018
e935634
Changed simple component names (e.g. <stage>, <state>) to more comple…
gyachuk Oct 23, 2018
a76bc3b
Merge branch 'master' into develop
gyachuk Oct 23, 2018
1db0902
Merge pull request #12 from uplift-inc/develop
m8786 Oct 23, 2018
cc3f90c
<pipeline-grid> and <pipeline-card> now use a common <pipeline-card-b…
gyachuk Oct 25, 2018
37a7755
On refresh, start with existing pipelines, not an empty array.
gyachuk Oct 26, 2018
74a7cb1
Auto-refresh the card view, without reloading the page.
gyachuk Nov 1, 2018
441c45c
outdent the panel heading again.
gyachuk Nov 1, 2018
1c64315
Merge pull request #13 from uplift-inc/develop
m8786 Nov 1, 2018
7b7a3bb
Update Readme.md
m8786 Jan 31, 2019
78398cc
Merge pull request #14 from uplift-inc/develop
m8786 Jan 31, 2019
b015e2e
Updating lombok version
pkspks May 16, 2019
4637bf2
Merge pull request #15 from pkspks/patch-1
m8786 Sep 9, 2019
939414f
Improving documentation about how to specify AWS region and AWS profile
Nov 4, 2019
551bc8c
Added filtered view that only shows the pipelines that match the rege…
Nov 4, 2019
3809f25
Added various null checks for new pipelines
Nov 4, 2019
5fec1c3
Extract URLs from build step and show as links, in case of error
Nov 4, 2019
b102a46
Merge pull request #16 from qmatic/develop
m8786 Nov 15, 2019
13fcb17
Merge pull request #17 from uplift-inc/develop - qmatic improvements
m8786 Dec 2, 2019
4484a37
Add a filter field to the header.
gyachuk Dec 11, 2019
95d89c2
Merge pull request #1 from gyachuk/filter-field
gyachuk Dec 11, 2019
92c793b
Merge pull request #18 from gyachuk/develop - Filter field in Header …
m8786 Dec 11, 2019
34eb47c
Merge pull request #19 from gyachuk/develop - Add Filter UX
m8786 Dec 12, 2019
553f476
Update AWS SDK to support IMDSv2 in the Region Provider Chain
Jul 26, 2021
13fa682
Merge pull request #20 from uplift-inc/al2
Jul 27, 2021
eaa7da1
Automated Deployment via CF Template w/ README
Jul 28, 2021
fc2135c
Merge pull request #21 from uplift-inc/develop - Fully automated depl…
Jul 28, 2021
ee31c17
New Solution Stack and CNAME note
Sep 30, 2022
e738816
Fix note
Sep 30, 2022
3f8051c
Merge pull request #22 from uplift-inc/develop
Oct 3, 2022
7494a60
TOP-20098 bump version to fix CVEs
ddumaisupgrade Oct 16, 2023
8fd062b
fix
ddumaisupgrade Oct 16, 2023
c9fb266
fix
ddumaisupgrade Oct 16, 2023
040c2c9
fix
ddumaisupgrade Oct 16, 2023
72de0f1
Merge pull request #23 from uplift-inc/TOP-20098-fix-cve
sheelask Oct 16, 2023
f016ca0
TOP-20098-fix
ddumaisupgrade Oct 18, 2023
182822a
Merge pull request #24 from uplift-inc/TOP-20098-fix
ddumaisupgrade Oct 18, 2023
4c294ec
fix start date and duration
ddumaisupgrade Oct 19, 2023
07a83fc
Fix
ddumaisupgrade Oct 19, 2023
0d111aa
Merge pull request #25 from uplift-inc/TOP-20098-fix
ddumaisupgrade Oct 19, 2023
1d7b856
Merge pull request #26 from uplift-inc/develop
sheelask Oct 25, 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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ target
### IntelliJ IDEA ###
.idea
*.iml

### Visual Studio ###
.vscode

### Local data files ###
/src/main/resources/data/
21 changes: 5 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
### Build stage
FROM maven:3.5.2-jdk-8 as builder
WORKDIR /tmp/build-dir
COPY . .
RUN cd /tmp/build-dir && mvn package

### Production stage
FROM java:8-jre
FROM openjdk:8u151-jre-alpine3.7
LABEL maintainer="Oliver Hoogvliet <oliver.hoogvliet@codecentric.de>, Raimar Falke <raimar.falke@codecentric.de>"
RUN groupadd -r app && useradd --no-log-init -r -g app app
WORKDIR /home/app
COPY --from=builder /tmp/build-dir/container_start.sh /app/container_start.sh
RUN chmod 755 /app/container_start.sh
USER app
ENTRYPOINT ["/app/container_start.sh"]
EXPOSE 8080
COPY --from=builder /tmp/build-dir/target/app.jar /app/app.jar
ARG APP_FILE_PATH
EXPOSE 80
COPY $APP_FILE_PATH app.jar
CMD ["java", "-jar", "-Dserver.port=80", "app.jar"]
104 changes: 71 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,87 @@
# AWS Codepipelines Dashboard

This is a spring boot app which serves a dashboard to see, the status
of your AWS Codepipelines.
This is a Spring Boot app which serves a dashboard to see the status of your AWS Codepipelines.

It uses the AWS Java client to fetch data from AWS. Please follow the
policy instructions below to provide access. This means that the computer
running the spring boot app must have network access to AWS.
It uses the AWS Java client to fetch data from AWS. Please follow the policy instructions below to provide access for development or set up a Role for Elastic Beanstlak deployment. For development, this means that the computer running the spring boot app must have network access to AWS.

You can also run the application on your local computer. For example
by running `mvn spring-boot:run` from the command line. There is also
a Dockerfile included to run the application in the cloud.

## Getting started with Docker
With the following command, you can run this application in a docker container:
## Getting Started Locally
### With Java/Maven
You can run the application on your local computer by running `mvn spring-boot:run` from the command line after grabbing the source (assuming Maven is installed already). There is also a Dockerfile included to run the application in a container (local or remote).
After that, you can reach the application in a web browser at
```http://localhost:8080/```
The terminal will stream the log of your application.

### With Docker
After you have it running with Java/Maven (which builds it), assuming you have Docker installed and running, follow the guidelines in the docker_buildspec.yml to build a Docker image. To run the app in a Docker container:
```
docker run -p8080:8080 -v`echo $HOME/.aws`:/home/app/.aws:ro --name dashboard codecentric/aws-codepipelines-dashboard
```
After start, you can reach the application via
```http://localhost:8080/```

This configuration assumes that you've already an AWS account with a running
AWS CLI on your development host.

## Instructions for setting up AWS

You have to give/ensure the user mentioned in $HOME/.aws/credentials
a policy. The steps are:

1) choose IAM
1) use "Policies" in navigation
1) search for "AWSCodePipelineFullAccess"
1) select Attach entities, select "Attach"
1) get your user
1) click "Attach policy"

Check policies with this CLI command:

After start, you can reach the application from the same URL as above. This configuration assumes that you've already an AWS account with a running AWS CLI on your development host. If you're having trouble with that, see "_Instructions for Setting up AWS permission for Development_" below.
### Instructions for setting up AWS Permission for Development
You have to give/ensure the user mentioned in $HOME/.aws/credentials has the right policy. Check policies with this CLI command:
```
aws iam list-attached-user-policies --user-name <USERNAME>
```

Verify that the following entry is listed:
```
{
"PolicyName": "AWSCodePipelineFullAccess",
"PolicyArn": "arn:aws:iam::aws:policy/AWSCodePipelineFullAccess"
"PolicyName": "AWSCodePipelineReadOnlyAccess",
"PolicyArn": "arn:aws:iam::aws:policy/AWSCodePipelineReadOnlyAccess"
}
```
_AWSCodePipelineFullAccess_ will also work. If you do not have either of these, you need to attach the policy:
1. Log in to AWS as an Administrator or someone with IAM access
2. Choose IAM
3. Click "Policies" in Left Navigation
4. Search for "AWSCodePipelineReadOnlyAccess"
5. Select Attach entities, select "Attach"
6. Choose your user
7. click "Attach policy"

### Usage
#### Display All Pipelines
Navigate to ```http://localhost:8080/```

#### Display Some Pipelines
Navigate to ```http://localhost:8080/#/filtered/regexp``` to display all pipelines whose name matches the regexp.

##### Examples
Navigate to ```http://localhost:8080/#/filtered/project-[ab]``` to display all pipelines whose name contains `project-a` or `project-b`
Navigate to ```http://localhost:8080/#/filtered/(project-alpha)|(project-beta)``` to display all pipelines whose name contains `project-alpha` or `project-beta`


## Instructions for manually setting up a CI/CD Pipeline and Deployment on Elastic Beanstalk

### CloudFormation Automated Deployment Instructions
Simply deploy the `deployment-cft.yml` CloudFormation template via the AWS CloudFormation Console or CLI.
* The only thing you must provide is either a GitHub Access Token or the Secret String portion of a SecretsManager Secret that has a GitHub access token
* Many other existing resources can be resued as well, if provided
* The CloudFormation Template will automatically deploy any resources that you have not provided and set up ElasticBeanstalk in the Default VPC with a CodePipeline deploying to it
* You can also configure whether approval is required to deploy updates
* You can also specify which CodeBuild Image, ElasticBeanstalk SolutionStack, and Instance Type to use
* If you specify a Custom CName Prefix, the full dashboard URL will also be listed as a Stack output.

### Notes
* The Dashboard will be available over HTTP on port 80 (no HTTPS, not 8080 like local development)
* The Dashboard can only report on CodePipelines in the region that the Elastic Beanstalk environment is deployed to
* If this data is sensitive, you might want to restrict access in the Security Group that gets created by Elastic Beanstalk (EB will always create a Security Group, you must modify the one that it creates after creation if doing this manually)

#### Old Instructions for manual setup - DEPRECATED - USE THE ABOVE METHOD - RETAINED FOR CICD BACKWARDS COMPATIBILITY
##### Old Deployment Notes
* Choose *Generic*->*Docker* for the Elastic Beanstalk Platform
* You will need to either create an EC2 role that hass the _AWSCodePipelineReadOnlyAccess_ managed policy attached to it, or attach that policy to the EC2 Role generated by Elatsic Beanstalk
* You will also need GitHub connectivity as well as CodeBuild, CodePipeline, and ElasticBeanstalk Service roles for this (the last 3 can be generated by AWS)
* The details of the EB environment are up to you to decide, but a basic single t1.micro seems to work fine for occasional needs
#### Old, Manual, Tedious Setup
1. (Optional) Set up EC2 Role with the managed Policy _AWSCodePipelineReadOnlyAccess_ attached to it
2. Create the Elastic Beanstalk Environment with the EC2 role as the _IAM Instance Profile_ in the *Security* settings if you have created it (if you autogenerate, attach the Managed Policy to the generated role)
3. Create a CodeBuild with *_buildspec.yml_* to build the Java artifacts (use the Amazon managed Ubuntu Java Runtime, you shouldn't need a VPC or artifacts, use an existing CodeBuild Service Role or generate a new one)
4. Create a CodeBuild with *_eb_docker_buildspec.yml_* to containerize the Java artifacts (use the Amazon managed Ubuntu Docker Runtime, ensure you specify the eb_docker_buildspec.yml, you shouldn't need a VPC or artifacts, use an existing CodeBuild Service Role or generate a new one)
5. Create a CodePipeline with:
1. GitHub repo as the Source stage (you can use any version of the repo and any branch you see fit, as long as the necesssary files exist for CodeBuild to function)
2. The Java CodeBuild as the first part of the Build stage, with output artifacts tagged something like "_JavaArtifacts_"
3. The Containerize CodeBuild as the second part of the Build stage, with the input artifacts as the output artifats of the Java build (in this example, _JavaArtifacts_) and the output artifacts tagged as something like "_EBApp_"
4. (Optional) Set up a Human approval step before deployment if uptime is critical
5. Set up a Deploy stage to your Elastic Beanstlak environment from Step 3 with the Input artifacts as the output from the Contaizer step (in this example, _EBApp_)
6. Release the Change to trigger a new build and deployment
41 changes: 41 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: 0.2

#This is the buildspec for building the application source using maven.
#The result is
# - a jar-file (e.g. example-0.0.2-SNAPSHOT.jar)
# - a app_info.txt file with informaion about the above file, and version
# (this is used whenin the CodeBuild project that builds and pushes the docker image)
# - the Dockerfile and docker_buildspec for the CodeBuild project that builds and pushes the docker image.
# (simply copied from the source files)

phases:
build:
commands:
- echo Build started on `date`
- mvn package
post_build:
commands:
- echo Build completed on `date`

# The following commands read the artifactId, version and packaging tags from the maven POM.xml
# and passes the info to the next stage in app_info.txt
# - APP_ARTIFACT_ID=$(grep '^archivesBaseName' build.gradle | cut -d'=' -f2|sed "s/[' ]//g")
# - APP_VERSION=$(grep '^version' build.gradle | cut -d'=' -f2|sed "s/[' ]//g")
- APP_ARTIFACT_ID=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.build.finalName}' --non-recursive exec:exec)
- APP_VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)
- printf "/target/%s.jar;%s" "$APP_ARTIFACT_ID" "$APP_VERSION" > app_info.txt

artifacts:
files:
- 'target/*.jar'
- 'container_start.sh'
- 'app_info.txt'
- 'Dockerfile'
- 'docker_buildspec.yml'
- 'eb_docker_buildspec.yml'
cache:
paths:
#Maven
- '/root/.m2/**/*'
#Gradle
#- '/root/.gradle/caches/**/*'
Empty file modified container_start.sh
100644 → 100755
Empty file.
Loading