Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
git-INSA-21-22-ex3-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maxime.Missichini
git-INSA-21-22-ex3-c
Commits
236a459c
Commit
236a459c
authored
3 years ago
by
Olivier Levillain
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit.
parents
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+1
-0
1 addition, 0 deletions
Makefile
README.md
+43
-0
43 additions, 0 deletions
README.md
hello.c
+15
-0
15 additions, 0 deletions
hello.c
with
59 additions
and
0 deletions
Makefile
0 → 100644
+
1
−
0
View file @
236a459c
all
:
hello
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
+
43
−
0
View file @
236a459c
# Third git exercise (c flavor)
In this series of exercises, we assume you are working as a team of
two: one of you is acting as a developer, the other as the project
maintainer.
To validate this exercise, you have to perform the following actions:
-
[Maintainer] fork the project
-
[Maintainer] enforce that only maintainers can merge into the main branch
-
[Maintainer] enforce that no one can directly push into the main branch
-
[Maintainer] invite your teammate as a developer on the project
-
[Maintainer] also invite your teacher as a developer
-
[Developer] Clone the repository
-
[Developer] Identify the problem with this project and write an issue about it
-
[Developer] Create a dedicated branch to fix the problem
-
[Developer] Once you are happy with your work, propose a Merge Request
-
[Maintainer] Review the proposal, and comment if need be
-
[Developer] Improve your review following the maintainer's commnets
-
[Maintainer] When the Merge Request seems acceptable, accept it into the main branch
If you have already validated this exercise and a similar one, both as
developer and as maintainer, here are some follow-up questions, to do
with your teammate:
-
[Maintainer] Add a .gitlab-ci.yml file at the root of the project, with the following
content, with IMAGE being gcc for a C program or python:3.10 for python scripts (and
push it into the main branch)
```
test:
image: IMAGE
script:
- make check
```
-
[Maintainer] Configure the repository so that a Merge Request can
only be accepted if the CI pipeline (the
`make check`
above) succeeds.
-
[Maintainer] Look at the CI/CD
-
[Developer] Write a Makefile and some tests in a dedicated branch
-
[Developer] Once you are satisfied, fill a Merge Request
-
[Maintainer] Try and validate the Merge Request. If it does not work, discuss with your dev.
This diff is collapsed.
Click to expand it.
hello.c
0 → 100644
+
15
−
0
View file @
236a459c
#include
<stdio.h>
void
main
(
int
argc
,
char
*
argv
[])
{
if
(
argc
<
2
)
printf
(
"Hello world!
\n
"
);
else
if
(
argc
==
2
)
printf
(
"Hello %s!
\n
"
,
argv
[
1
]);
else
{
printf
(
"Hello "
);
printf
(
argv
[
1
]);
for
(
int
i
=
2
;
i
<
argc
;
i
++
)
printf
(
", %s"
,
argv
[
i
]);
printf
(
"!
\n
"
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment